Files
MonoGame.Extended/Source/Demos/Platformer/Components/Player.cs
T
2018-06-02 22:30:40 +10:00

29 lines
596 B
C#

using MonoGame.Extended.Entities;
namespace Platformer.Components
{
public enum Facing
{
Left, Right
}
public enum State
{
Idle,
Kicking,
Punching,
Jumping,
Falling,
Walking,
Cool
}
[EntityComponent]
public class Player
{
public Facing Facing { get; set; } = Facing.Right;
public State State { get; set; }
public bool IsAttacking => State == State.Kicking || State == State.Punching;
public bool CanJump => State == State.Idle || State == State.Walking;
}
}