Improved AI idle
This commit is contained in:
parent
adf1996cf0
commit
127dce5531
2 changed files with 3 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue