Finished working on the minimap system for the test level, shows pawns, enemy and friendly traps, and unfinished 'items'
This commit is contained in:
15
scripts/map_marker.gd
Normal file
15
scripts/map_marker.gd
Normal file
@@ -0,0 +1,15 @@
|
||||
class_name MapMarker extends Node3D
|
||||
|
||||
var target : Node3D
|
||||
|
||||
func register_target(target : Node3D) -> void:
|
||||
self.target = target
|
||||
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
if target:
|
||||
var loc = target.position
|
||||
position = Vector3(loc.x, position.y, loc.z)
|
||||
|
||||
func _on_trap_revealed(is_visible : bool) -> void:
|
||||
visible = is_visible
|
||||
Reference in New Issue
Block a user