uh you can switch players now

This commit is contained in:
Sylvia 2026-06-11 02:35:57 -07:00
parent a0bfc600ef
commit cb4470f2d6
11 changed files with 582 additions and 235 deletions

View file

@ -16,11 +16,15 @@ public class Player : Entity
private void FixedUpdate()
{
Vector2 movement = new Vector2(Input.GetAxis("Horizontal") * stats.speed, stats.rb.linearVelocityY);
if (Input.GetKeyDown(KeyCode.Space) && stats.OnGround())
if (!stats.isStalled)
{
movement.y = stats.jumpPower;
Vector2 movement = new Vector2(Input.GetAxis("Horizontal") * stats.speed, stats.rb.linearVelocityY);
if (Input.GetKeyDown(KeyCode.Space) && stats.OnGround())
{
movement.y = stats.jumpPower;
}
FlipSprite(movement);
stats.rb.linearVelocity = movement;
}
stats.rb.linearVelocity = movement;
}
}