WXMC/.svn/pristine/6a/6a0253c737caea0a044e2ec9ef8bed3f5199f7ea.svn-base
2024-12-04 16:18:46 +08:00

38 lines
890 B
Plaintext

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");
}
}