new Reset()
The Reset component allows a Game Object to be reset and repositioned to a new location.
Methods
-
reset(x, y [, health])
-
Resets the Game Object.
This moves the Game Object to the given x/y world coordinates and sets
fresh,exists,visibleandrenderableto true.If this Game Object has the LifeSpan component it will also set
aliveto true andhealthto the given value.If this Game Object has a Physics Body it will reset the Body.
Parameters:
Name Type Argument Default Description xnumber The x coordinate (in world space) to position the Game Object at.
ynumber The y coordinate (in world space) to position the Game Object at.
healthnumber <optional>
1 The health to give the Game Object if it has the Health component.
Returns:
This instance.
- Type
- PIXI.DisplayObject