Fronter/RectangleReturn.gd

37 lines
984 B
GDScript

extends "res://Bad.gd"
var right_laser_alive = true
var left_laser_alive = true
func _ready():
speed = 0
#$RightArm/BadLaser.independent = false
#$RightArm/BadLaser.health_multi = 3
#$LeftArm/BadLaser.independent = false
#$LeftArm/BadLaser.health_multi = 3
$RightArm/Laser/BadLaser.fire_speed = 25
$LeftArm/Laser/BadLaser.fire_speed = 25
$RightArm/Laser/BadLaser/Rotatable.rotation_degrees = -45
pass
func _process(delta):
#$RightArm/Forearm.rotate(delta/10)
if right_laser_alive:
if $RightArm/Laser/BadLaser:
$RightArm/Laser/BadLaser.health -= delta*30
if $RightArm/Laser/BadLaser.health <= 100:
$RightArm/Laser/BadLaser.fire_speed = 150
if left_laser_alive:
if $LeftArm/Laser/BadLaser:
$LeftArm/Laser/BadLaser.health -= delta*30
if $LeftArm/Laser/BadLaser.health <= 100:
$LeftArm/Laser/BadLaser.fire_speed = 150
func _on_LeftBadLaser_dead(money):
left_laser_alive = false
func _on_RightBadLaser_dead(money):
right_laser_alive = false