Friday, August 8, 2014

Event listeners - player controls

I've made a new type of event listener which triggers an action when player presses a keyboard key or mouse button. Still need to make it block/unblock player controls, so the player sprite doesn't move if it controls something else, but whatever...

As an example I made a vehicle which can go left, right and break, all via event listeners and actions that control a Box2D joint motor. It's all done in the map editor.


No comments:

Post a Comment