19 lines
382 B
GDScript
19 lines
382 B
GDScript
class_name MapMarker extends Node3D
|
|
|
|
var target : Node3D
|
|
|
|
func register_target(target : Node3D) -> void:
|
|
self.target = target
|
|
reposition()
|
|
|
|
func reposition() -> void:
|
|
var loc = target.position
|
|
position = Vector3(loc.x, position.y, loc.z)
|
|
|
|
func _process(delta: float) -> void:
|
|
if target:
|
|
reposition()
|
|
|
|
func _on_trap_revealed(is_visible : bool) -> void:
|
|
visible = is_visible
|