Rewriting ships: Added weapon base and changed hull parent to Node

This commit is contained in:
2ndbeam 2024-04-29 12:08:13 +03:00
commit 6957169ba5
13 changed files with 121 additions and 37 deletions

View file

@ -10,7 +10,7 @@ signal destroyed
## Reference to the engine module
@onready var engine: ShipEngine = $Engine
## Reference to the hull module
@onready var hull: Hull = $Hull
@onready var hull: Hull = $HullHolder/Hull
## Reference to the shield module
@onready var shield: Shield = $Shield
## Reference to weapons node
@ -20,6 +20,7 @@ signal destroyed
var faction : Game.Faction = Game.Faction.Player
func _ready() -> void:
hull.global_position += global_position
destroyed.connect(destroy)
## Reset all required variables