void makeZeroLevelsNotAvailableForLevelUp() { Objectsdort[] art = new Objectsdort[] { baby, wood, egg, fish }; for (int i = 0; i < 4; i++) { if (art [i].getLevel() == 0) { art [i].deactivateObject(); } } }
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); } }