19 lines
378 B
GDScript
19 lines
378 B
GDScript
class_name MapMarker extends Node3D
|
|
|
|
var target : Node3D
|
|
|
|
func register_target(new_target : Node3D) -> void:
|
|
target = new_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_hack_revealed(reveal : bool) -> void:
|
|
visible = reveal
|