Done refactoring

This commit is contained in:
2ndbeam 2023-11-05 21:51:47 +03:00
commit 2176e9d798
88 changed files with 821 additions and 880 deletions

View file

@ -0,0 +1,21 @@
extends Node2D
@onready var marker = $MarkerSprite
@onready var ship = $"../../../.."
var target : Node2D
var type = "hostile"
var tmi = {
"hostile": 0,
"base": 1,
"loot": 2
}
func _ready():
marker.frame = tmi[type]
func _process(_delta):
rotation = ship.global_position.angle_to_point(target.global_position)
var sp_scale = 1024 / clamp(ship.global_position.distance_to(target.global_position), 512, 2048)
marker.scale = Vector2(sp_scale, sp_scale)
modulate = target.modulate