예제 #1
0
 public GoldReserve(int initialGold, TroopEvent minionDeadEvent, TroopEvent removedMinionAtWaveEndEvent)
 {
     currentGold     = initialGold;
     deadMinionEvent = minionDeadEvent;
     deadMinionEvent.RegisterListener(AddGold);
     this.removedMinionAtWaveEndEvent = removedMinionAtWaveEndEvent;
     this.removedMinionAtWaveEndEvent.RegisterListener(AddGoldOnWaveEnd);
 }
예제 #2
0
    private void Start()
    {
        phaseData = GetComponent <RunTimePhaseData>();

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

        gameEndEvent.RegisterListener(HandleFinalWaveEnd);
    }
예제 #3
0
    private void Start()
    {
        closeTargets = new List <Transform>();

        waveEndEvent.RegisterListener(OnWaveEnd);
        troopDeathEvent.RegisterListener(OnTroopDeath);
        towerDestroyedEvent.RegisterListener(OnTowerDestruction);
        attackingTowerEvent.RegisterListener(OnTroopAttackingTower);
        heroDeathEvent.RegisterListener(OnHeroDeath);
    }