Instance methods
add_animation(name : String, start_frame : Int32, frame_count : Int32, frame_speed : Float32 = Core::GameConstants::DEFAULT_ANIMATION_SPEED, loop : Bool = true)
Defines a named animation for the character
Sourceafter_yaml_deserialize(ctx : YAML::ParseContext)
Called after YAML deserialization to restore runtime state
Sourceanimation_controller=(animation_controller : AnimationController)
Sourceanimations(*args, **options)
Sourceanimations(*args, **options, &)
Sourceask(question : String, choices : Array(Tuple(String, Proc(Nil))))
Presents a dialogue question with multiple choice responses
Sourceavailable?(*args, **options)
Sourceavailable?(*args, **options, &)
Sourcebusy?(*args, **options, &)
Sourcecan_interact?(*args, **options)
Sourcecan_interact?(*args, **options, &)
Sourcecan_move?(*args, **options)
Convenience methods for state queries
Sourcecan_move?(*args, **options, &)
Convenience methods for state queries
Sourcecan_talk?(*args, **options)
Sourcecan_talk?(*args, **options, &)
Sourcecontains_point?(point : RL::Vector2) : Bool
Check if a point is within the character's bounds
Sourceconversation_partner
Reference to character currently in conversation with (runtime only)
Sourceconversation_partner=(conversation_partner : Character | Nil)
Reference to character currently in conversation with (runtime only)
Sourceconversation_partner_name
Name of character currently in conversation with (for serialization)
Sourceconversation_partner_name=(conversation_partner_name : String | Nil)
Name of character currently in conversation with (for serialization)
Sourcecurrent_animation(*args, **options)
Delegate animation properties to animation controller
Sourcecurrent_animation(*args, **options, &)
Delegate animation properties to animation controller
Sourcecurrent_path_index
Current waypoint index when following a path (runtime only)
Sourcecurrent_path_index=(current_path_index : Int32)
Current waypoint index when following a path (runtime only)
Sourcedescription
Descriptive text shown when examining the character
Sourcedescription=(description : String)
Descriptive text shown when examining the character
Sourcedialogue_system(*args, **options)
Delegate dialogue methods to the dialogue system
Sourcedialogue_system(*args, **options, &)
Delegate dialogue methods to the dialogue system
Sourcedialogue_system_data
Dialogue system data for this character
Sourcedialogue_system_data=(dialogue_system_data : Dialogue::CharacterDialogue | Nil)
Dialogue system data for this character
Sourcedirection(*args, **options)
Sourcedirection(*args, **options, &)
Sourcedistance_to_target
Get remaining distance to movement target
Sourcedraw
Renders the character sprite and dialogue
Sourcefollowing_path?
Check if character is following a pathfinding route
Sourceget_animation_controller
Component access methods for external systems
Sourcehas_animation?(name : String) : Bool
Convenience methods for animation control
Sourceload_spritesheet(path : String, frame_width : Int32, frame_height : Int32)
Loads a spritesheet for character animation
Sourcemanual_scale
Manual scale override from configuration (overrides dynamic scaling)
Sourcemanual_scale=(manual_scale : Float32 | Nil)
Manual scale override from configuration (overrides dynamic scaling)
Sourcemood(*args, **options, &)
Sourcemovement_controller=(movement_controller : MovementController | Nil)
Sourcemoving?
Check if character is currently moving
Sourcename
The character's unique name identifier
Sourcename=(name : String)
The character's unique name identifier
Sourceon_interact(interactor : Character)
Abstract methods that must be implemented by subclasses
Sourceon_movement_complete
Set movement completion callback
Sourceon_walk_complete
Callback executed when character finishes walking (runtime only)
Sourceon_walk_complete=(on_walk_complete : Proc(Nil) | Nil)
Callback executed when character finishes walking (runtime only)
Sourcepath
Pathfinding waypoints for navigation (runtime only)
Sourcepath=(path : Array(RL::Vector2) | Nil)
Pathfinding waypoints for navigation (runtime only)
Sourceplay_animation(name : String, force_restart : Bool = true)
Sourcereload_sprite_texture
Sourcesay(text : String, &block : -> Nil)
Makes the character speak dialogue text
Sourceset_manual_scale(scale : Float32 | Nil)
Sprite management convenience methods
Sourceset_mood(new_mood : CharacterMood)
Sets the character's mood and updates mood-based animations
Sourcesprite(*args, **options)
Delegate sprite properties to sprite controller
Sourcesprite(*args, **options, &)
Delegate sprite properties to sprite controller
Sourcesprite_controller=(sprite_controller : SpriteController)
Sourcesprite_path(*args, **options)
Sourcesprite_path(*args, **options, &)
Sourcestate(*args, **options)
Delegate state properties to state manager
Sourcestate(*args, **options, &)
Delegate state properties to state manager
Sourcestate_manager=(state_manager : CharacterStateManager)
Sourcestop_walking
Stops the character's movement immediately
Sourcetalking?(*args, **options)
Sourcetalking?(*args, **options, &)
Sourcetarget_position
Target position for movement (nil if not moving)
Sourcetarget_position=(target_position : RL::Vector2 | Nil)
Target position for movement (nil if not moving)
Sourceupdate(dt : Float32)
Updates the character's state, movement, and animation
Sourceuse_pathfinding
Whether to use pathfinding for movement (true = smart navigation)
Sourceuse_pathfinding=(use_pathfinding : Bool)
Whether to use pathfinding for movement (true = smart navigation)
Sourcewalk_to(target : RL::Vector2, use_pathfinding : Bool | Nil = nil)
Initiates movement to a target position
Sourcewalk_to_with_path(path : Array(RL::Vector2))
Initiates movement along a predefined path
Sourcewalking_speed
Movement speed in pixels per second
Sourcewalking_speed=(walking_speed : Float32)
Movement speed in pixels per second
Source