Exemplo n.º 1
0
    IEnumerator PlayerGetHurtEffect()
    {
        //  trigger twinkle animation
        m_Animator.SetTrigger(m_HashHurt);
        m_PlayerControl2D.DisableMovement();
        m_PlayerDamageable.EnableInvulnerability();

        yield return(new WaitForSeconds(m_HurtTwinkleDuration));

        //  back to idle
        m_PlayerControl2D.ResetPosToOrigin();
        m_PlayerControl2D.EnableMovement();
        m_PlayerDamageable.DisableInvulnerability();
    }