void FixedUpdate()
    {
        if (GameplaySystem.JumpBtn)
        {
            if (Grounding)
            {
                anim.SetTrigger("jump");
                GameplaySystem.Jump(rb2D, jumpForce);
            }
        }
        anim.SetBool("grounding", Grounding);

        //GameplaySystem.MovementAddForce(rb2D, moveSpeed, maxVel, Grounding);
        GameplaySystem.MovementVelocity(rb2D, moveSpeed, maxVel);
    }
Beispiel #2
0
 void FixedUpdate()
 {
     if (GameplaySystem.JumpBtn)
     {
         if (Grounding)
         {
             GameManager.instance.GameData.PlayerPos = transform.position;
             //Debug.Log(Gamemanager.instance.gameData.Player);
             GameManager.instance.Save();
             anim.SetTrigger("jump");
             GameplaySystem.Jump(rb2D, jumpForce);
         }
     }
     anim.SetBool("grounding", Grounding);
     GameplaySystem.MovementVelocity(rb2D, moveSpeed, maxVel);
 }
Beispiel #3
0
 void FixedUpdate()
 {
     if (GameplaySystem.JumpBtn)
     {
         if (Grounding)
         {
             // anim.SetTrigger("jump");
             GameplaySystem.Jump(rb2D, jumpForce);
             doubleJump = true;
         }
         else if (!Grounding && doubleJump)
         {
             // anim.SetTrigger("jump2");
             GameplaySystem.Jump(rb2D, (jumpForce * 0.8f));
             doubleJump = false;
         }
     }
     anim.SetBool("grounding", Grounding);
 }