-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Implement an ActionPerformed method so that the orc animation switches to "jump" (for the duration of the jump animation) when the "J" key is pressed.
This might involved refactoring the Model/View such that the actions aren't set in the View (based on the model) but rather in the Model itself. Need to discuss the best possible solution here.
Right now you can see that the orc's action is determined in the View's update method. Is this wrong? Should we determine the orc's action in the model update method?
If we choose to keep the orc's action in the View, then we can simply set a flag in the model (e.g. model.isJumping).
Another thing to note is that the Jump animation takes some amount of time that we don't necessarily know offhand. We should consider some way to keep a tick-counter in the model so we can determine when the jump action should be turned off.