mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 02:36:14 +00:00
添加线程逻辑执行
This commit is contained in:
@@ -33,11 +33,6 @@ public class DApplication : MonoBehaviour
|
||||
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
App.Game.Update();
|
||||
}
|
||||
|
||||
public void OnClickPlayerCreate()
|
||||
{
|
||||
var input = App.Game.GetInput<IDWorld>();
|
||||
|
@@ -26,6 +26,13 @@ namespace AppGame.Systems
|
||||
|
||||
}
|
||||
|
||||
public override void OnClose()
|
||||
{
|
||||
base.OnClose();
|
||||
client?.Dispose();
|
||||
server?.Dispose();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 运行同步类
|
||||
/// </summary>
|
||||
@@ -33,24 +40,17 @@ namespace AppGame.Systems
|
||||
{
|
||||
client = new T();
|
||||
client.Initialize();
|
||||
client.TStartExecute();
|
||||
return client as T;
|
||||
}
|
||||
public T StartServer<T>() where T : JNSStateServerService,new()
|
||||
{
|
||||
server = new T();
|
||||
server.Initialize();
|
||||
server.TStartExecute();
|
||||
return server as T;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新周期
|
||||
/// </summary>
|
||||
public void Update()
|
||||
{
|
||||
client?.Execute();
|
||||
server?.Execute();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取第一个客户端的输入类
|
||||
/// </summary>
|
||||
|
Reference in New Issue
Block a user