Quests system + Elimination quest

This commit is contained in:
gotfishmakesticks 2023-11-16 10:43:32 +03:00
commit 2bca6b2fe5
6 changed files with 92 additions and 0 deletions

View file

@ -17,11 +17,13 @@ class_name NPCShip
var state = "idle"
var shooting = false
var allow_shooting = true
signal destroyed
func _ready():
destination_timer.timeout.connect(switchdestination)
target_snap.mouse_entered.connect(get_tree().current_scene.addtargetlist.bind(self))
target_snap.mouse_exited.connect(get_tree().current_scene.removetargetlist.bind(self))
destroyed.connect(get_tree().current_scene.enemydestroyed)
func _physics_process(_delta):
match state:
@ -80,3 +82,4 @@ func destroy():
bounty_inst.amount = randi_range(bounty_min, bounty_max)
bounty_inst.text.text = str(bounty_inst.amount) + " MU"
global_position = Vector2(randi_range(-4096, 4096), randi_range(-4096, 4096))
destroyed.emit(self)