|
|
@ -21,9 +21,9 @@ namespace SemiColinGames { |
|
|
|
Vector2 motion = Vector2.Multiply(input[0].Motion, modelTime * speed); |
|
|
|
Position = Vector2.Add(Position, motion); |
|
|
|
Position.X = Math.Max(Position.X, HalfSize.X); |
|
|
|
Position.X = Math.Min(Position.X, worldBounds.Size.X - HalfSize.X); |
|
|
|
Position.X = Math.Min(Position.X, worldBounds.Width - HalfSize.X); |
|
|
|
Position.Y = Math.Max(Position.Y, HalfSize.Y); |
|
|
|
Position.Y = Math.Min(Position.Y, worldBounds.Size.Y - HalfSize.Y); |
|
|
|
Position.Y = Math.Min(Position.Y, worldBounds.Height - HalfSize.Y); |
|
|
|
|
|
|
|
// Check whether we need to add new shots.
|
|
|
|
shotCooldown -= modelTime; |
|
|
|