State
Inherits YAML::Serializable < Struct < Value < Object
Represents the current state of a game. You can inject more fields into this to extend functionality.
Example:
Add a timestamp to the state.
Properties prefixed with a YAML::Field annotation will automatically persist between saves.
struct State
@[YAML::Field(key: "timestamp")]
property timestamp : Time?
end
By itself, state properties don't do anything.
You can read and change state in a Scene or Command.
Constructors
new(ctx : YAML::ParseContext, node : YAML::Nodes::Node)
Sourcenew
Sourcenew(*, __context_for_yaml_serializable ctx : YAML::ParseContext, __node_for_yaml_serializable node : YAML::Nodes::Node)
SourceInstance methods
character
Sourcescene
Sourcescene=(scene : String | Nil)
Source