Home Reference Source Test
import SceneObject from 'seed-engine/src/object/SceneObject.js'
public class | source

SceneObject

Extends:

UpdateableGameObject → SceneObject

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

Inherited Summary

From class Updateable
public
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

Called when the object is intended to be paused.

public

Called when the the object is first introduced.

public

Called when the object is to be unpaused from paused state.

public

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

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
public
public

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
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.

Override:

GameObject#constructor

Params:

NameTypeAttributeDescription
position Point

A point of creation in the world.

size Point

A point representing scale of the object.

rotation number

A number representing angular rotation (in degrees).

Public Members

public deregister: * source

Override:

Updateable#deregister