Improved AI idle

This commit is contained in:
Paul Black 2023-03-19 16:37:06 -06:00
parent adf1996cf0
commit 127dce5531
2 changed files with 3 additions and 2 deletions

View file

@ -234,6 +234,7 @@ text = "300"
placeholder_text = "Duration"
[node name="timeLabel" type="Label" parent="."]
layout_mode = 0
offset_left = 627.0
offset_top = 467.0
offset_right = 725.0

View file

@ -26,12 +26,12 @@ func _physics_process(delta):
# Add the gravity.
if not is_on_floor():
velocity.y -= gravity * delta
if $CollisionShape3D/Neck/Teddy/AnimationPlayer.is_playing() == false:
$CollisionShape3D/Neck/Teddy/AnimationPlayer.play("idle")
if Global.roundInSession:
self.visible = true
$CollisionShape3D.disabled = false
if $CollisionShape3D/Neck/Teddy/AnimationPlayer.is_playing() == false and not Global.tutorialComplete:
$CollisionShape3D/Neck/Teddy/AnimationPlayer.play("idle")
if player and Global.playerAlive and Global.tutorialComplete and not dead:
if Global.AIHit == true:
Global.AIHit = false