![]() ![]() Chooses RGB Color of 87, 109, 120 at full opacity */ // Tells shapeRenderer to begin drawing filled shapes We will give these helper classes some descriptive names: GameWorld and GameRenderer.Ĭreate a new package called and create these two classes. Rendering these game objects should be the responsibility of another helper class.Īlright! We need two helper classes. Updating the game objects should be the responsibility of a helper class.ģ. GameScreen should only do one thing well, so.Ģ. To apply good object-oriented programming principles and design patterns, we should follow these guidelines:ġ. Secondly, we will render those game objects. In our game loop, we will do two things:įirstly, we will update all our game objects. Okay, so at this point it should be clear that our render method can be treated as our game loop. When I asked you to print 1/delta, I was asking you to print out how many times that the render method would be called in one second if that rate was sustained. The float delta is the number of seconds (usually a small fraction) that has passed since the last time that the render method was called.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |