ArkSol/scripts/ship.gd
2025-11-14 14:59:50 +01:00

16 lines
325 B
GDScript

extends Node2D
class_name Ship
var ship_type : String
var speed := 100.0
var target_position
func setup(type):
ship_type = type
speed = ShipsType.SHIP_TYPES[type].speed
# Ustawienie tekstury ze słownika
var tex_path = ShipsType.SHIP_TYPES[type]["texture"]
var texture = load(tex_path)
$Sprite2D.texture = texture