少年修仙传客户端代码仓库
client_Hale
2018-12-08 61bface0c98ddb7f2df748f83606991f33cfcae5
4434 Npc与坐骑【翅膀、副手】的搭配形成新的Npc 穿插动作逻辑
3个文件已修改
50 ■■■■ 已修改文件
Fight/Actor/State/SMB/HorseIdle_6.cs 33 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/GameActor/GAStaticDefine.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/GameActor/GA_NpcFunc.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Actor/State/SMB/HorseIdle_6.cs
@@ -1,17 +1,40 @@
using UnityEngine;
using UnityEngine.Experimental.Director;
public class HorseIdle_6 : SMB_Base {
public class HorseIdle_6 : SMB_Base
{
    protected override void OnEnter(GActor owner, Animator animator, AnimatorStateInfo stateInfo, int layerIndex) {
    protected override void OnEnter(GActor owner, Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
    {
        base.OnEnter(owner, animator, stateInfo, layerIndex);
        if (owner.NextAction == GAStaticDefine.Act_HorseIdleTransfer)
        {
            if (stateInfo.shortNameHash == GAStaticDefine.State_HorseIdleHash)
            {
                owner.NextAction = GAStaticDefine.Act_HorseIdle;
            }else if(stateInfo.shortNameHash == GAStaticDefine.State_HorseIdle1Hash)
            {
                owner.NextAction = GAStaticDefine.Act_HorseIdle1;
            }else if(stateInfo.shortNameHash == GAStaticDefine.State_HorseIdle2Hash)
            {
                owner.NextAction = GAStaticDefine.Act_HorseIdle2;
            }else if(stateInfo.shortNameHash == GAStaticDefine.State_HorseIdle3Hash)
            {
                owner.NextAction = GAStaticDefine.Act_HorseIdle3;
            }else if(stateInfo.shortNameHash == GAStaticDefine.State_HorseIdle4Hash)
            {
                owner.NextAction = GAStaticDefine.Act_HorseIdle4;
            }
        }
    }
    protected override void OnUpdate(GActor owner, Animator animator, AnimatorStateInfo stateInfo, int layerIndex) {
    protected override void OnUpdate(GActor owner, Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
    {
        base.OnUpdate(owner, animator, stateInfo, layerIndex);
    }
    protected override void OnExit(GActor owner, Animator animator, AnimatorStateInfo stateInfo, int layerIndex) {
    protected override void OnExit(GActor owner, Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
    {
        base.OnExit(owner, animator, stateInfo, layerIndex);
    }
}
Fight/GameActor/GAStaticDefine.cs
@@ -73,6 +73,7 @@
    public const int Act_HorseRun2 = 72;
    public const int Act_HorseRun3 = 73;
    public const int Act_HorseRun4 = 74;
    public const int Act_HorseIdleTransfer = 666;
    public const int Act_AirIdle = 8;
    public const int Act_AirRun = 9;
    public const int Act_Attack1 = 10;
Fight/GameActor/GA_NpcFunc.cs
@@ -25,6 +25,7 @@
    protected override void OnInit(GameNetPackBasic package)
    {
        base.OnInit(package);
        m_H0406 = package as H0406_tagNPCAppear;
        if (m_H0406 == null)
@@ -377,7 +378,20 @@
    }
    protected override void OnLateUpdate() { }
    protected override void OnFixedUpdate() { }
    private float m_PlayDanceTime;
    protected override void OnFixedUpdate()
    {
        if (m_HorseModel)
        {
            if (Time.realtimeSinceStartup - m_PlayDanceTime > 10)
            {
                m_PlayDanceTime = Time.realtimeSinceStartup;
                NextAction = GAStaticDefine.Act_HorseIdleTransfer;
            }
        }
    }
    protected override void OnUpdate() { }
    public sealed override void Die() { }