public void Draw(SimpleRenderTarget simpleRenderTarget) { foreach (var sprite in spriteList) { simpleRenderTarget.DrawBitmap(sprite.Texture, sprite.FrameSize, sprite.Position, sprite.TrimAreaList[sprite.FrameIndex]); } }
public void Draw(SimpleRenderTarget simpleRenderTarget) { var game = Game.Instance; var messages = new string[] { $"FPS:{fps:F1}", $"TotalRunTime:{game.UpdateDispatcher.TotalSeconds:F3}", $"SpritesCount:{game.SpriteManager.SpriteCount}", $"MousePosition:({game.InputManager.MousePositionX},{game.InputManager.MousePositionY})", $"IUpdatableCount:{game.UpdateDispatcher.UpdatableListCount}" }; for (int i = 0; i < messages.Length; i++) { simpleRenderTarget.DrawText(messages[i], defaultTextFormat, defaultRectangleFList[i], defaultBrush); } }
public RenderArgs(RenderTarget target, float dt) { SimpleRenderTarget = new SimpleRenderTarget(target); DeltaTime = dt; }