2021-10-21 02:21:15 +00:00
|
|
|
extends Control
|
|
|
|
|
2021-11-12 02:36:58 +00:00
|
|
|
signal two_ship_collide
|
|
|
|
signal three_shipA_collide
|
|
|
|
signal three_shipB_collide
|
|
|
|
signal four_ship_collide
|
|
|
|
signal five_ship_collide
|
2021-10-21 02:21:15 +00:00
|
|
|
|
|
|
|
# Declare member variables here. Examples:
|
|
|
|
# var a = 2
|
|
|
|
# var b = "text"
|
|
|
|
|
|
|
|
|
|
|
|
# Called when the node enters the scene tree for the first time.
|
|
|
|
func _ready():
|
2021-10-21 10:22:42 +00:00
|
|
|
if find_next_valid_focus(): find_next_valid_focus().grab_focus()
|
2021-10-21 02:21:15 +00:00
|
|
|
|
|
|
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
|
|
#func _process(delta):
|
|
|
|
# pass
|
|
|
|
|
|
|
|
|
|
|
|
func _on_Forfeit_pressed():
|
2021-11-08 02:53:08 +00:00
|
|
|
AudioBus.emit_signal("button_clicked")
|
2021-10-21 02:26:33 +00:00
|
|
|
queue_free();
|
2021-10-21 06:24:27 +00:00
|
|
|
MessageBus.emit_signal("change_scene", "Title")
|
2021-11-12 02:36:58 +00:00
|
|
|
|
|
|
|
|
|
|
|
func _on_2Ship_body_entered(body):
|
|
|
|
var _errno = emit_signal("two_ship_collide", "2Ship")
|
|
|
|
print("Emitting two_ship_collide")
|
|
|
|
|
|
|
|
func _on_3ShipA_body_entered(body):
|
|
|
|
emit_signal("three_shipA_collide", "3ShipA")
|
|
|
|
print("Emitting three_shipA_collide")
|
|
|
|
|
|
|
|
func _on_3ShipB_body_entered(body):
|
|
|
|
emit_signal("three_shipB_collide", "3ShipA")
|
|
|
|
print("Emitting three_shipB_collide")
|
|
|
|
|
|
|
|
func _on_4Ship_body_entered(body):
|
|
|
|
emit_signal("four_ship_collide", "4Ship")
|
|
|
|
print("Emitting four_ship_collide")
|
|
|
|
|
|
|
|
func _on_5Ship_body_entered(body):
|
|
|
|
emit_signal("five_ship_collide", "5Ship")
|
|
|
|
print("Emitting five_ship_collide")
|
|
|
|
|