Example #1
0
 // Use this for initialization
 void Start()
 {
     godObject     = GameObject.FindGameObjectWithTag("GodObject");
     currentMehrio = godObject.GetComponent <GodScript>().lastMehrioState;
     rb            = gameObject.GetComponent <Rigidbody2D>();
     anim          = gameObject.GetComponent <Animator>();
 }
Example #2
0
    void mushroom()
    {
        switch (currentMehrio)
        {
        case PlayerWeaponStates.big:
        case PlayerWeaponStates.fireball:
            break;

        case PlayerWeaponStates.small:
            currentMehrio = PlayerWeaponStates.big;
            break;
        }
    }
Example #3
0
    void fireFlower()
    {
        switch (currentMehrio)
        {
        case PlayerWeaponStates.big:
            currentMehrio = PlayerWeaponStates.fireball;
            break;

        case PlayerWeaponStates.fireball:
            break;

        case PlayerWeaponStates.small:
            currentMehrio = PlayerWeaponStates.big;
            break;
        }
    }
Example #4
0
    void Hurt()
    {
        if (hurtCountdown <= 0f)
        {
            switch (currentMehrio)
            {
            case PlayerWeaponStates.big:
                currentMehrio = PlayerWeaponStates.small;
                break;

            case PlayerWeaponStates.fireball:
                currentMehrio = PlayerWeaponStates.big;
                break;

            case PlayerWeaponStates.small:
                Die();
                break;
            }
            hurtCountdown = hurtTimer;
        }
    }