public void SetDisable() { helicopter = GameObject.FindWithTag("Player"); if (helicopter != null) { RestartButton.SetActive(false); StoreButton.SetActive(false); AdButton.SetActive(false); text.color = new Color(0, 0, 0, 0); } }
void Start() { helicopter = GameObject.FindWithTag("Player"); RestartButton.SetActive(false); StoreButton.SetActive(false); AdButton.SetActive(false); text = GetComponent <Text>(); text.color = new Color(0, 0, 0, 0); }
public void FinishGame() { ingamePanel.SetActive(false); if (AdButton.AdAvailable()) { adPanel.SetActive(true); } else { finish.SetActive(true); } }
void Update() { helicopter = GameObject.FindWithTag("Player"); if (helicopter != null) { coins = PlayerPrefs.GetInt("TotalCoins"); RestartButton.SetActive(false); StoreButton.SetActive(false); AdButton.SetActive(false); text.color = new Color(0, 0, 0, 0); } else if (helicopter == null) { text.color = new Color(0, 0, 0, 1); text.text = "Game Over\nYour Score:\n" + coins + " Coins"; RestartButton.SetActive(true); StoreButton.SetActive(true); AdButton.SetActive(true); } }