|
|
@ -157,7 +157,7 @@ namespace SemiColinGames { |
|
|
|
position.X = Math.Max(position.X, 0 + spriteWidth); |
|
|
|
} |
|
|
|
|
|
|
|
private int spritePosition(Pose pose, GameTime time) { |
|
|
|
private int SpritePosition(Pose pose, GameTime time) { |
|
|
|
int frameNum = (time.TotalGameTime.Milliseconds / 125) % 4; |
|
|
|
if (frameNum == 3) { |
|
|
|
frameNum = 1; |
|
|
@ -192,7 +192,7 @@ namespace SemiColinGames { |
|
|
|
} |
|
|
|
|
|
|
|
public void Draw(SpriteBatch spriteBatch, Camera camera, GameTime time) { |
|
|
|
int index = spritePosition(pose, time); |
|
|
|
int index = SpritePosition(pose, time); |
|
|
|
Rectangle textureSource = new Rectangle(index * spriteSize, 0, spriteSize, spriteSize); |
|
|
|
Vector2 spriteCenter = new Vector2(spriteSize / 2, spriteSize / 2); |
|
|
|
SpriteEffects effect = facing == Facing.Right ? |
|
|
|