Ejemplo n.º 1
0
 public void AddGameUI(Entity character, int gameUIIndex)
 {
     //UnityEngine.Debug.LogError("(Queueing) Spawning " + gameUIIndex + " on character: " + character.Index);
     if (gameUIIndex == ((byte)PlayerUIType.StatsUI))
     {
         // UnityEngine.Debug.LogError("(Queueing) [StatsUI] Spawning " + gameUIIndex + " on character: " + character.Index);
         StatsUISpawnSystem.SpawnUI(World.EntityManager, character);
     }
     else if (gameUIIndex == ((byte)PlayerUIType.InventoryUI))
     {
         // UnityEngine.Debug.LogError("(Queueing) [InventoryUI] Spawning " + gameUIIndex + " on character: " + character.Index);
         InventoryUISpawnSystem.SpawnUI(World.EntityManager, character);
     }
     else if (gameUIIndex == ((byte)PlayerUIType.QuestlogUI))
     {
         //  UnityEngine.Debug.LogError("(Queueing) [QuestlogUI] Spawning " + gameUIIndex + " on character: " + character.Index);
         QuestLogUISpawnSystem.SpawnUI(World.EntityManager, character);
     }
     //else if (gameUIIndex == ((byte)PlayerUIType.DialogueUI))
     //{
     // UnityEngine.Debug.LogError("(Queueing) [DialogueUI] Spawning " + gameUIIndex + " on character: " + character.Index);
     //DialogueUISpawnSystem.SpawnUI(World.EntityManager, character);
     //}
     else if (gameUIIndex == ((byte)PlayerUIType.MapUI))
     {
         //  UnityEngine.Debug.LogError("(Queueing) [MapUI] Spawning " + gameUIIndex + " on character: " + character.Index);
         MapUISpawnSystem.SpawnUI(World.EntityManager, character);
     }
     else if (gameUIIndex == ((byte)PlayerUIType.SkillbookUI))
     {
         //UnityEngine.Debug.LogError("(Queueing) [SkillbookUI] Spawning " + gameUIIndex + " on character: " + character.Index);
         SkillbookUISpawnSystem.SpawnUI(World.EntityManager, character);
     }
     else if (gameUIIndex == ((byte)PlayerUIType.EquipmentUI))
     {
         EquipmentUISpawnSystem.SpawnUI(World.EntityManager, character);
     }
     else if (gameUIIndex == ((byte)PlayerUIType.Menu))
     {
         MenuSpawnSystem.SpawnUI(World.EntityManager, character, "PauseMenu");
     }
 }
Ejemplo n.º 2
0
 private void RemovePreviousUI(Entity character, int gameUIIndex)
 {
     //UnityEngine.Debug.LogError("(Queueing) Removing " + gameUIIndex + " from character: " + character.Index);
     if (gameUIIndex == ((byte)PlayerUIType.StatsUI))
     {
         StatsUISpawnSystem.RemoveUI(EntityManager, character);
     }
     else if (gameUIIndex == ((byte)PlayerUIType.InventoryUI))
     {
         InventoryUISpawnSystem.RemoveUI(EntityManager, character);
     }
     else if (gameUIIndex == ((byte)PlayerUIType.QuestlogUI))
     {
         QuestLogUISpawnSystem.RemoveUI(EntityManager, character);
     }
     //else if (gameUIIndex == ((byte)PlayerUIType.DialogueUI))
     //{
     //    DialogueUISpawnSystem.RemoveUI(EntityManager, character);
     //}
     else if (gameUIIndex == ((byte)PlayerUIType.MapUI))
     {
         MapUISpawnSystem.RemoveUI(EntityManager, character);
     }
     else if (gameUIIndex == ((byte)PlayerUIType.SkillbookUI))
     {
         SkillbookUISpawnSystem.RemoveUI(EntityManager, character);
     }
     else if (gameUIIndex == ((byte)PlayerUIType.EquipmentUI))
     {
         EquipmentUISpawnSystem.RemoveUI(World.EntityManager, character);
     }
     else if (gameUIIndex == ((byte)PlayerUIType.Menu))
     {
         MenuSpawnSystem.RemoveUI(World.EntityManager, character);
     }
 }