2018-11-12 23:17:53 -05:00
|
|
|
extends "res://Bad.gd"
|
|
|
|
|
2018-11-13 20:53:07 -05:00
|
|
|
var right_laser_alive = true
|
|
|
|
var left_laser_alive = true
|
|
|
|
|
2018-11-12 23:17:53 -05:00
|
|
|
func _ready():
|
|
|
|
speed = 0
|
|
|
|
#$RightArm/BadLaser.independent = false
|
|
|
|
#$RightArm/BadLaser.health_multi = 3
|
|
|
|
#$LeftArm/BadLaser.independent = false
|
|
|
|
#$LeftArm/BadLaser.health_multi = 3
|
2018-11-13 20:53:07 -05:00
|
|
|
$RightArm/Laser/BadLaser.fire_speed = 25
|
|
|
|
$LeftArm/Laser/BadLaser.fire_speed = 25
|
|
|
|
$RightArm/Laser/BadLaser/Rotatable.rotation_degrees = -45
|
2018-11-12 23:17:53 -05:00
|
|
|
pass
|
|
|
|
|
|
|
|
func _process(delta):
|
2018-11-13 20:53:07 -05:00
|
|
|
#$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
|