PointClickEngine::Core::GameStateManager
Inherits YAML::Serializable < JSON::Serializable < Reference < Object
Game state manager handles all persistent game state
Constructors
new(ctx : YAML::ParseContext, node : YAML::Nodes::Node)
Sourcenew(pull : JSON::PullParser)
Sourcenew(event_bus : Events::EventBus)
Sourcenew
Sourcenew(*, __pull_for_json_serializable pull : JSON::PullParser)
Sourcenew(*, __context_for_yaml_serializable ctx : YAML::ParseContext, __node_for_yaml_serializable node : YAML::Nodes::Node)
SourceInstance methods
advance_quest(quest_id : String, next_step : String)
Sourcechange_handlers=(change_handlers : Array(StateChangeHandler))
Event handling (legacy callbacks)
complete_quest(quest_id : String)
Sourcecompleted_quests
Sourcecompleted_quests=(completed_quests : Array(String))
Sourceday_cycle
Sourceday_cycle=(day_cycle : Float32)
Sourceget_flag(name : String) : Bool
Sourceget_quest_step(quest_id : String) : String | Nil
Sourceget_time_of_day
Sourceget_timer(name : String) : Float32 | Nil
Sourceget_variable(name : String) : GameValue | Nil
Sourceget_variable_as(name : String, type : T.class) : T | Nil forall T
Sourcehas_flag?(name : String) : Bool
Sourcehas_timer?(name : String) : Bool
Sourceis_achievement_unlocked?(achievement_id : String) : Bool
Sourceis_day?
Sourceis_night?
Sourceis_quest_active?(quest_id : String) : Bool
Sourceis_quest_completed?(quest_id : String) : Bool
Sourceload_from_file(path : String) : Bool
Sourceremove_change_handler(handler : StateChangeHandler)
Sourcetimers
Sourcetimers=(timers : Hash(String, Float32))
Sourceunlocked_achievements
Sourceunlocked_achievements=(unlocked_achievements : Array(String))
Sourceupdate_timers(dt : Float32)
Sourcevariables
Sourcevariables=(variables : Hash(String, GameValue))
Source