diff --git a/Assets/Scripts/AnimationEntity.cs b/Assets/Scripts/AnimationEntity.cs index e2018b7..63359d8 100644 --- a/Assets/Scripts/AnimationEntity.cs +++ b/Assets/Scripts/AnimationEntity.cs @@ -78,8 +78,13 @@ public class AnimationEntity : MonoBehaviour public void PlayDieAnim() { - _animatorEntity.speed = 1; - _animatorEntity.Play("die", 0, 0f); + // Not every entity needs an animator + if (_animatorEntity != null) + { + _animatorEntity.speed = 1; + _animatorEntity.Play("die", 0, 0f); + } + entityState = EntityAnimationState.Dying; _doSomething = true; _isDead = true;