示例#1
0
    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);

        }
    }
示例#2
0
 public void setFlowerDying(bool destorySelf)
 {
     flowerLevel = FlowerLevels.levelDying;
     StartCoroutine( flowerDestory(destorySelf) );
 }
示例#3
0
    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);
    }