using System.Collections; using System.Collections.Generic; using UnityEngine; public class PuzzleMonsterBodyDisplayer : MonoBehaviour { public Animator Animator; private void Start() { if (PuzzleGameMode.main.GameStarted) { StartDisplayer(); } else { PuzzleGameMode.main.OnAfterGameStarted += StartDisplayer; } } private void StartDisplayer() { PuzzleGameMode.main.Monster.OnAfterDamagedEvent += OnAfterDamaged; PuzzleGameMode.main.Monster.OnAfterPreReleaseSkillEvent += OnAftePreReleaseSkill; } private void OnAfterDamaged(PuzzleGameMode.DamageMonsterParam param) { Animator.SetTrigger("BeAttack"); } private void OnAftePreReleaseSkill(PuzzleGameMode.PreReleaseSkillParam param) { Animator.SetTrigger("ReleaseSkill"); } }