Beispiel #1
0
    private void SetEnemyRockets()
    {
        switch (rocketindex)
        {
        case 1: RI.PooledRockets(false, 0, RI.rocket_pools[1].pooled_rockets,
                                 RI.explosion_pools[1].pooled_explosions); break; //small rocket

        case 2: RI.PooledRockets(false, 1, RI.rocket_pools[2].pooled_rockets,
                                 RI.explosion_pools[2].pooled_explosions); break; //medium rocket

        case 3: RI.PooledRockets(false, 2, RI.rocket_pools[3].pooled_rockets,
                                 RI.explosion_pools[3].pooled_explosions); break; //big rocket
        }
    }
Beispiel #2
0
 public void SetPlayerFiring()
 {
     RI = RocketInventory.Instance;
     RI.PooledRockets(true, rocket_index, RI.rocket_pools[0].pooled_rockets, RI.explosion_pools[0].pooled_explosions);
     rocket_label = RocketsUI.GetComponent <TextMeshProUGUI>();
     rocket_image = RocketsUI.transform.GetChild(0).GetComponent <Image>();
     rocket_index = 0;
 }
Beispiel #3
0
    private void ChangeRocket()
    {
        rocket_index = (rocket_index != 2) ? rocket_index + 1 : 0;

        RI.PooledRockets(true, rocket_index, RI.rocket_pools[0].pooled_rockets,
                         RI.explosion_pools[0].pooled_explosions);

        EnemyGeneration.Instance.CollectGravityRockets();
        rocket_label.text   = RI.playerinv[rocket_index].rocketname;
        cooldownincrease    = RI.playerinv[rocket_index].rocketcooldown;
        rocket_image.sprite = RI.playerinv[rocket_index].rocketpic;
    }