Esempio n. 1
0
    public void KnockbackProcess()
    {
        playerMove.AddPlayerPosition(new Vector2(horizontalAcceleration * direction, verticalAcceleration));
        verticalAcceleration -= GRAVITY; // 올라가는 속도 점점 느려지게 수직 가속도 감소.

        verticalAcceleration = Mathf.Clamp(verticalAcceleration, -0.35f, 0.35f);

        if (jumpInfomation.JumpState == JumpInfomation.JumpStateType.Up && verticalAcceleration <= 0.0f)
        {
            jumpInfomation.JumpState = JumpInfomation.JumpStateType.Down;
        }

        if (jumpInfomation.JumpState == JumpInfomation.JumpStateType.None)
        {
            KnockbackFlag = false;
        }
    }