Cleaned up laser.gd and made plasma bool functional again
This commit is contained in:
parent
845dc35e37
commit
2934ddd400
14
Laser.gd
14
Laser.gd
|
@ -7,25 +7,19 @@ export (int) var DAMAGE
|
||||||
var plasma = false
|
var plasma = false
|
||||||
var current_pen = 0
|
var current_pen = 0
|
||||||
|
|
||||||
# class member variables go here, for example:
|
|
||||||
# var a = 2
|
|
||||||
# var b = "textvar"
|
|
||||||
|
|
||||||
func _on_Visibility_screen_exited():
|
func _on_Visibility_screen_exited():
|
||||||
queue_free()
|
queue_free()
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
# Called every time the node is added to the scene.
|
|
||||||
# Initialization here
|
|
||||||
$AnimatedSprite.play()
|
$AnimatedSprite.play()
|
||||||
connect("area_entered", self, "hit")
|
connect("area_entered", self, "hit")
|
||||||
pass
|
pass
|
||||||
|
|
||||||
func hit(who):
|
func hit(who):
|
||||||
#if plasma == false:
|
|
||||||
# hide()
|
if plasma == true:
|
||||||
# queue_free()
|
pass
|
||||||
if current_pen > 0:
|
elif current_pen > 0:
|
||||||
current_pen -= 1
|
current_pen -= 1
|
||||||
else:
|
else:
|
||||||
hide()
|
hide()
|
||||||
|
|
Loading…
Reference in New Issue