protected void UpdateAnimationState(ActorAnimationState state) { transform.Find("Arm").gameObject.SetActive(state == ActorAnimationState.Attacking); if (state == ActorAnimationState.Attacking) { GetComponent<Animator>().SetTrigger("Attack"); } if (state == ActorAnimationState.Death) { Destroy(gameObject); } }
public override void AnimationStateUpdated(ActorAnimationState state) { UpdateAnimationState(state); if (state == ActorAnimationState.GettingHurt) { soundManager.playImpact(Catalogue.Type.BIG); } if (state == ActorAnimationState.Death) { soundManager.playImpact(Catalogue.Type.BIG); soundManager.playVox (_aiController.character, Catalogue.Type.DEATH); } }
public override void AnimationStateUpdated(ActorAnimationState state) { if (state == ActorAnimationState.GettingHurt) { Debug.Log("Ow"); soundManager.playPain(); soundManager.playImpact(Catalogue.Type.BIG); } if (state == ActorAnimationState.Death) { Debug.Log("Lose"); soundManager.playDeath(); soundManager.playImpact(Catalogue.Type.BIG); } UpdateAnimationState(state); }
public abstract void AnimationStateUpdated(ActorAnimationState state);