feat: complete mobile UI implementation

This commit is contained in:
shenlei
2026-09-04 19:54:33 +09:00
parent 9a4a044da5
commit b19d5b5dd3
132 changed files with 6643 additions and 180 deletions
+10
View File
@@ -209,6 +209,16 @@ func _place_tail(n: Node3D, tag: Label3D, d_px: float) -> void:
else:
tag.position.y = TAG_BASE_Y - d_px * px
# 移动端情境按钮用它判断附近是否有可拾取物,避免常驻占用 HUD。
func has_nearby_item() -> bool:
var p: Node3D = _player_getter.call() if _player_getter.is_valid() else null
if p == null:
return false
for node in _by_vid.values():
if is_instance_valid(node) and p.global_position.distance_to(node.global_position) < PICKUP_RANGE:
return true
return false
# 捡最近的一个(范围内)。返回捡的 vid,0 = 没有。
func try_pickup() -> int:
var p: Node3D = _player_getter.call() if _player_getter.is_valid() else null