void OnUnitSpawn(UnitSpawnEventInfo unitSpawnEventInfo) { Debug.Log("BattlefieldController Alerted to unit Spawned: " + unitSpawnEventInfo.UnitGO.name); unitSpawnEventInfo.UnitSlotGO.GetComponent <UnitSlot>().SetIsOccupied(true); unitSpawnEventInfo.UnitSlotGO.GetComponent <UnitSlot>().SetOccupyingCharacter(unitSpawnEventInfo.UnitGO); }
void UnregisterEventCallbacks() { DeathEventInfo.UnregisterListener(OnUnitDied); HPChangedEventInfo.UnregisterListener(OnHPChange); MPChangedEventInfo.UnregisterListener(OnMPChange); UnitSpawnEventInfo.UnregisterListener(OnUnitSpawn); CharacterTurnOverEventInfo.UnregisterListener(OnTurnOver); }
public void UnregisterEventCallbacks() { SelectedObjectEventInfo.UnregisterListener(OnHighlightSelected); CharacterReadyEventInfo.UnregisterListener(OnCharacterReady); BattleWonEventInfo.UnregisterListener(OnBattleWon); HPChangedEventInfo.UnregisterListener(OnHPChange); MPChangedEventInfo.UnregisterListener(OnMPChange); HeroDeathEventInfo.UnregisterListener(OnHeroDeath); DeathEventInfo.UnregisterListener(OnUnitDied); UnitSpawnEventInfo.UnregisterListener(OnUnitSpawn); }
void OnUnitSpawn(UnitSpawnEventInfo unitSpawnEventInfo) { Debug.Log("CombatManager Alerted to unit Spawned: " + unitSpawnEventInfo.UnitGO.name); // We only care about freindly monsters at this point if (unitSpawnEventInfo.UnitGO.GetComponent <Character>().GetTeam == TeamName.Friendly) { // Also, we only care about monsters in out playerMonsterInfoList (i.e NOT the hero) <- this is because the hero can not be summoned if (playerMonsterinfoList.ContainsKey(unitSpawnEventInfo.UnitGO.GetComponent <Character>().GetUniqueID)) { playerMonsterinfoList[unitSpawnEventInfo.UnitGO.GetComponent <Character>().GetUniqueID].IsSummoned = true; // Update Summon Menu ActionMenu menu = monsterSpawner.PopulateHeroSummonMenu(GameManager.Instance.GetHeroData.heroWrapper.HeroData.HeroInfo); playerCharacters[GameManager.Instance.GetHeroData.heroWrapper.HeroData.HeroInfo.PlayerName].GetComponent <Hero>().SetMenu(menu); } } // Add to character order list - All Charcaters AddToCharacterTurnOrder(unitSpawnEventInfo.UnitGO); }
void OnUnitSpawn(UnitSpawnEventInfo unitSpawnEventInfo) { Debug.Log("BattleUIController Alerted to unit Spawned: " + unitSpawnEventInfo.UnitGO.name); AddToCharacterPanel(unitSpawnEventInfo.UnitGO); }
public void UnregisterEventCallbacks() { UnitSpawnEventInfo.UnregisterListener(OnUnitSpawn); DeathEventInfo.UnregisterListener(OnUnitDied); }
void RegisterEventCallbacks() { UnitSpawnEventInfo.RegisterListener(OnUnitSpawn); DeathEventInfo.RegisterListener(OnUnitDied); }