Table of contents

  1. Player
    1. What does the Player class do?

Player

What does the Player class do?

The Player class (found in the Level package) is responsible for everything to do with the player character, which includes the player’s graphics, movement, and interactions with the map (such as collision detection).

In the gif below, everything the cat is doing and how it is interacting with the map is handled by the Player class.

game-screen-1.gif

The Player class extends off the GameObject class, so everything in the game object documentation applies to the Player class (any instance variables, animation setup, etc.)


Table of contents