Class: PlayerSetup

PlayerSetup()

Class that controls the player setup state

Constructor

new PlayerSetup()

Constructor for the player setup mode.
Source:
See:

Methods

addPlayersToGameEngine()

Add all of the players to the game engine
Source:

clearAIButtons()

Untick all ai difficulty buttons
Source:

clearColorButtons()

Untick all color buttons
Source:

draw()

Draw mode player setup
Source:

drawAiButtons()

Draw the ai buttons
Source:

drawColorButtons()

Draw the color selection buttons
Source:

drawDangerStripes()

Draw danger stripes at the top and bottom of the screen
Source:

drawPlayerSelect()

Draw player select
Source:

drawTitle()

Draw the title
Source:

isAlphaNumeric(str)

Check if string is alphanumeric
Parameters:
Name Type Description
str String the string
Source:

setupAIButtons()

Setup up the ai buttons
Source:

setupColorButtons()

Setup the colour radio buttons
Source:

setupColors()

Setup the default tank colors.
Source:

setupSubmitButtons()

Setup the buttons to submit the current player and start the game.
Source:

shutdown()

Actions to run on the shutdown of the game mode
Source:

startup()

Startup actions that require access to the game engine
Source:

submitPlayer()

Add the current player information to a list ready to be added to the game engine
Source:

update(dt)

Update the projectile debug mode - adds new projectile if there are none currently in the screen
Parameters:
Name Type Description
dt number The time between the current frame and the previous frame.
Source:

Documentation generated by JSDoc 4.0.2 on Wed Oct 29 2025 23:51:02 GMT-0700 (Pacific Daylight Time)