ChronoSpace/scenes/spaceShip/timeGhost/timeghost.gd
2025-08-02 12:27:49 +02:00

17 lines
496 B
GDScript

class_name TimeGhost extends "res://scenes/spaceShip/spaceShip.gd"
@export var spaceShip: Spaceship = null
#func _init(_speed: int, _acceleration: float) -> void:
# speed = _speed
#acceleration = _acceleration
func _physics_process(delta: float) -> void:
move_and_slide()
func setSpaceship(_spaceShip: Spaceship):
spaceShip = _spaceShip
speed = spaceShip.speed
acceleration = spaceShip.acceleration
global_position = spaceShip.global_position
sprite.texture = spaceShip.sprite.texture