void levelUp() { if(flowerLevel == FlowerLevels.levelOne) { flowerLevel = FlowerLevels.levelTwo; resetLevels(2); flowerSmall.animation.Play("flower_off"); flowerLevelUp.gameObject.SetActive(true); flowerLevelUp.animation.Play(); flowerLarge.gameObject.SetActive(true); flowerLarge.animation.Play(); StartCoroutine( hideObject(1.0F, flowerSmall) ); levelParticle(true); } }
public void setFlowerDying(bool destorySelf) { flowerLevel = FlowerLevels.levelDying; StartCoroutine( flowerDestory(destorySelf) ); }
IEnumerator flowerDestory(bool destorySelf) { //Debug.Log("Flower Destroy"); flowerSmall.animation.Play("flower_off"); yield return new WaitForSeconds(0.5F); flowerLevel = FlowerLevels.levelDead; if(destorySelf) { Destroy(gameObject); } //Destroy(gameObject); }