Skip to content

Character

Alex Land edited this page Aug 16, 2018 · 1 revision

This class is a data structure containing information relevant for a character in the game, along with methods for handling that data.

Enums

enum CharacterType

An enum defining a mapping between the name of a character and its internal icon ID.

enum CharacterState

An enum defining the possible states a character can be in.

Fields

private Marker marker

The map marker for the character.

private CharacterType characterType

The character type.

private CharacterState characterState

The character state.

Methods

Character(CharacterType characterType, CharacterState characterState, Marker marker)

Constructor. Assigns parameters to their respective fields.

boolean isPacman()

Convenience method for asking if the current character is Pacman.

void updateLocation(LatLng characterLocation)

Update the location of the character's marker.

void updateState(CharacterState characterState)

Update the state of the character.

void updateMarkerVisibility(boolean isVisible)

Update the visibility of the character's marker.

Clone this wiki locally