public void Tick(IWindow window, TickEventArgs e) { if (e.Tick > lastStepTime + StepTime) { lastStepTime = e.Tick; frameNumber++; if (frameNumber == Frames.Count) { frameNumber = 0; } } }
static void window_OnTick(object sender, TickEventArgs e) { IWindow window = sender as IWindow; scene.Tick(window, e); }
public void Tick(IWindow window, TickEventArgs e) { foreach (IDrawable item in items) { item.Tick(window, e); } }
static void window_OnDraw(object sender, TickEventArgs e) { IWindow window = sender as IWindow; // Do whatever drawing we want to do here window.Fill(Color.SkyBlue); scene.Draw(window); }