Base docking system (areas don't monitor ship somehow)
This commit is contained in:
parent
ab3ac4af66
commit
739cdbe4c3
11 changed files with 190 additions and 18 deletions
|
|
@ -15,6 +15,8 @@ signal destroyed
|
|||
@onready var weapons: Node2D = $Weapons
|
||||
## Node beginning position
|
||||
@onready var spawn_position: Vector2 = global_position
|
||||
## Reference to the star system
|
||||
@onready var star_system: StarSystem = get_tree().current_scene
|
||||
|
||||
## Faction which this ship belongs to
|
||||
var faction : Game.Faction
|
||||
|
|
@ -22,6 +24,8 @@ var faction : Game.Faction
|
|||
func _ready() -> void:
|
||||
hull.global_position = global_position
|
||||
destroyed.connect(destroy_timeout)
|
||||
hull.mouse_entered.connect(star_system.set_targeted_node.bind(self))
|
||||
hull.mouse_exited.connect(star_system.clear_targeted_node)
|
||||
|
||||
func destroy_timeout():
|
||||
destroy()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue