fix(poc): resolve evaluator and review findings
- Add RectangleShape2D to Character and InteractiveObject collision areas - Fix HUD button signal connections in _ready() - Fix character_placed signal emitting global_position - Extract DEFAULT_DRAG_RADIUS constant in DragDropComponent - Type Variant on JSON parsed variable in SaveManager - Extract music symbol constants in HUD - Refactor duplicated drag input code in InputManager Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -6,6 +6,7 @@ signal drag_released(global_position: Vector2)
|
||||
|
||||
const DRAG_Z_INDEX: int = 10
|
||||
const DRAG_SCALE: float = 1.1
|
||||
const DEFAULT_DRAG_RADIUS: float = 64.0
|
||||
|
||||
@export var drag_target: Node2D
|
||||
|
||||
@@ -73,8 +74,8 @@ func _is_position_over_target(screen_pos: Vector2) -> bool:
|
||||
var local_pos: Vector2 = drag_target.to_local(world_pos)
|
||||
var area: Area2D = drag_target.get_node_or_null("CollisionArea") as Area2D
|
||||
if area == null:
|
||||
return local_pos.length() < 64.0
|
||||
return local_pos.length() < DEFAULT_DRAG_RADIUS
|
||||
for child in area.get_children():
|
||||
if child is CollisionShape2D and child.shape != null:
|
||||
return child.shape.get_rect().has_point(local_pos)
|
||||
return local_pos.length() < 64.0
|
||||
return local_pos.length() < DEFAULT_DRAG_RADIUS
|
||||
|
||||
Reference in New Issue
Block a user