少年修仙传客户端代码仓库
client_Hale
2019-04-02 85f775ae6e905f54faad04841069da25fd663cb4
382 增加追随动作绑点的节点逻辑
1个文件已修改
30 ■■■■ 已修改文件
Fight/GameActor/GActor.cs 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/GameActor/GActor.cs
@@ -14,6 +14,7 @@
    public Transform MP_Down { get; protected set; }
    public Transform MP_Stun { get; protected set; }
    public Transform MP_Weapon { get; protected set; }
    public Transform MP_FollowDown { get; protected set; }
    public uint ClientInstID { get; protected set; }
    public uint ServerInstID { get; protected set; }
@@ -274,6 +275,14 @@
            m_PrevPos = Pos;
        }
        if (MP_Down)
        {
            if (MP_FollowDown)
            {
                MP_FollowDown.position = MP_Down.position;
            }
        }
        OnFixedUpdate();
    }
@@ -347,10 +356,6 @@
            m_SearchType = E_SearchType.Static;
            MoveTo(_validPos, keepDist);
        }
        // if (this is GA_Hero)
        // {
        //     Debug.Log("开始寻路至点: " + destPos);
        // }
    }
    public void ClearPathFindTarget()
@@ -368,9 +373,10 @@
            return;
        }
        // if (this is GA_Hero)
        // if (this is GActorNpcFight
        // && (ServerInstID == 133 || ServerInstID == 134 || ServerInstID == 112))
        // {
        //     Debug.Log("停止寻路");
        //     Debug.LogFormat("{0} 停止寻路至点: ", ServerInstID);
        // }
        TargetActor = null;
@@ -433,6 +439,12 @@
            }
            Run();
            State = E_ActorState.AutoRun;
            // if (this is GActorNpcFight
            //  && (ServerInstID == 133 || ServerInstID == 134 || ServerInstID == 112))
            // {
            //     Debug.LogFormat("{0} 开始寻路至点: {1}", ServerInstID, position);
            // }
        }
    }
@@ -635,6 +647,12 @@
        {
            MP_Down = parent;
        }
        if (!MP_FollowDown)
        {
            MP_FollowDown = new GameObject("Follow_Down").transform;
            MP_FollowDown.SetParent(Root);
        }
    }
    public static void ForceCrossFade(Animator animator, int name, float transitionDuration, int layer = 0, float normalizedTime = float.NegativeInfinity)