Пример #1
0
    // Use this for initialization
    void Start()
    {
//		timeWarrior = 1;
        maxEnemies      = 4;
        lvlPlayerChange = 1;
        player          = GameObject.FindGameObjectWithTag("Player").GetComponent <Player> ();

        warriorInvoker                     = gameObject.AddComponent <InvokerEnemy>();
        warriorInvoker.timeEnemy           = 4;
        warriorInvoker.minRamdonTimerEnemy = 3.5f;

        archerInvoker                     = gameObject.AddComponent <InvokerEnemy> ();
        archerInvoker.timeEnemy           = 6;
        archerInvoker.minRamdonTimerEnemy = 4.5f;

        assassinInvoker                     = gameObject.AddComponent <InvokerEnemy> ();
        assassinInvoker.timeEnemy           = 7;
        assassinInvoker.minRamdonTimerEnemy = 5.5f;

        tankInvoker                     = gameObject.AddComponent <InvokerEnemy> ();
        tankInvoker.timeEnemy           = 8;
        tankInvoker.minRamdonTimerEnemy = 7.5f;

        cartInvoker                     = gameObject.AddComponent <InvokerEnemy> ();
        cartInvoker.timeEnemy           = 10;
        cartInvoker.minRamdonTimerEnemy = 8.5f;

        enemies = new List <GameObject>();
        ControllerDamagePopup.Initialize();
    }
Пример #2
0
 void SetMinTimerInvoker(InvokerEnemy enemy)
 {
     if (enemy.minRamdonTimerEnemy > 2.5f)
     {
         enemy.minRamdonTimerEnemy -= 0.1f;
     }
     else if (enemy.minRamdonTimerEnemy < 2.5f && enemy.minRamdonTimerEnemy >= 1.5f)
     {
         enemy.minRamdonTimerEnemy -= 0.05f;
     }
 }