Class: SpatialComponent

SpatialComponent

FM.SpatialComponent

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.
Author:
  • Simon Chauvin
Source:

Extends

Members

angle :float

Angle of the object defined in radians.
Type:
  • float
Source:

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:
Source:

previous :FM.Vector

Position of the game object at last frame.
Type:
Source:

Methods

destroy()

Destroy the component and its objects.
Source: