少年修仙传客户端代码仓库
client_Wu Xijin
2019-03-07 6cd8d57e2417a034faae341d3be1e54d5e324582
Fight/GameActor/GA_NpcClientFightNorm.cs
@@ -50,6 +50,12 @@
    protected SampleAI m_AIHandler;
    /// <summary>
    /// 是否被英雄攻击了
    /// </summary>
    public bool heroAttacked;
    public int posIndex = -1;
    protected override void OnInit(GameNetPackBasic package)
    {
        base.OnInit(package);
@@ -73,10 +79,12 @@
        // 战斗类型的怪物随机朝向
        Rotation = Quaternion.Euler(0, UnityEngine.Random.Range(0, 360), 0);
        if (NpcConfig.IsBoss <= 1 && NpcConfig.AIType != 201)
        if (NpcConfig.IsBoss <= 1 && NpcConfig.AIType == 1)
        {
            m_AIHandler = new AI_Normal(this, BornPos);
            m_AIHandler = new AI_Npc_200(this, BornPos);
        }
        heroAttacked = false;
    }
    public override void OnClick()
@@ -137,7 +145,11 @@
        }
        belongEventID = -1;
        if (posIndex != -1)
        {
            HeroRoundGird.Instance.Release(posIndex);
            posIndex = -1;
        }
        base.OnUnit();
    }