internal static void Draw() { MDraw.Begin(); //Root.Draw(); //StateManager.Draw(); MDraw.End(); MDraw.Test(); }
public override void Draw(GameTime t) { if (!Visible) { return; } MDraw.Begin(); MDraw.Write("Rebind Input Source Layout", new Vector2(20f, 20f), Color.White); float leftPos = 50f; float x1 = 400f; float x2 = 600f; float shift = 5f; var pos = new Vector2(0, 90f); Color color; pos.X = x1; MDraw.Write("Player 1", pos, Color.White); pos.X = x2; MDraw.Write("Player 2", pos, Color.White); pos.X = leftPos; pos.Y += 80f; if (SelectionIndex == 0) { pos.X += shift; } color = SelectionIndex == 0 ? Color.Yellow : Color.White; MDraw.Write("Swap Keyboard", pos, color); pos.X = Toggles.keyboardIsPlayer2 ? x2 : x1; MDraw.Write("Keyboard", pos, color); pos.X = leftPos; pos.Y += 60f; color = SelectionIndex == 1 ? Color.Yellow : Color.White; if (SelectionIndex == 1) { pos.X += shift; } MDraw.Write("Swap Gamepad", pos, color); pos.X = Toggles.gamepad1IsPlayer2 ? x2 : x1; MDraw.Write("Gamepad1", pos, color); pos.X = Toggles.gamepad1IsPlayer2 ? x1 : x2; MDraw.Write("Gamepad2", pos, color); MDraw.End(); }
public static void Draw() { MDraw.Begin(); foreach (var rb in AllRigidbodies) { // draw velocity MDraw.DrawLine(rb.Entity.Position, rb.Entity.Position + rb.Velocity / Time.DeltaTime, Color.Gray); MDraw.DrawPoint(rb.Entity.Position + rb.Velocity / Time.DeltaTime, Color.Gray); } MDraw.End(); }