/// シーンの初期化
        public bool Init(DemoGame.SceneManager sceneMgr)
        {
            useSceneMgr = sceneMgr;

            calCollGrav = new ActorUnitCollGravity();
            calCollGrav.Init();

            moveCollMgr = new GameActorCollManager();
            moveCollMgr.Init();

            shapeMove = new ShapeSphere();
            shapeMove.Init(1);
            shapeMove.Set(0, StaticDataList.getVectorZero(), 0.001f);

            renderSph = new DemoGame.RenderGeometry();
            renderSph.MakeSphere();
///        trgObj        = null;

            /// 移動する自身のOBJを登録
            moveCollMgr.SetMoveShape(shapeMove);


            trgObjMoveSpd = 1.0f;
            setPlaceTypeParam(trgObjType);

            nowTaskId = debugMenuTaskId.SelectObj;
            changeTask(debugMenuTaskId.SelectObj);
            return(true);
        }
示例#2
0
/// private メソッド
///---------------------------------------------------------------------------

        /// 移動衝突対象OBJの登録
        private void setMoveCollTrgObj(ActorBulletBase actor)
        {
            GameCtrlManager      ctrlResMgr = GameCtrlManager.GetInstance();
            GameActorCollManager useCollMgr = actor.GetMoveCollManager();

            /// 移動する自身のOBJを登録
            useCollMgr.SetMoveShape(actor.GetUseObj(0).GetMoveShape());

            /// 対象を登録
            ctrlResMgr.SetCollisionActor(useCollMgr.TrgContainer, actor.BasePos);
        }
示例#3
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);
        }
示例#4
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);
        }
示例#5
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);
        }
        /// シーンの初期化
        public bool Init( DemoGame.SceneManager sceneMgr )
        {
            useSceneMgr = sceneMgr;

            calCollGrav    = new ActorUnitCollGravity();
            calCollGrav.Init();

            moveCollMgr = new GameActorCollManager();
            moveCollMgr.Init();

            shapeMove = new ShapeSphere();
            shapeMove.Init(1);
            shapeMove.Set( 0, StaticDataList.getVectorZero(), 0.001f );

            renderSph = new DemoGame.RenderGeometry();
            renderSph.MakeSphere();
            ///        trgObj        = null;

            /// 移動する自身のOBJを登録
            moveCollMgr.SetMoveShape( shapeMove );

            trgObjMoveSpd = 1.0f;
            setPlaceTypeParam( trgObjType );

            nowTaskId    = debugMenuTaskId.SelectObj;
            changeTask( debugMenuTaskId.SelectObj );
            return true;
        }