Beispiel #1
0
		public MainPage()
		{
			this.world = new World();
			this.renderer = new Win2dRenderer();

			this.InitializeComponent();

			this.canvas.TargetElapsedTime = new TimeSpan(166666); // 166666 for 60 FPS, 333333 for 30 FPS, 111111 for 90 FPS
		}
Beispiel #2
0
		public void Draw(Win2dRenderer renderer)
		{
			renderer.DrawRectangle(this.collider, Colors.Black);
		}
Beispiel #3
0
		public void Draw(Win2dRenderer renderer)
		{
			foreach (var drawable in this.drawables)
			{
				drawable.Draw(renderer);
			}

			renderer.DrawText(
				"FPS: " + this.framesPerSecond,
				10,
				10,
				Colors.White);
		}