Constructor
new Stage($engine)
- Description:
- Source:
Example
class StageExample extends Stage {}
Parameters:
| Name |
Type |
Description |
$engine |
Engine
|
The engine on which to create the stage. |
Members
actors :Array.<Actor>
- Description:
- Source:
Gets the current actors.
Type:
- Description:
- Source:
Gets the current engine.
Type:
- Description:
- Gets the 'origin' actor (not attached).
- Source:
Gets the 'origin' actor (not attached).
Type:
pointOfView :Actor
- Description:
- Source:
Gets the point of view.
Type:
uuid :string
- Description:
- Source:
Gets the uuid.
Type:
Methods
createActor($actoropt) → {Actor.<TypeGenericAction, TypeGenericState>}
- Description:
- Source:
Parameters:
| Name |
Type |
Attributes |
Description |
$actor |
Class.<Actor.<TypeGenericAction, TypeGenericState>>
|
<optional>
|
The actor to create. |
Returns:
-
Type
-
Actor.<TypeGenericAction, TypeGenericState>
getActorWithLabel($label) → {Actor}
- Description:
- Gets the first actor with the given label.
- Source:
Parameters:
| Name |
Type |
Description |
$label |
string
|
The label of the actor to get. |
Returns:
-
Type
-
Actor
getActorsWithLabel($label) → {Array.<Actor>}
- Description:
- Gets the actors with the given label.
- Source:
Parameters:
| Name |
Type |
Description |
$label |
string
|
The label of the actors to get. |
Returns:
-
Type
-
Array.<Actor>
getMask($identifier) → {Mask}
- Description:
- Gets the mask with the given identifier.
- Source:
Parameters:
| Name |
Type |
Description |
$identifier |
string
|
The identifier of the mask to get. |
Returns:
-
Type
-
Mask
hasActor($actor) → {boolean}
- Description:
- Checks if the stage has the given actor.
- Source:
Parameters:
| Name |
Type |
Description |
$actor |
Actor
|
The actor to check. |
Returns:
-
Type
-
boolean
hasActorWithLabel($label) → {boolean}
- Description:
- Checks if the stage has an actor with the given label.
- Source:
Parameters:
| Name |
Type |
Description |
$label |
string
|
The label of the actor to check. |
Returns:
-
Type
-
boolean
hasMask($identifier) → {boolean}
- Description:
- Checks if the stage has a mask with the given identifier.
- Source:
Parameters:
| Name |
Type |
Description |
$identifier |
string
|
The identifier of the mask to check. |
Returns:
-
Type
-
boolean
onCreate()
- Description:
- Called when the stage is being created.
- Source:
onRemove()
- Description:
- Called when the stage is being removed.
- Source:
removeActor($actor)
- Description:
- Source:
Parameters:
| Name |
Type |
Description |
$actor |
Actor
|
The actor to remove. |
removeActorWithLabel($label)
- Description:
- Removes the first actor with the given label.
- Source:
Parameters:
| Name |
Type |
Description |
$label |
string
|
The label of the actor to remove. |
removeActors($force)
- Description:
- Source:
Parameters:
| Name |
Type |
Default |
Description |
$force |
boolean
|
false
|
If the removal should also be applied to all actors created during this removal. |
removeActorsWithLabel($label, $force)
- Description:
- Removes the actors with the given label.
- Source:
Parameters:
| Name |
Type |
Default |
Description |
$label |
string
|
|
The label of the actors to remove. |
$force |
boolean
|
false
|
If the removal should also be applied to the actors with the given label created during this removal. |
removeMask($identifier) → {this}
- Description:
- Removes the mask with the given identifier.
- Source:
Parameters:
| Name |
Type |
Description |
$identifier |
string
|
The identifier of the mask to remove. |
Returns:
-
Type
-
this
setMask($identifier, $mask) → {this}
- Description:
- Source:
Parameters:
| Name |
Type |
Description |
$identifier |
string
|
The identifier of the mask to set. |
$mask |
Mask
|
The mask to set. |
Returns:
-
Type
-
this
setPointOfView($actor)
- Description:
- Sets the given actor as the point of view.
- Source:
Parameters:
| Name |
Type |
Description |
$actor |
Actor
|
The actor to set as the point of view. |