41 lines
892 B
GDScript
41 lines
892 B
GDScript
extends Node
|
|
|
|
signal refund
|
|
signal speed_upgrade
|
|
signal bullet_delay_upgrade
|
|
signal add_laser
|
|
signal plasma_lasers
|
|
|
|
var bullet_delay_tier
|
|
var shooting_speed_tier
|
|
var ship_speed_tier
|
|
var double_lasers
|
|
|
|
func _ready():
|
|
bullet_delay_tier = get_parent().bullet_delay_tier
|
|
$ShootingSpeedIcon.frame = bullet_delay_tier
|
|
|
|
func _process(delta):
|
|
$ShootingSpeedIcon.frame = bullet_delay_tier
|
|
if (Input.is_action_pressed("ui_quit")):
|
|
get_tree().quit()
|
|
|
|
func _on_Button_pressed():
|
|
get_tree().paused = false
|
|
queue_free()
|
|
|
|
|
|
func _on_Refund_pressed():
|
|
get_tree().paused = false
|
|
emit_signal("refund")
|
|
$ShootingSpeedIcon.frame = 0
|
|
pass # replace with function body
|
|
|
|
func shooting_speed_upgrade_success():
|
|
$ShootingSpeedIcon.frame += 1
|
|
|
|
func _on_ShootingSpeedUpgrade_pressed():
|
|
get_tree().paused = false
|
|
emit_signal("bullet_delay_upgrade")
|
|
bullet_delay_tier = get_parent().bullet_delay_tier
|
|
pass |