From ed585657cae7a24698e039aad267ab3e5ea5f5a6 Mon Sep 17 00:00:00 2001 From: godotg Date: Sun, 9 Feb 2025 11:32:36 +0800 Subject: [PATCH] doc: update README.md --- README.md | 15 +++++++-------- README_CN.md | 17 ++++++++--------- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 4fc3c847..8528383c 100644 --- a/README.md +++ b/README.md @@ -57,8 +57,8 @@ Perfect work development process, complete online solution - [zfoo sdk of csharp and lua for unity and godot](https://github.com/zfoo-project/zfoo-sdk-csharp-lua-unity-godot) - [zfoo sdk typescript javascript cocos web h5](https://github.com/zfoo-project/zfoo-sdk-typescript-javascript-cocos-web-h5) - [zfoo sdk gdscript for godot](https://github.com/zfoo-project/zfoo-sdk-gdscript-godot) -- [tank-game-server](https://github.com/zfoo-project/tank-game-server) Online game《The Fight of Tanks》, novice friendly, - difficulty 2 stars +- [jc-site](https://github.com/zfoo-project/jc-site) AI website +- [tank-game-server](https://github.com/zfoo-project/tank-game-server) - [godot-bird](https://github.com/zfoo-project/godot-bird) bird and bird,powered by godot - [FAQ](./doc/FAQ.md),There are standard demo display and instructions in the test folder of each project directory, which can be run directly @@ -69,7 +69,7 @@ Perfect work development process, complete online solution #### 1. [protocol](protocol/README.md) ultimate performance serialization and deserialization ``` -// zfoo protocol registration, can only be initialized once +// protocol registration ProtocolManager.initProtocol(Set.of(ComplexObject.class, ObjectA.class, ObjectB.class)); // serialization @@ -92,11 +92,10 @@ var userInfoAsk = UserInfoAsk.valueOf(userId); var answer = NetContext.getCosumer().syncAsk(userInfoAsk, UserInfoAnswer.class, userId).packet(); // Consumers, asynchronously requesting remote service, and will still execute logic in the current thread after the asynchronous -NetContext.getCosumer() - .asyncAsk(userInfoAsk, UserInfoAnswer.class, userId) - .whenComplete(sm -> { - // do something - ); +NetContext.getCosumer().asyncAsk(userInfoAsk, UserInfoAnswer.class, userId) + .whenComplete(sm -> { + // do something + ); ``` #### 3. [hotswap](hotswap/src/test/java/com/zfoo/hotswap/ApplicationTest.java) hot update code, no need to stop the server, no additional configuration, just one line of code to start hot update diff --git a/README_CN.md b/README_CN.md index 696a456a..f1efc87b 100644 --- a/README_CN.md +++ b/README_CN.md @@ -62,8 +62,9 @@ - [zfoo sdk gdscript for godot](https://github.com/zfoo-project/zfoo-sdk-gdscript-godot) -- [tank-game-server](https://github.com/zfoo-project/tank-game-server) 网络游戏《进击的坦克(The Fight of - Tanks)》,新手友好,难度2星 +- [jc-site](https://github.com/zfoo-project/jc-site) AI聚合网站 + +- [tank-game-server](https://github.com/zfoo-project/tank-game-server) - [godot-bird](https://github.com/zfoo-project/godot-bird) 鸟了个鸟,客户端使用godot开发,服务器依然使用的tank-game-server @@ -74,8 +75,7 @@ #### 1. [protocol](protocol/README.md) 极致性能的Java序列化和反序列化库 ``` -// zfoo协议注册,只能初始化一次 -// 注意:实际项目中是通过读取protocol.xml文件自动完成协议注册的,无需调用此方法手动注册 +// 协议注册 ProtocolManager.initProtocol(Set.of(ComplexObject.class, ObjectA.class, ObjectB.class)); // 序列化 @@ -98,11 +98,10 @@ var userInfoAsk = UserInfoAsk.valueOf(userId); var answer = NetContext.getCosumer().syncAsk(userInfoAsk, UserInfoAnswer.class, userId).packet(); // 消费者,异步请求远程用户信息,不会柱塞当前的线程,异步请求成功过后依然会在当前线程执行逻辑 -NetContext.getCosumer() - .asyncAsk(userInfoAsk, UserInfoAnswer.class, userId) - .whenComplete(sm -> { - // do something - ); +NetContext.getCosumer().asyncAsk(userInfoAsk, UserInfoAnswer.class, userId) + .whenComplete(sm -> { + // do something + ); ``` #### 3. [hotswap](hotswap/src/test/java/com/zfoo/hotswap/ApplicationTest.java) 热更新代码,不需要停止服务器,不需要额外的任何配置,一行代码开启热更新