SceneObject
Extends:
A GameObject which exists only on the current active scene. When this object is instantiated, it registers with the current active scene through the SceneManager.
Constructor Summary
Public Constructor | ||
public |
constructor(position: Point, size: Point, rotation: number) Default position, size and rotation of the Object. |
Member Summary
Public Members | ||
public |
deregister: * |
Inherited Summary
From class Updateable | ||
public |
deregister: * |
|
public |
|
|
public |
|
|
public |
id: * |
|
public |
Cleanup code for when destroying an Updateable. |
|
public |
end() Base call function for when this Updateable is to be ended. |
|
public |
onEnd() Called when the object is being removed or cleaned up from usage. |
|
public |
onPause() Called when the object is intended to be paused. |
|
public |
onStart() Called when the the object is first introduced. |
|
public |
Called when the object is to be unpaused from paused state. |
|
public |
onUpdate() Called on every update within the game, once the object has had onStart called. |
|
public |
pause() Base call function for when this Updateable is to be paused. |
|
public |
start() Base call function for when this Updateable is to be started. |
|
public |
unpause() Base call function for when this Updateable is to be unpaused. |
|
public |
update() Base call function for when this Updateable is to be updated. |
From class GameObject | ||
public |
|
|
public |
components: {} |
|
public |
transform: * |
|
public |
addComponent(component: Component): boolean Adds a component to this game object, and keeps reference to it. |
|
public |
getComponent(componentName: string, index: *): * Returns a component of type {componentName}. |
|
public |
hasComponent(componentName: string): boolean Returns a boolean on if there is a component of type {componentName}. |
|
public |
onPause() |
|
public |
Override for Post Update functionality. |
|
public |
Override for Pre Update functionality. |
|
public |
|
|
public |
Called by the GameObject after an update to do default calls for postUpdating. |
|
public |
Called by the GameObject before an update to do default calls for preUpdating. |
|
public |
Removes all components except for the Transform component. |
|
public |
removeComponent(componentID: number): boolean Removes a single component from this GameObject by ID. |
|
public |
removeComponents(componentName: string): boolean Removes all Components of the named type. |
|
public |
update() Rewritten update() functions which is originally defined in Updateable. |
|
public |
Updates all components on this GameObject. |
Public Constructors
public constructor(position: Point, size: Point, rotation: number) source
Default position, size and rotation of the Object.