class

PointClickEngine::Scenes::DynamicHotspot

Inherits PointClickEngine::Scenes::Hotspot < PointClickEngine::Core::GameObject < PointClickEngine::Core::Drawable < Reference < Object

Dynamic hotspot that can change based on game state

Constructors

new(name : String, position : RL::Vector2, size : RL::Vector2)
Source

Instance methods

add_state(name : String, state : HotspotState)

Add a new state

Source
add_state_condition(state_name : String, condition : Condition)

Add state transition condition

Source
add_visibility_condition(condition : Condition)

Add visibility condition

Source
current_state
Source
current_state=(current_state : String)
Source
set_state(state_name : String)

Set the current state

Source
state_conditions
Source
state_conditions=(state_conditions : Hash(String, Array(Condition)))
Source
states
Source
states=(states : Hash(String, HotspotState))
Source
update(dt : Float32)

Override update to check conditions

Source
update_conditions(engine : Core::Engine)

Update visibility and state based on conditions

Source
visibility_conditions
Source
visibility_conditions=(visibility_conditions : Array(Condition))
Source