Quests system + Elimination quest
This commit is contained in:
parent
30e53f858f
commit
2bca6b2fe5
6 changed files with 92 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue