Action
in package
implements
Serializable
A representation of an action the user can take to affect the game state. An encapsulation of a navigation menu option.
Interfaces, Classes and Traits
- Serializable
Table of Contents
- $destinationSceneId : string
- $id : string
- $parameters : array<string|int, mixed>
- $title : string|null
- $viewpoint : Viewpoint|null
- __construct() : mixed
- Construct a new action with the specified Scene as its destination.
- getDestinationSceneId() : string
- Return the database ID of the destination scene, where the user will go if they take this action.
- getId() : string
- Returns the unique, automatically generated identifier for this action.
- getParameters() : array<string|int, mixed>
- Returns all parameters for this action.
- getRenderedTitle() : string|null
- Returns the rendered action title.
- getTitle() : string|null
- getViewpoint() : Viewpoint|null
- serialize() : mixed
- setParameters() : void
- Sets all parameters for this action.
- setTitle() : void
- setViewpoint() : mixed
- unserialize() : mixed
Properties
$destinationSceneId
protected
string
$destinationSceneId
$id
protected
string
$id
$parameters
protected
array<string|int, mixed>
$parameters
= []
$title
protected
string|null
$title
= null
$viewpoint
private
Viewpoint|null
$viewpoint
= null
Methods
__construct()
Construct a new action with the specified Scene as its destination.
public
__construct(string $destinationSceneId[, string|null $title = null ][, array<string|int, mixed> $parameters = [] ]) : mixed
Parameters
- $destinationSceneId : string
- $title : string|null = null
- $parameters : array<string|int, mixed> = []
Return values
mixed —getDestinationSceneId()
Return the database ID of the destination scene, where the user will go if they take this action.
public
getDestinationSceneId() : string
Return values
string —getId()
Returns the unique, automatically generated identifier for this action.
public
getId() : string
Use this ID to refer to this action when calling Game::takeAction().
Return values
string —getParameters()
Returns all parameters for this action.
public
getParameters() : array<string|int, mixed>
Return values
array<string|int, mixed> —getRenderedTitle()
Returns the rendered action title.
public
getRenderedTitle() : string|null
Tags
Return values
string|null —getTitle()
public
getTitle() : string|null
Return values
string|null —getViewpoint()
public
getViewpoint() : Viewpoint|null
Return values
Viewpoint|null —serialize()
public
serialize() : mixed
Return values
mixed —setParameters()
Sets all parameters for this action.
public
setParameters(array<string|int, mixed> $parameters) : void
Parameters
- $parameters : array<string|int, mixed>
Return values
void —setTitle()
public
setTitle(string|null $title) : void
Parameters
- $title : string|null
Return values
void —setViewpoint()
public
setViewpoint(Viewpoint|null $viewpoint) : mixed
Parameters
- $viewpoint : Viewpoint|null
Return values
mixed —unserialize()
public
unserialize(mixed $serialized) : mixed
Parameters
- $serialized : mixed