void Update() { if (Object.getLevel() == 0 && !textAltered) { textbox.text += " Lvl: Max "; textAltered = true; } else if (Object.getLevel() != 0 && !textAltered) { textbox.text += " Lvl: " + (defaultLevel - Object.getLevel()); textAltered = true; } }
public void GameIsOver() { isGameOver = true; if (baby.getLevel() == 0 && wood.getLevel() == 0 && egg.getLevel() == 0 && fish.getLevel() == 0) { isCorrectOrder = true; } }
IEnumerator playLevelUpAnim(Objectsdort currentObject) { //coroutine yaptım StartCoroutine(currentObject.setDecreaseLevel()); yield return(new WaitForSeconds(1.55f)); if (currentObject.count != 100 && currentObject.getLevel() >= 0) { PopUp.transform.position = currentObject.transform.position; PopUp.transform.Translate(-3.98f, 3.23f, 0f); PopUp.gameObject.SetActive(true); yield return(new WaitForSeconds(2.9f)); PopUp.gameObject.SetActive(false); } }