// game loop... 120fps private void Timer_Tick(object sender, object e) { if (UpPressed) { butterfly.Move(); } // rotate if (LeftPressed) { butterfly.Rotate(-1); // -1 == left } if (RightPressed) { butterfly.Rotate(1); // 1 == right } // collision... flower. CheckCollision(); //update butterfly.UpdatePosition(); }
// game loop private void Timer_Tick(object sender, object e) { // move butterfly if (UpPressed) { butterfly.Move(); } // rotate butterfly if (LeftPressed) { butterfly.Rotate(-1); } if (RightPressed) { butterfly.Rotate(1); } // update butterfly location butterfly.SetLocation(); // collision butterfly with flowers CheckCollision(); }
// Game loop private void Timer_Tick(object sender, object e) { // Move Butterfly if (UpPressed) { butterfly.Move(); } // Rotate Butterfly //Debug.WriteLine(LeftPressed); // DEBUGGAUS if (LeftPressed) { butterfly.Rotate(-1); } if (RightPressed) { butterfly.Rotate(1); } // Update Butterfly location butterfly.SetLocation(); // Collision Butterfly with flowers CheckCollission(); }