forked from xiangwang25/whale-town-front-v2
feat: add nearby social interactions
This commit is contained in:
20
_Core/ui/InteractionPointMarkers.gd
Normal file
20
_Core/ui/InteractionPointMarkers.gd
Normal file
@@ -0,0 +1,20 @@
|
||||
extends Node2D
|
||||
|
||||
# 地图内可交互目标的轻量视觉标记,由 InteractionManager 提供世界坐标。
|
||||
const RING_COLOR: Color = Color(1.0, 1.0, 1.0, 0.94)
|
||||
const CORE_COLOR: Color = Color(1.0, 1.0, 1.0, 0.58)
|
||||
const RING_RADIUS: float = 9.0
|
||||
const RING_WIDTH: float = 2.0
|
||||
|
||||
var _points: Array[Vector2] = []
|
||||
|
||||
func set_points(points: Array[Vector2]) -> void:
|
||||
if _points == points:
|
||||
return
|
||||
_points = points.duplicate()
|
||||
queue_redraw()
|
||||
|
||||
func _draw() -> void:
|
||||
for point: Vector2 in _points:
|
||||
draw_arc(point, RING_RADIUS, 0.0, TAU, 24, RING_COLOR, RING_WIDTH, true)
|
||||
draw_circle(point, 2.0, CORE_COLOR)
|
||||
1
_Core/ui/InteractionPointMarkers.gd.uid
Normal file
1
_Core/ui/InteractionPointMarkers.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://de27p7wr4gj2b
|
||||
Reference in New Issue
Block a user