未验证 提交 43a84873 编写于 作者: W wryl 提交者: GitHub

修复demo中创建zone场景id为0的bug (#212)

* 修改id为0的bug
上级 d9f1a231
......@@ -8,7 +8,7 @@ namespace ET
{
protected override async ETTask Run(Session session, M2C_CreateUnits message)
{
UnitComponent unitComponent = Game.Scene.Get(0).GetComponent<UnitComponent>();
UnitComponent unitComponent = Game.Scene.Get(1).GetComponent<UnitComponent>();
foreach (UnitInfo unitInfo in message.Units)
{
......
......@@ -12,9 +12,9 @@ namespace ET
Game.EventSystem.Publish(new EventType.AfterUnitCreate() {Unit = unit});
UnitComponent unitComponent = Game.Scene.Get(0).GetComponent<UnitComponent>();
UnitComponent unitComponent = Game.Scene.Get(1).GetComponent<UnitComponent>();
unitComponent.Add(unit);
return unit;
}
}
}
\ No newline at end of file
}
......@@ -23,9 +23,9 @@ namespace ET
ResourcesComponent.Instance.LoadBundle("unit.unity3d");
Scene zoneScene = await SceneFactory.CreateZoneScene(0, 0, "Game");
Scene zoneScene = await SceneFactory.CreateZoneScene(1, 1, "Game");
await Game.EventSystem.Publish(new EventType.AppStartInitFinish() { ZoneScene = zoneScene });
}
}
}
\ No newline at end of file
}
......@@ -11,7 +11,7 @@
{
await sceneChangeComponent.ChangeSceneAsync("Map");
}
Game.Scene.Get(0).AddComponent<OperaComponent>();
Game.Scene.Get(1).AddComponent<OperaComponent>();
await UIHelper.Remove(args.ZoneScene, UIType.UILobby);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册