少年修仙传客户端代码仓库
client_Hale
2019-04-11 852d0ae1e09bc83215d73cdd1387e30b9191ea21
382 增加进入技能释放状态的事件回调
2个文件已修改
28 ■■■■■ 已修改文件
Fight/Actor/State/SMB/STM_BaseAttack.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/GameActor/GA_Hero.cs 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Actor/State/SMB/STM_BaseAttack.cs
@@ -125,6 +125,8 @@
            if (owner.ServerInstID == PlayerDatas.Instance.PlayerId)
            {
                GA_Hero.CallOnStateEnter(animator.GetCurrentAnimatorClipInfo(0).Length);
                if (owner.State == E_ActorState.AutoRun)
                {
                    owner.StopPathFind();
@@ -153,6 +155,8 @@
                {
                    HeadUpSkillName.Popup(cacheSkillID, owner.Root.position, CameraController.Instance.CameraObject);
                }
            }
            if (_player is GA_Player)
@@ -247,6 +251,11 @@
        if (owner.ActorType == GameObjType.gotPlayer)
        {
            if (owner is GA_Hero)
            {
                GA_Hero.CallOnStateEnd();
            }
            GActorPlayerBase _player = owner as GActorPlayerBase;
            if (_player != null)
            {
Fight/GameActor/GA_Hero.cs
@@ -22,6 +22,25 @@
    //    }
    //}
    public static event UnityAction<float> OnStateEnter;
    public static event UnityAction OnStateEnd;
    public static void CallOnStateEnter(float length)
    {
        if (OnStateEnter != null)
        {
            OnStateEnter(length);
        }
    }
    public static void CallOnStateEnd()
    {
        if (OnStateEnd != null)
        {
            OnStateEnd();
        }
    }
    /// <summary>
    /// 当切换锁定目标的时候, 为空的时候id=0
    /// </summary>