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>
getActorWithIdentifier($identifier) → {Actor}
- Description:
- Gets the first actor with the given identifier.
- Source:
Parameters:
Name |
Type |
Description |
$identifier |
string
|
The identifier of the actor to get. |
Returns:
-
Type
-
Actor
getActorsWithIdentifier($identifier) → {Array.<Actor>}
- Description:
- Gets the actors with the given identifier.
- Source:
Parameters:
Name |
Type |
Description |
$identifier |
string
|
The identifier of the actors to get. |
Returns:
-
Type
-
Array.<Actor>
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
hasActorWithIdentifier($identifier) → {boolean}
- Description:
- Checks if the stage has an actor with the given identifier.
- Source:
Parameters:
Name |
Type |
Description |
$identifier |
string
|
The identifier of the actor to check. |
Returns:
-
Type
-
boolean
onCreate()
- Description:
- Called when the stage is being created.
- Source:
removeActor($actor)
- Description:
- Source:
Parameters:
Name |
Type |
Description |
$actor |
Actor
|
The actor to remove. |
removeActorWithIdentifier($identifier)
- Description:
- Removes the first actor with the given identifier.
- Source:
Parameters:
Name |
Type |
Description |
$identifier |
string
|
The identifier 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. |
removeActorsWithIdentifier($identifier, $force)
- Description:
- Removes the actors with the given identifier.
- Source:
Parameters:
Name |
Type |
Default |
Description |
$identifier |
string
|
|
The identifier of the actors to remove. |
$force |
boolean
|
false
|
If the removal should also be applied to the actors with the given identifier created during this removal. |
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. |