Defining the Game Object Class

We have different kinds of game objects, such as the hero, platform, and obstacles. We need a class hierarchy with a generic class to share common properties.

  • Create a new file for the class
  • Create a GameObject class structure that extends the createJS container
  • Define common properties inside the GameObject initialize method