Exemplo n.º 1
0
    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);
    }
Exemplo n.º 2
0
    private void Awake()
    {
        GameObject phaseManager = GameObject.FindGameObjectWithTag("Phase_Manager");

        scoreRecorder = phaseManager.GetComponent <ScoreRecorder>();
        phaseData     = phaseManager.GetComponent <RunTimePhaseData>();
    }
Exemplo n.º 3
0
    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);
    }
Exemplo n.º 5
0
    private void Start()
    {
        phaseData = GetComponent <RunTimePhaseData>();

        heroDeathEvent.RegisterListener(HandleHeroDeath);
        troopDeathEvent.RegisterListener(HandleTroopDeath);
        towerDestroyedEvent.RegisterListener(HandleTowerDestruction);

        gameEndEvent.RegisterListener(HandleFinalWaveEnd);
    }