|
9 | 9 |
|
10 | 10 | ------ |
11 | 11 |
|
| 12 | +### 2025-05-09 - v21.27 |
| 13 | + |
| 14 | +https://github.com/iohao/ioGame/releases/tag/21.27 |
| 15 | + |
| 16 | + |
| 17 | +**Version update summary** |
| 18 | + |
| 19 | +> 1. feat(generate-code): #449 Supports GDScript GenerateCode |
| 20 | +> 2. #444 Provides GDScript SDK |
| 21 | +> 3. #448 Provides GDScript Example with ioGame |
| 22 | +> 4. perf(core): ActionCommandDocKit |
| 23 | +
|
| 24 | +------ |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | +**feat(generate-code)**: #449 Supports GDScript GenerateCode |
| 29 | + |
| 30 | +About examples: https://github.com/iohao/ioGameSdkGDScriptExampleGodot |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | +```java |
| 35 | +public final class GenerateTest { |
| 36 | + // setting root path |
| 37 | + static String rootPath = "/Users/join/gitme/ioGame-sdk/"; |
| 38 | + |
| 39 | + public static void main(String[] args) { |
| 40 | + // CHINA or US |
| 41 | + Locale.setDefault(Locale.CHINA); |
| 42 | + |
| 43 | + // Load the business framework of each gameLogicServer |
| 44 | + // cn: 加载游戏逻辑服的业务框架 |
| 45 | + yourListLogic().forEach(BrokerClientStartup::createBarSkeleton); |
| 46 | + |
| 47 | + /* |
| 48 | + * Generate actions, broadcasts, and error codes. |
| 49 | + * cn: 生成 action、广播、错误码 |
| 50 | + */ |
| 51 | + |
| 52 | + // ----- About generating GDScript code ----- |
| 53 | + generateCodeGDScriptGodot(); |
| 54 | + |
| 55 | + // Added an enumeration error code class to generate error code related information |
| 56 | + IoGameDocumentHelper.addErrorCodeClass(YourGameCodeEnum.class); |
| 57 | + // Generate document |
| 58 | + IoGameDocumentHelper.generateDocument(); |
| 59 | + } |
| 60 | + |
| 61 | + private static void generateCodeGDScriptGodot() { |
| 62 | + var documentGenerate = new GDScriptDocumentGenerate(); |
| 63 | + // By default, it will be generated in the target/code directory |
| 64 | + // cn: 设置代码生成所存放的路径,如果不做任何设置,将会生成在 target/code 目录中 |
| 65 | + String path = rootPath + "ioGameSdkGDScriptExampleGodot/gen/code"; |
| 66 | + documentGenerate.setPath(path); |
| 67 | + |
| 68 | + IoGameDocumentHelper.addDocumentGenerate(documentGenerate); |
| 69 | + } |
| 70 | +} |
| 71 | +``` |
| 72 | + |
| 73 | + |
| 74 | + |
| 75 | + |
12 | 76 |
|
13 | 77 |
|
14 | 78 | ### 2025-04-30 - v21.26 |
|
0 commit comments