地图相关协议
This commit is contained in:
@@ -15,7 +15,7 @@ namespace NBF
|
||||
_session = Net.CreateSession("127.0.0.1:20001");
|
||||
|
||||
_session.Scene.AddComponent<UnitUnityComponent>();
|
||||
|
||||
|
||||
var acc = account;
|
||||
|
||||
// 发送登录的请求给服务器
|
||||
@@ -52,6 +52,7 @@ namespace NBF
|
||||
}
|
||||
|
||||
Log.Debug($"登录到Gate服务器成功!ErrorCode:{loginResponse.ErrorCode}");
|
||||
await _session.Scene.EventComponent.PublishAsync(new ChangePosition());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -20,13 +20,14 @@ namespace NBF
|
||||
{
|
||||
if (btn == BtnLogin)
|
||||
{
|
||||
var unitGameObject = new GameObject("Unit");
|
||||
var unit = Entity.Create<Unit>(App.Main, true, true);
|
||||
var unitUnity = unit.AddComponent<UnitUnityComponent>();
|
||||
unitUnity.SetGameObject(unitGameObject);
|
||||
// App.Main.add
|
||||
// LoginHelper.Login(InputAccount.text).Coroutine();
|
||||
OnLoginClick().Coroutine();
|
||||
}
|
||||
}
|
||||
|
||||
private async FTask OnLoginClick()
|
||||
{
|
||||
await LoginHelper.Login(InputAccount.text);
|
||||
await MapHelper.Enter(99);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user