示例#1
0
 public void Draw(SimpleRenderTarget simpleRenderTarget)
 {
     foreach (var sprite in spriteList) {
         simpleRenderTarget.DrawBitmap(sprite.Texture, sprite.FrameSize, sprite.Position,
             sprite.TrimAreaList[sprite.FrameIndex]);
     }
 }
示例#2
0
 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);
     }
 }
示例#3
0
 public RenderArgs(RenderTarget target, float dt)
 {
     SimpleRenderTarget = new SimpleRenderTarget(target);
     DeltaTime = dt;
 }