Methods
-
camera_follow(object)
-
Makes the game camera follow the object.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description objectobject for the camera to follow
Code Equivalent:
game.camera.follow(object); -
camera_follow_complex(object, lerpX, lerpY, style)
-
Makes the game camera follow the object, with a specific style of following. Lerp designates how much linear interpolation to use when horizontally tracking the object. The closer the values is to 1, the faster the camera will track.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description objectobject for the camera to follow
lerpXNumber linear interpolation in the x direction
lerpYNumber linear interpolation in the y direction
stylethe style of the camera following
Code Equivalent:
game.camera.follow(object, style, lerpX, lerpY); -
camera_follow_styled(object, style)
-
Makes the game camera follow the object, with a specific style of following.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description objectobject for the camera to follow
stylethe style of the camera following
Code Equivalent:
game.camera.follow(object, Phaser.Camera.style); -
destroy_object(object)
-
Deletes everything about the game object.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description objectobject to destroy
Code Equivalent:
object.destroy(); -
faint_object(object)
-
Sets the values of game object alive, exists, and visible to false. Does not actually destroy the object or free it from memory.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description objectobject to faint
Code Equivalent:
object.faint(); -
get_game_object_boolean_field(object, field)
-
Returns the chosen boolean field value for the game object.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description objectobject to get values from
fieldthe field to get the value of
Code Equivalent:
object.field -
get_game_object_numeric_field(object, field)
-
Returns the chosen point numeric value for the game object.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description objectobject to get the values from
fieldthe field to get the value of
Code Equivalent:
object.field -
get_physics_point_field(object, field)
-
Returns the chosen point field value of the game object.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description objectobject to get values from
fieldthe field to get the value of
Code Equivalent:
undefined -
move_by(object, x, y)
-
Move the position of the object by the given amount, relative to the object's current position.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description objectobject to move
xNumber number of pixels in the x direction to move
yNumber number of pixels in the y direction to move
Code Equivalent:
object.position.add(x, y); -
reset(object, x, y)
-
Moves the game object to the given coordinates, and sets properties fresh, exists, visible, and renderable to true.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description objectobject to reset
xNumber x position to move the object to
yNumber y position to move the object to
Code Equivalent:
object.reset(x, y); -
revive(object)
-
Brings a fainted object back to "life". Sets alive, exists, and visible to true.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description objectobject to revive
Code Equivalent:
object.revive(); -
rotate(object, value_angle)
-
Rotates the object by the number of degrees. 0 to 180 rotates clockwise, 0 to -180 rotates counterclockwise.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description objectobject to rotate
value_angleNumber number of degrees to rotate by
Code Equivalent:
object.angle += value_angle; -
set_game_object_boolean_field(object, field, value)
-
Assigns the chosen boolean field for the game object.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description objectobject to set the field for
fieldthe field to set
valuevalue to set the field to
Code Equivalent:
object.field = boolean; -
set_game_object_numeric_field(object, field, value)
-
Assigns the chosen numeric value for the game object.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description objectobject to set the field for
fieldthe field to set
valuevalue to set the field to
Code Equivalent:
object.field = value; -
set_game_object_point_field(field, point, object)
-
Assigns the chosen point field for the game object.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description fieldthe field to set
pointpoint to set the field to
objectobject to set the field for
Code Equivalent:
object.field.copyFrom(point);