I have now made an InputManager and a GameObject Manager, I'm not sure I have constructed and implemented them the right way but it kind of works right now. I have also played around with the States. Its hard to understand what goes where, for example. where do I put UpdateEvents? Should that go in the Engine class or should i write an UpdateEvent method for each GameState? Right now I put it in the InputManager in a method called UpdateInputs, This method is called in each state.
I think i will put it in each State instead. for example:
The MenuState might only take mouse events while the Gamestate is played with keyboard. loading screens or game over screens dont take any event at all except maybe quit by X in the window.
I have also started with the collider class and next i will work on drawing the gamestate.
I'm not sure how i will go about it. I feel that i want to draw the background first and the actual boxes you shoot down should be drawn after the background. Since i want to be able to change levels.
or maybe I will just load everything after each level when changing states.
I guess learning programming is a lot of trial and error.
No comments:
Post a Comment