roboturret has hue shifting eye

This commit is contained in:
pennyrigate 2023-03-08 03:11:53 -05:00
parent 51a3214407
commit 1be92824ef
3 changed files with 35 additions and 2 deletions

View file

@ -10,6 +10,9 @@ onready var shootpos = $ShootPos
onready var raycast = $RayCast2D
const ArrowProjectile = preload("res://objects/enemy/roboturret_proj.tscn")
func _ready():
death_sound = Audio.a_die_robot
func _physics_process(delta):
if raycast.is_colliding():
if sign(shootpos.position.x) == -1:
@ -29,6 +32,10 @@ func spawn_bullet():
Game.get_map().add_child(arrow)
timer.start(shoot_time)
func die():
.die()
Game.instance_node(load("res://objects/enemy/roboturret_die.tscn"), position.x, position.y, get_parent())
func _on_Timer_timeout():
if !anims.is_playing(): spawn_bullet()