Exemple #1
0
        /// フレーム処理
        public bool Frame()
        {
            GameCtrlManager ctrlResMgr = GameCtrlManager.GetInstance();

            for (int i = 0; i < actorChList.Count; i++)
            {
                if (actorChList[i].ActiveFlg == true)
                {
                    GameActorCollManager useCollMgr = actorChList[i].GetMoveCollManager();

                    /// 他アクタからのイベントをチェック
                    ///-------------------------------------
                    if (actorChList[i].EventCntr.Num > 0)
                    {
                        ctrlResMgr.CtrlEvent.Play(actorChList[i], actorChList[i].EventCntr);
                    }

                    /// フレーム処理
                    ///-------------------------------------

                    if (actorChList[i].GetStateId() != ActorChBase.StateId.Dead && actorChList[i].GetStateId() != ActorChBase.StateId.Eat)
                    {
                        frameMove(actorChList[i]);
                    }

                    if (actorChList[i].firstFlag == true)
                    {
                        useCollMgr.SetMoveShape(GetUseActorBaseObj(i).GetMoveShape());
                        ctrlResMgr.SetCollisionActorEn(useCollMgr.TrgContainer, actorChList[i].BasePos);
                    }

                    actorChList[i].Frame();

                    /*
                     * if(actorChList[i].eatFlag == true){
                     *      ctrlResMgr.CtrlDestinationMark.EntryAddDestinationMark(actorChList[i].GetBodyPos());
                     * }
                     */

                    /// 自身発生のイベントをチェック
                    ///-------------------------------------
                    if (actorChList[i].EventCntr.Num > 0)
                    {
                        ctrlResMgr.CtrlEvent.Play(actorChList[i], actorChList[i].EventCntr);
                    }
                }
            }

            return(true);
        }
Exemple #2
0
        /// フレーム処理
        public bool Frame()
        {
            for (int i = 0; i < actorChList.Count; i++)
            {
                if (actorChList[i].ActiveFlg == true)
                {
                    GameActorCollManager useCollMgr = actorChList[i].GetMoveCollManager();
                    /// 他アクタからのイベントをチェック
                    ///-------------------------------------
                    if (actorChList[i].EventCntr.Num > 0)
                    {
                        ctrlResMgr.CtrlEvent.Play(actorChList[i], actorChList[i].EventCntr);
                    }

                    /// フレーム処理
                    ///-------------------------------------
                    if (actorChList[i].GetStateId() != ActorChBase.StateId.Dead && actorChList[i].GetStateId() != ActorChBase.StateId.Eat)
                    {
                        frameMove(actorChList[i]);
                    }

                    if (actorChList[i].firstFlag == true)
                    {
                        useCollMgr.SetMoveShape(GetUseActorBaseObj(i).GetMoveShape());
                        ctrlResMgr.SetCollisionActorEn(useCollMgr.TrgContainer, actorChList[i].BasePos);
                    }

                    actorChList[i].Frame();

//				actorChList[i].ActiveDisPlace = Common.VectorUtil.DistanceXZ(actorChList[i].GetBodyPos(), CtrlRandom.getRandom.CtrlPl.GetPos());

                    /// 自身発生のイベントをチェック
                    ///-------------------------------------
                    if (actorChList[i].EventCntr.Num > 0)
                    {
                        ctrlResMgr.CtrlEvent.Play(actorChList[i], actorChList[i].EventCntr);
                    }
                }
            }


            return(true);
        }
Exemple #3
0
        /// フレーム処理
        public bool Frame()
        {
            //Console.WriteLine(actorChList.Count);

//		if(stateId == CtrlStateId.Move && ZonbiList.Count == 0){		//戦闘開始まで数える
            if (ctrlResMgr.countTime == (int)Data.SetupValue.EnemyAppearTime)
            {
                EnemyDispearFlag = false;
                SetCtrlStateId(CtrlStateId.BattleMove);
                ctrlResMgr.battleStartFlag = true;
            }
            else if (ctrlResMgr.countTime == (int)Data.SetupValue.EnemyAppearTime + (int)Data.SetupValue.EnemyAppearingTime)
            {
                if (stateId != CtrlStateId.Move)
                {
                    SetCtrlStateId(CtrlStateId.Move);
                }
            }
            else if (ctrlResMgr.countTime > (int)Data.SetupValue.EnemyAppearTime + (int)Data.SetupValue.EnemyAppearingTime && EnemyDispearFlag == false)
            {
                float dis = Common.VectorUtil.DistanceXZ(EnemyCenterPos, ctrlResMgr.EnemyMoPos);
                if (dis < (int)Data.SetupValue.ToBattleMode * 3)
                {
                    EnemyDispearFlag       = true;
                    ctrlResMgr.ZonbiNumber = ZonbiList.Count;
                }
            }

            makeList();
            changeState();
            for (int i = 0; i < actorChList.Count; i++)
            {
                GameActorCollManager useCollMgr = actorChList[i].GetMoveCollManager();
                /// 他アクタからのイベントをチェック
                ///-------------------------------------
                if (actorChList[i].MovedFlag == true)
                {
                    Vector3 tempVector3 = actorChList[i].GetBodyPos() - new Vector3(ctrlResMgr.CtrlCam.GetCamPos().X, ctrlResMgr.CtrlPl.GetPos().Y, ctrlResMgr.CtrlCam.GetCamPos().X);
                    if (tempVector3.Cross(new Vector3(actorChList[i].BaseMtx.M31, actorChList[i].BaseMtx.M33, actorChList[i].BaseMtx.M33)).Y > 0)
                    {
                        actorChList[i].moveAngle = true;
                    }
                    else
                    {
                        actorChList[i].moveAngle = false;
                    }
                    actorChList[i].MovedFlag = false;
                }

                /// フレーム処理
                ///-------------------------------------
                if (actorChList[i].GetStateId() != ActorChBase.StateId.Dead && actorChList[i].GetStateId() != ActorChBase.StateId.Eat)
                {
                    switch (stateId)
                    {
                    case CtrlStateId.Move:                          frameMove(actorChList[i]);                      break;

                    case CtrlStateId.BattleMove:            frameBattleMove(actorChList[i]);      break;

                    case CtrlStateId.Battle:                        frameBattle(actorChList[i]);          break;

                    case CtrlStateId.MurderMove:            frameMurderMove(actorChList[i]);      break;

                    case CtrlStateId.Murder:                        frameMurder(actorChList[i]);          break;

                    case CtrlStateId.BreakTowerAndWall:     frameBreakTower(actorChList[i]);      break;

                    case CtrlStateId.Eat:                           frameEat(actorChList[i]);                       break;
                    }
                }
                useCollMgr.SetMoveShape(GetUseActorBaseObj(i).GetMoveShape());
                ctrlResMgr.SetCollisionActorEn(useCollMgr.TrgContainer, actorChList[i].BasePos);
                actorChList[i].Frame();
            }
            return(true);
        }