add debug toasts & more shots at once

This commit is contained in:
Colin McMillen 2020-11-19 19:38:31 -05:00
parent 18f80f8a70
commit ed3dd73493
2 changed files with 16 additions and 5 deletions

View File

@ -85,6 +85,10 @@ namespace SemiColinGames {
SamplerState.PointClamp, DepthStencilState.Default,
RasterizerState.CullNone);
spriteBatch.Draw(sceneTarget, drawRect, Color.White);
// Draw debug toasts.
Debug.DrawToasts(spriteBatch);
spriteBatch.End();
}
}

View File

@ -78,15 +78,22 @@ namespace SemiColinGames {
if (input[0].Attack && !input[1].Attack) {
Vector2 shotOffset = new Vector2(12, 2);
Vector2 shotPosition = Vector2.Add(Player.Position, shotOffset);
Shots.Add(new Shot(shotPosition, new Vector2(300, 40)));
Shots.Add(new Shot(shotPosition, new Vector2(300, 20)));
Shots.Add(new Shot(shotPosition, new Vector2(300, 0)));
Shots.Add(new Shot(shotPosition, new Vector2(300, -20)));
Shots.Add(new Shot(shotPosition, new Vector2(300, -50)));
Shots.Add(new Shot(shotPosition, new Vector2(300, -40)));
new Shot(shotPosition, Vector2.Zero);
Shots.Add(new Shot(shotPosition, new Vector2(300, -30)));
Shots.Add(new Shot(shotPosition, new Vector2(300, -20)));
Shots.Add(new Shot(shotPosition, new Vector2(300, -10)));
Shots.Add(new Shot(shotPosition, new Vector2(300, 0)));
Shots.Add(new Shot(shotPosition, new Vector2(300, 10)));
Shots.Add(new Shot(shotPosition, new Vector2(300, 20)));
Shots.Add(new Shot(shotPosition, new Vector2(300, 30)));
Shots.Add(new Shot(shotPosition, new Vector2(300, 40)));
Shots.Add(new Shot(shotPosition, new Vector2(300, 50)));
}
Shots.RemoveAll(shot => !Bounds.Intersects(shot.Bounds));
Debug.AddToast("shots: " + Shots.Count);
}
}
}