| | |
| | | |
| | | protected SampleAI m_AIHandler; |
| | | |
| | | /// <summary> |
| | | /// 是否被英雄攻击了 |
| | | /// </summary> |
| | | public bool heroAttacked; |
| | | public int posIndex = -1; |
| | | |
| | | protected override void OnInit(GameNetPackBasic package) |
| | | { |
| | | base.OnInit(package); |
| | |
| | | // 战斗类型的怪物随机朝向 |
| | | 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() |
| | |
| | | } |
| | | |
| | | belongEventID = -1; |
| | | |
| | | if (posIndex != -1) |
| | | { |
| | | HeroRoundGird.Instance.Release(posIndex); |
| | | posIndex = -1; |
| | | } |
| | | base.OnUnit(); |
| | | } |
| | | |