Ejemplo n.º 1
0
 void IPlayerState.EnterState(PlayerMovementRB player)
 {
     player.anim.SetBool("Falling", true);
     player.SetCrouching(true);
     // Minimum friction so you don't stick to walls while falling
     player.col.material.dynamicFriction = 0f;
 }
Ejemplo n.º 2
0
 void IPlayerState.EnterState(PlayerMovementRB player)
 {
     // TODO manually set the player's Y-position
     //player.rb.useGravity = false;
     //jumpTimer.StartTiming();
     if (player.controlState == ControlState.CONTROLLABLE)
     {
         player.SetCrouching(false);
         player.anim.SetBool("Falling", true);
         player.col.material.dynamicFriction = 0f;
         player.rb.AddForce(jumpForce, ForceMode.VelocityChange);
     }
 }
Ejemplo n.º 3
0
 void IPlayerState.EnterState(PlayerMovementRB player)
 {
     player.anim.SetFloat("Speed", 0f);
     player.SetCrouching(true);
 }
Ejemplo n.º 4
0
 void IPlayerState.EnterState(PlayerMovementRB player)
 {
     player.anim.SetFloat("Speed", player.currentSpeed);
     player.SetCrouching(false);
 }
Ejemplo n.º 5
0
 void IPlayerState.EnterState(PlayerMovementRB player)
 {
     player.SetCrouching(true);
 }