Skip to content

Implement Jumping #2

@rlyshw

Description

@rlyshw

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions