Manage and draw the player
Methods
(static) draw()
Draw the character
- If currently being damaged, flash a different colour based on the level background
- If currently eating, flash a different colour based on the eaten obstacle
- Draw the tail/friction effect
- At faster speeds, distort the circular shape into an ellipse to suggest stretching in the direction of travel
- Add any extra layers such as hats etc
(static) init()
Set a neutral start position
(static) setupForLevel()
Set colour, health, size etc according to the current level configuration
(static) update()
Update some properties of the player
- The position to be drawn at
- If currently damaged, or eating, decrement the counters for those states
(static) updateSizes()
Update some variables to fit the current layout