Class Player

A Player reference

Methods

Player:get_special () Gets the id of the current players special.
Player:get_hitboxes () Gets the current hitboxes for the player.
Player:get_pos () Gets the id of the current players special.
Player:damage (src) Applies damage to the player.
Player:add_stat (id, adds) Adds a value to a player stat.
Player:mul_stat (id, muls) Multiplies a player stat by a value.
Player:set_stat (id, muls) Sets a player stat to a value.
Player:get_id () Gets the id of the current player


Methods

Player:get_special ()
Gets the id of the current players special.

Returns:

    integer The id of the special
Player:get_hitboxes ()
Gets the current hitboxes for the player.

Returns:

    Rect[] A list of all the hitboxes (world space)
Player:get_pos ()
Gets the id of the current players special.

Returns:

    Vec2 the player position as a Vector
Player:damage (src)
Applies damage to the player.

Parameters:

  • src string A string name for the damage source
Player:add_stat (id, adds)
Adds a value to a player stat.

Parameters:

  • id integer The stat id to add to
  • adds float The value to add

See also:

Player:mul_stat (id, muls)
Multiplies a player stat by a value.

Parameters:

  • id integer The stat id to multiply
  • muls float The value to multiply

See also:

Player:set_stat (id, muls)
Sets a player stat to a value.

Parameters:

  • id integer The stat id to set
  • muls float The new value for the stat

See also:

Player:get_id ()
Gets the id of the current player

Returns:

    integer The player id
generated by LDoc 1.5.0 Last updated 2024-05-23 11:40:37