enemy tweaks
This commit is contained in:
@@ -29,6 +29,7 @@ const MAX_AV = 10
|
||||
@onready var turret_look_next = $TurretLookNext
|
||||
@onready var spider_look_next = $SpiderLookNext
|
||||
@onready var body = $body
|
||||
@onready var audio_fire = $AUIDO/Fire
|
||||
|
||||
|
||||
@onready var turret = $TurretLook/Turret
|
||||
@@ -65,7 +66,7 @@ func _process(delta):
|
||||
|
||||
#FIX BODY ROTATION
|
||||
#spider_look_next.look_at(Vector3(player.global_position.x, global_position.y, player.global_position.z), Vector3.UP)
|
||||
#self.rotation = lerp(self.rotation, spider_look_next.rotation, delta * 1)
|
||||
#body.rotation = lerp(body.rotation, spider_look_next.rotation.y, delta * 1)
|
||||
|
||||
turret_look_next.look_at(player.global_position,Vector3.UP)
|
||||
turret_look.rotation = lerp(turret_look.rotation,turret_look_next.rotation,delta * turret_look_speed)
|
||||
@@ -144,11 +145,12 @@ func _on_prefire_timer_timeout():
|
||||
get_tree().get_root().add_child(instance_casing)
|
||||
get_tree().get_root().add_child(instance_casing2)
|
||||
|
||||
audio_fire.play()
|
||||
|
||||
prefire_timer.stop()
|
||||
postfire_timer.start()
|
||||
|
||||
|
||||
func _on_postfire_timer_timeout():
|
||||
#if turret_look_next.is_colliding() and turret_look_next.get_collider().is_in_group("player"):
|
||||
prefire_timer.start()
|
||||
turret_material.emission_enabled = true
|
||||
|
||||
Reference in New Issue
Block a user