Home Reference Source
import {Component} from 'terra/src/core/component.js'
public class | source

Component

Direct Subclass:

ShapeComponent

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public
public
public
public

Method Summary

Public Methods
public

offlineAttach(entity: *)

This is called if attached while game is not running

public

This is called when it is attached to an Entity

public

This is called when it is detatched from an Entity

public

setDependency(id: *)

Private Methods
private

_checkDependencies(entity: *)

This will check if the entity it's being attached to, has this component's dependencies.

Public Constructors

public constructor() source

Public Members

public data: Object source

public dependencies: string[] source

public entity: Entity source

public id: string source

Public Methods

public offlineAttach(entity: *) source

This is called if attached while game is not running

Params:

NameTypeAttributeDescription
entity *

public onAttach() source

This is called when it is attached to an Entity

public onDetatch() source

This is called when it is detatched from an Entity

public setDependency(id: *) source

Params:

NameTypeAttributeDescription
id *

Private Methods

private _checkDependencies(entity: *) source

This will check if the entity it's being attached to, has this component's dependencies.

Params:

NameTypeAttributeDescription
entity *