PointClickEngine::Scenes::WalkableArea
Inherits YAML::Serializable < Reference < Object
Manages walkable and non-walkable regions in a scene using component-based architecture
This refactored WalkableArea class delegates responsibilities to specialized components:
- PolygonCollisionDetector: Point-in-polygon collision detection
- WalkablePointFinder: Finding and constraining movement to walkable areas
- ScaleZoneManager: Character scaling based on Y position
- WalkBehindManager: Depth sorting for walk-behind regions
- PolygonRenderer: Debug visualization
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
bounds
Sourcebounds=(bounds : RL::Rectangle)
Sourceconstrain_to_walkable(from : RL::Vector2, to : RL::Vector2) : RL::Vector2
Constrain movement to walkable area (delegate to finder)
find_nearest_walkable_point(target : RL::Vector2) : RL::Vector2
Find the nearest walkable point to a given position (delegate to finder)
get_scale_at_y(y : Float32) : Float32
Get character scale based on Y position (delegate to manager)
get_walk_behind_at_y(y : Float32) : Array(WalkBehindRegion)
Get walk-behind regions that should render in front of a character at given Y
regions
Sourcescale_zones
Sourcescale_zones=(value : Array(ScaleZone))
Sourcewalk_behind_regions=(value : Array(WalkBehindRegion))
Source