public T GetInfo <T>(params object[] data) where T : InfoData { if (mapCom == null) { mapCom = ECSLocate.ECS.GetGlobalSingleCom <MapCom>(); } UpdateInfo(); return(info.As <T>()); }
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); }