void LevelTwoFuel(RocketFly rocketScript) { switch (Random.Range(0, 5)) { case 0: rocketScript.Invoke("HyperJump", 0f); break; case 1: rocketScript.Invoke("Shield", 0f); break; } }
public void onButtonClick() { if (!isActive && rocketScript != null && fillArea >= 1f) { isActive = true; rocketScript.Invoke("Freeze", 0f); timeImage.gameObject.SetActive(true); timeImage.GetComponent <Image>().fillAmount = 1; StartCoroutine(ResourceTimeCoroutine()); fillArea -= 1f; } }