|
|
@ -24,7 +24,7 @@ namespace SemiColinGames { |
|
|
|
public void Enter() { |
|
|
|
} |
|
|
|
|
|
|
|
public string Update(float modelTime, World world, History<Input> input) { |
|
|
|
public string Update(float modelTime, SneakWorld world, History<Input> input) { |
|
|
|
result = new Vector2() { |
|
|
|
X = input[0].Motion.X * moveSpeed * modelTime |
|
|
|
}; |
|
|
@ -120,7 +120,7 @@ namespace SemiColinGames { |
|
|
|
|
|
|
|
public Vector2 Position { get { return position; } } |
|
|
|
|
|
|
|
public void Update(float modelTime, World world, History<Input> input) { |
|
|
|
public void Update(float modelTime, SneakWorld world, History<Input> input) { |
|
|
|
AABB BoxOffset(Vector2 position, int yOffset) { |
|
|
|
return new AABB(new Vector2(position.X, position.Y + yOffset), halfSize); |
|
|
|
} |
|
|
@ -224,7 +224,7 @@ namespace SemiColinGames { |
|
|
|
} |
|
|
|
|
|
|
|
// Returns the desired (dx, dy) for the player to move this frame.
|
|
|
|
Vector2 HandleInput(float modelTime, World world, History<Input> input) { |
|
|
|
Vector2 HandleInput(float modelTime, SneakWorld world, History<Input> input) { |
|
|
|
fsm.Update(modelTime, world, input); |
|
|
|
// TODO: remove ugly cast.
|
|
|
|
return ((IPlayerState) fsm.State).Movement; |
|
|
|