Ejemplo n.º 1
0
 private void Start()
 {
     gm  = GameManager.getInstance();
     pm  = PlayerManager.getInstance();
     em  = EnemiesManager.getInstance();
     wsm = WaveSpawnerManager.getInstance();
     gm.AIStartTurnEvent += takeTurn;
     initReferences();
 }
Ejemplo n.º 2
0
 protected virtual void Start()
 {
     state = State.Exit;
     gm    = GameManager.getInstance();
     pm    = PlayerManager.getInstance();
     em    = EnemiesManager.getInstance();
     nva   = GetComponent <NavMeshAgent>();
     nva.stoppingDistance = 1;
     nva.speed            = speed.getStart();
 }
Ejemplo n.º 3
0
 void beaconMoney()
 {
     if (isPlayer)
     {
         PlayerManager.getInstance().changeMoney((int)beaconMoneyPerRound.get());
     }
     else
     {
         EnemiesManager.getInstance().changeMoney((int)beaconMoneyPerRound.get());
     }
 }
Ejemplo n.º 4
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else if (instance != this)
     {
         Destroy(gameObject);
     }
 }
Ejemplo n.º 5
0
 public override void activate(Turret turret)
 {
     if (turret.isPlayer)
     {
         PlayerManager.getInstance().moneyAmplify += money;
         PlayerManager.getInstance().expAmplify   += exp;
     }
     else
     {
         EnemiesManager.getInstance().moneyAmplify += money + exp;
     }
 }
Ejemplo n.º 6
0
        public override void Start()
        {
            base.Start();
            pm = PlayerManager.getInstance();
            em = EnemiesManager.getInstance();
            int   pmDeltaLives = pm.baseHealth - pm.lastBaseHealth;
            int   emDeltaLives = em.baseHealth - em.lastBaseHealth;
            float multiplier   = Mathf.Clamp((pmDeltaLives - emDeltaLives) / 4f, 0f, 10f);
            float handicap     = GameManager.getInstance().difficulty == Difficulty.hard ? 0f : 0f;

            health.setStart(health.getStart() + health.getStart() * (GameManager.getInstance().waveIndex) * (6f + handicap + multiplier) / 100f);
            armor.setStart(armor.getStart() + armor.getStart() * (GameManager.getInstance().waveIndex) * (6f + handicap + multiplier) / 100f);
            damage.setStart(damage.getStart() + damage.getStart() * (GameManager.getInstance().waveIndex) * (6f + handicap + multiplier) / 100f);
            initialize();
            pm.alliesAlive++;
        }
Ejemplo n.º 7
0
        private void Start()
        {
            gm = GameManager.getInstance();
            pm = PlayerManager.getInstance();
            em = EnemiesManager.getInstance();
            gm.GameOverEvent      += disableScript;
            gm.StartNextWaveEvent += startNextWave;
            gm.EndWaveEvent       += endWave;
            gm.AIStartTurnEvent   += retrieveWaveComposition;
            minionManagement       = MinionManagementUI.getInstance();

            spawners = new WaveSpawner[spawnPoints.Length];
            for (int i = 0; i < spawners.Length; i++)
            {
                spawners[i] = spawnPoints[i].GetComponent <WaveSpawner>();
            }
        }
Ejemplo n.º 8
0
        private void Start()
        {
            pm = PlayerManager.getInstance();
            em = EnemiesManager.getInstance();

            difficultyContainer = GameObject.FindGameObjectWithTag("Difficulty");
            if (difficultyContainer != null)
            {
                DifficultySelection ds = difficultyContainer.GetComponent <DifficultySelection>();
                difficulty = ds.difficulty;
            }
            else
            {
                difficulty = Difficulty.hard;
            }

            Debug.Log("Difficulty: " + difficulty);

            Time.timeScale = 1;
            waveIndex      = 0;
            gameState      = GameState.Build;
        }
Ejemplo n.º 9
0
 private void Start()
 {
     pm = PlayerManager.getInstance();
     em = EnemiesManager.getInstance();
 }
Ejemplo n.º 10
0
 public void init()
 {
     gm = GameManager.getInstance();
     pm = PlayerManager.getInstance();
     em = EnemiesManager.getInstance();
 }
Ejemplo n.º 11
0
 private void Start()
 {
     em = EnemiesManager.getInstance();
     ai = AI.getInstance();
     initialize();
 }