Example #1
0
 public T GetInfo <T>(params object[] data) where T : InfoData
 {
     if (mapCom == null)
     {
         mapCom = ECSLocate.ECS.GetGlobalSingleCom <MapCom>();
     }
     UpdateInfo();
     return(info.As <T>());
 }
Example #2
0
        protected override void HandleComs(List <BaseCom> comList)
        {
            if (MapCom == null)
            {
                MapCom = GetCom <MapCom>(comList[0]);
            }
            if (GoCom == null)
            {
                GoCom = GetCom <GameObjectCom>(comList[1]);
            }
            PlayerInfoData playerInfo = ECSLayerLocate.Info.GetWorldInfo <PlayerInfoData>(WorldInfoKey.PlayerInfo);

            RefreshMap(playerInfo.Pos);
            UpdatePlayerMapPos(playerInfo.Pos);
        }