123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
-
- using Chronos;
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- namespace AdonGameKit
- {
- /// <summary>
- /// anim事件接收类
- /// </summary>
- public class FBXEventYL : MonoBehaviour
- {
- GameObject m_Owner;
- /// <summary>
- /// 设置言灵类
- /// </summary>
- /// <param name="owner"></param>
- public void SetOwner(GameObject owner)
- {
- m_Owner = owner;
- }
- #region ============================================ Animation Event ============================================
- /// <summary>
- /// 普通攻击进入
- /// </summary>
- public void OnAttackStart()
- {
- if(m_Owner)
- {
- m_Owner.SendMessage("OnAttackStart");
- }
- }
- /// <summary>
- /// 普通攻击进入
- /// </summary>
- public void OnAttackOn(string attackId)
- {
- if(m_Owner)
- {
- m_Owner.SendMessage("OnAttackOn",attackId);
- }
- }
-
- /// <summary>
- /// 普通攻击结束
- /// </summary>
- public void OnAttackOff()
- {
- if(m_Owner)
- {
- m_Owner.SendMessage("OnAttackOff");
- }
- }
-
- /// <summary>
- /// 震屏
- /// </summary>
- public void OnShake(int lv = 0)
- {
- if(lv == 0)
- {
- //m_Owner.SetCameraShake(m_Owner.transform.position, 0.8f, 0.1f, 0.2f);
- }
- else if (lv == 1)
- {
- //m_Owner.SetCameraShake(m_Owner.transform.position, 2f, 0.1f, 0.3f);
- }
- }
-
- #endregion
- }
- }
|