Skip to content

Commit bd2e585

Browse files
committed
fix(generate-code): broadcast_action_example_action.txt、broadcast_action_example.txt
1 parent a88338c commit bd2e585

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

common/common-micro-kit/src/main/java/com/iohao/game/common/kit/RandomKit.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,4 +149,8 @@ public <T> T randomEle(T[] array) {
149149
? array[0]
150150
: array[randomInt(array.length)];
151151
}
152+
153+
public double nextDouble() {
154+
return generator.nextDouble();
155+
}
152156
}

widget/generate-code/src/main/resources/generate/csharp/broadcast_action_example.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ if (dataTypeIsInternal) {
77
resultMethodName = resultMethodTypeName;
88
}
99
%>
10-
const value = result.${resultMethodName};
10+
var value = result.${resultMethodName};
1111
<%
1212
} else {
1313
if (dataIsList) {
@@ -16,5 +16,5 @@ const value = result.${resultMethodName};
1616
resultMethodName = resultMethodTypeName;
1717
}
1818
%>
19-
const value = result.${codeEscape(resultMethodName)};
19+
var value = result.${codeEscape(resultMethodName)};
2020
<%}%>

widget/generate-code/src/main/resources/generate/csharp/broadcast_action_example_action.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ var value = result.${resultMethodName};
1616
resultMethodName = resultMethodTypeName;
1717
}
1818
%>
19-
var value = result.${resultMethodName};
19+
var value = result.${codeEscape(resultMethodName)};
2020
<%}%>

0 commit comments

Comments
 (0)