Пример #1
0
        //add by lzp 19:29 2015/7/30 停止ai,重置所有怪物ACTOR_STATE
        public void pauseAllMonsterAction()
        {
            List <ActorObj> actorList = CoreEntry.gActorMgr.GetAllMonsterActors();

            for (int i = 0; i < actorList.Count; i++)
            {
                ActorObj actor = actorList[i];
                if (!actor.IsDeath())
                {
                    actor.ChangeState(ACTOR_STATE.AS_STAND);
                }
            }
        }
Пример #2
0
        // 某个召唤物需要被杀死
        static public void OnSummonDeath(int entityid)
        {
            ActorObj actorObj = CoreEntry.gActorMgr.GetActorByEntityID(entityid);

            if (actorObj != null)
            {
                if (!actorObj.IsDeath())
                {
                    if (actorObj.mActorType == ActorType.AT_TRAP)
                    {
                        //GameObject.Destroy(actorObj.gameObject);
                    }
                    actorObj.ChangeState(ACTOR_STATE.AS_DEATH);
                    CoreEntry.gActorMgr.RemoveActor(actorObj);

                    //CoreEntry.gObjPoolMgr.RecycleObject(actorObj.actorCreatureInfo.ID, actorObj.gameObject);
                }
            }
        }
Пример #3
0
        public void PlayAllMonsterDeathAction()
        {
            List <ActorObj> actorList = CoreEntry.gActorMgr.GetAllMonsterActors();

            for (int i = 0; i < actorList.Count; ++i)
            {
                ActorObj actorBase = actorList[i];
                //对IOS出现怪物不动 报错的异常  进行错误处理
                if (GameLogicMgr.checkValid(actorBase.gameObject) == false)
                {
                    continue;
                }
                if (actorBase.mActorType == ActorType.AT_MONSTER ||
                    actorBase.mActorType == ActorType.AT_BOSS ||
                    actorBase.mActorType == ActorType.AT_MECHANICS)
                {
                    if (!actorBase.IsDeath())
                    {
                        actorBase.ChangeState(ACTOR_STATE.AS_DEATH);
                    }
                }
            }
        }