Quest system done

This commit is contained in:
2ndbeam 2024-06-08 13:21:45 +03:00
commit 231ff2bb1d
10 changed files with 52 additions and 9 deletions

View file

@ -5,6 +5,9 @@ class_name Ship
## Emits when hull hp reaches zero.
signal destroyed
## Ship ID to define its type
@export var id: String
## Reference to the engine module
@onready var engine: ShipEngine = $Engine
## Reference to the hull module
@ -24,6 +27,7 @@ var faction : Game.Faction
func _ready() -> void:
hull.global_position = global_position
destroyed.connect(destroy_timeout)
destroyed.connect(star_system.on_ship_destroyed.bind(self))
hull.mouse_entered.connect(star_system.set_targeted_node.bind(self))
hull.mouse_exited.connect(star_system.clear_targeted_node)