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 object
object 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 object
object for the camera to follow
lerpX
Number linear interpolation in the x direction
lerpY
Number linear interpolation in the y direction
style
the 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 object
object for the camera to follow
style
the 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 object
object 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 object
object 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 object
object to get values from
field
the 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 object
object to get the values from
field
the 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 object
object to get values from
field
the 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 object
object to move
x
Number number of pixels in the x direction to move
y
Number 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 object
object to reset
x
Number x position to move the object to
y
Number 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 object
object 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 object
object to rotate
value_angle
Number 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 object
object to set the field for
field
the field to set
value
value 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 object
object to set the field for
field
the field to set
value
value 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 field
the field to set
point
point to set the field to
object
object to set the field for
Code Equivalent:
object.field.copyFrom(point);