public override void Draw() { ms.Draw(() => { //Graphics.Rectangle(DrawMode.Fill, 300, 200, 200, 200); Graphics.Draw(img); }); //Graphics.Draw(img, 200, 200); FPSGraph.Draw(); }
public override void Update(float dt) { FPSGraph.Update(dt); flag += (int)(dt * 1000); if (flag > 1000) { //GenerateTree(); flag = 0; } }
public static FPSGraph CreateGraph(float x, float y, float width = 200, float height = 90, float interval = 0.5f, bool draggable = true) { FPSGraph fpsGraph = new FPSGraph(); int wi = Mathf.FloorToInt(width / 2); for (int i = 0; i < wi; i++) { fpsGraph.m_vals.Enqueue(0); } fpsGraph.m_rect.x = x; fpsGraph.m_rect.y = y; fpsGraph.m_rect.Width = width; fpsGraph.m_rect.Height = height; fpsGraph.m_inverval = Mathf.Max(interval, 0.05f); fpsGraph.m_draggable = draggable; return(fpsGraph); }
public override void Update(float dt) { FPSGraph.Update(dt); }
public override void Draw() { FPSGraph.Draw(); }