private void Start() { bobAIGoldReserve = goldManager.BobAIGoldReserve; // TO:DO --> Use barracks in RuntimeData barracksPriorityList = new PriorityList <BarrackScriptableObject>(); foreach (BarrackScriptableObject barrack in barracks) { barracksPriorityList.Add(barrack, barrack.valCost); } // TO:DO --> Use the phaseData in RuntimeData RunTimePhaseData phaseData = GetComponent <RunTimePhaseData>(); if (phaseData.idtPhaseType == PhaseObjectives.ATTACK) { bobAIObjective = PhaseObjectives.DEFEND; } else { bobAIObjective = PhaseObjectives.ATTACK; } waveStartEvent.RegisterListener(HandleWaveStartEvent); towerDestroyedEvent.RegisterListener(HandleTowerDestroyedEvent); }
private void Awake() { GameObject phaseManager = GameObject.FindGameObjectWithTag("Phase_Manager"); scoreRecorder = phaseManager.GetComponent <ScoreRecorder>(); phaseData = phaseManager.GetComponent <RunTimePhaseData>(); }
private void Awake() { phaseData = GetComponent <RunTimePhaseData>(); playerGoldReserve = new PlayerGoldReserve(phaseData.valIniPlayerMoney, troopDeathEvent, removedTroopOnWaveEnd, goldChangeEvent); BobAIGoldReserve = new AIGoldReserve(phaseData.valIniIAMoney, troopDeathEvent, removedTroopOnWaveEnd); }
void Start() { phaseData = GetComponent <RunTimePhaseData>(); heroDeathEvent.RegisterListener(HandleHeroDeathVerification); finalTurnEndEvent.RegisterListener(HandleFinalTurnVerification); coreDestroyedEvent.RegisterListener(HandleCoreDestroyedVerification); }
private void Start() { phaseData = GetComponent <RunTimePhaseData>(); heroDeathEvent.RegisterListener(HandleHeroDeath); troopDeathEvent.RegisterListener(HandleTroopDeath); towerDestroyedEvent.RegisterListener(HandleTowerDestruction); gameEndEvent.RegisterListener(HandleFinalWaveEnd); }