new SpatialComponent(pX, pY, pOwner)
The spatial component allows positionning of the game object in the 2d space.
Parameters:
Name | Type | Description |
---|---|---|
pX |
int | X position of the game object. |
pY |
int | Y position of the game object. |
pOwner |
FM.GameObject | The game object that own this component. |
Extends
Members
-
angle :float
-
Angle of the object defined in radians.
Type:
- float
-
name :FM.ComponentTypes
-
Component's name.
Type:
- Inherited From:
- Source:
-
owner :FM.GameObject
-
Component's owner.
Type:
- Inherited From:
- Source:
-
position :FM.Vector
-
Current position of the game object.
Type:
-
previous :FM.Vector
-
Position of the game object at last frame.
Type:
Methods
-
destroy()
-
Destroy the component and its objects.