Example #1
0
    IEnumerator MovementDash()
    {
        m_PlayerMoveScript.SetVelocityDash(m_DashVelocity);
        yield return(new WaitForSeconds(m_DurationDash));

        m_PlayerMoveScript.SetVelocityDash(m_NormalSpeed);
        m_PlayerMoveScript.SetPath(true);
        m_CanDashAgain = true;
        m_CurrentNbDash--;

        if (m_CurrentNbDash <= 0)
        {
            m_CanDash = false;
        }

        yield return(new WaitForSeconds(0.2f));

        m_Trail.enabled = false;
        yield return(null);
    }
Example #2
0
    IEnumerator MovementDash()
    {
        m_CurrentNbDash--;

        if (m_CurrentNbDash <= 0)
        {
            m_CanSuperDash = false;
            m_CanBeActiavtedByShockWave = true;
        }
        m_CanSuperDashAgain = true;
        m_PlayerMoveScript.SetVelocityDash(m_SuperDashVelocity);
        yield return(new WaitForSeconds(m_SuperDurationDash));

        m_PlayerMoveScript.SetVelocityDash(m_NormalSpeed);
        m_PlayerMoveScript.SetPath(true);



        yield return(new WaitForSeconds(0.2f));

        m_Trail.enabled = false;
        yield break;
    }