Done refactoring
This commit is contained in:
parent
3a136ff215
commit
2176e9d798
88 changed files with 821 additions and 880 deletions
18
scripts/objects/Minimap.gd
Normal file
18
scripts/objects/Minimap.gd
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
extends Control
|
||||
|
||||
@export var marker : PackedScene
|
||||
|
||||
@onready var ship = $"../../.."
|
||||
|
||||
var markers = []
|
||||
|
||||
func _process(_delta):
|
||||
$Sprite.self_modulate = ship.modulate
|
||||
|
||||
func add_marker(target : Node, type : String):
|
||||
var marker_inst = marker.instantiate()
|
||||
markers.append(marker_inst)
|
||||
marker_inst.target = target
|
||||
marker_inst.type = type
|
||||
marker_inst.position = Vector2(96, 96)
|
||||
add_child(marker_inst)
|
||||
Loading…
Add table
Add a link
Reference in a new issue