void Start() { Debug.Log("game over scene"); LanguageSupport langSupport = FindObjectOfType <LanguageSupport>(); gameOverText.text = langSupport.GetText("gameover"); tryAgainText.text = langSupport.GetText("tryagain"); timesLeftTexT.gameObject.SetActive(false); lifeEngine = FindObjectOfType <LifeEngine>(); lifeEngine.SetActiveScene("gameover"); }
void Start() { langSupport = FindObjectOfType <LanguageSupport>(); textSpawner = FindObjectOfType <TextSpawner>(); DontDestroyOnLoad(textSpawner); continueText.text = langSupport.GetText("continue"); continueCanvas.gameObject.SetActive(false); }
public void WriteBonus(CollectableItem bonus) { string collectableText = langSupport.GetText(bonus.collectableType.ToString()); if (bonus.collectableType != CollectableItem.CollectableType.CoinScore) { bonusText.text = collectableText; bonusImage.enabled = true; bonusImage.sprite = Resources.Load <Sprite>(bonusResourcesPath + bonus.collectableType.ToString()); bonusSlider.value = 1; bonusSlider.gameObject.SetActive(true); } cloneTextIndex = collectableText.IndexOf("(Clone)"); if (cloneTextIndex > 0) { collectableText = collectableText.Substring(0, cloneTextIndex); } textSpawner.spawnText(collectableText); }