Creating Movable Game Objects

There are some properties that are shared between moving objects, but this is not applicable to static objects such as platforms. We need a definition for moving objects that extends the GameObject class.

  • Define a movable GameObject class and a hero class
  • Override the value in the GameObject class for the hero class
  • Set the registration point of the hero to bottom-center to make it easy for calculation