Esempio n. 1
0
 void OnTriggerEnter2D(Collider2D col)
 {
     if (col.gameObject.tag == "Hero")
     {
         col.gameObject.SetActive(false);
         MinesGo.Stop();
         TransportGo.Stop();
         AlienGo.Stop();
         SearchVariable.pool.Laser_off();
         /*if (SearchVariable.controller.lvl() >= 3)*/
         TurretGo.Stop();
         Lose.WIN = true;
     }
 }
Esempio n. 2
0
    public void Random_Action()
    {
        if (rand != 10)
        {
            Random_Action_Return(rand);
        }

        rand      = Random.Range(0, range);
        curr_time = repeat_time;
        go_timer  = true;
        switch (rand + 1)
        {
        case 1:
            heroGo.timeBetweenFires = heroGo.timeBetweenFires / 2;
            break;

        case 2:
            heroGo.max_speed_set(8f);
            break;

        case 3:
            heroGo.Shield_On();
            break;

        case 4:
            MinesGo.Take_Speed();
            break;

        case 5:
            TransportGo.Add_Speed();
            break;

        case 6:
            TurretGo.Add_Speed();
            break;

        case 7:
            ;
            break;
        }
    }
Esempio n. 3
0
    void Random_Action_Return(int choise)
    {
        switch (choise + 1)
        {
        case 1:
            heroGo.timeBetweenFires = heroGo.timeBetweenFires * 2;
            break;

        case 2:
            heroGo.max_speed_set(4f);
            if (heroGo.cur_speed() > 4f)
            {
                heroGo.cur_speed_set(4f);
            }
            break;

        case 3:
            heroGo.Shield_Off();
            break;

        case 4:
            MinesGo.Add_Speed();
            break;

        case 5:
            TransportGo.Take_Speed();
            break;

        case 6:
            TurretGo.Take_Speed();
            break;

        case 7:
            ;
            break;
        }
    }