예제 #1
0
        private void actorSpeek(ActorChHobit actorCh)
        {
            actorCh.AiMoveCount = (int)(Data.SetupValue.CharMoveChangeTime + StaticDataList.getRandom(-(int)(Data.SetupValue.CharMoveChangeRandTime), (int)Data.SetupValue.CharMoveChangeRandTime));
            if (actorCh.texId != (int)Data.Tex2dResId.Zonbi1 && actorCh.texId != (int)Data.Tex2dResId.Necromancer1)
            {
                if (StaticDataList.getRandom(0, 100) < (int)Data.SetupValue.BaloonAppearRand && actorCh.deadFlagSp == true && speakCount < 6)
                {
                    actorCh.setAppearCountSp((int)Data.SetupValue.AppearAndLeaveTime);
                    speakCount++;
                    int charVoNumber = StaticDataList.getRandom(3);
                    switch (charVoNumber)
                    {
                    case 0: AppSound.GetInstance().PlaySeCamDis(AppSound.SeId.CharVo1, actorCh.GetBodyPos()); break;

                    case 1: AppSound.GetInstance().PlaySeCamDis(AppSound.SeId.CharVo2, actorCh.GetBodyPos()); break;

                    case 2: AppSound.GetInstance().PlaySeCamDis(AppSound.SeId.CharVo3, actorCh.GetBodyPos()); break;
                    }
                }
            }
            else if (actorCh.texId == (int)Data.Tex2dResId.Zonbi1)
            {
                if (StaticDataList.getRandom(0, 100) < (int)Data.SetupValue.GionAppearRand && actorCh.deadFlagSp == true && speakCount < 6)
                {
                    actorCh.setAppearCountSp((int)Data.SetupValue.GionAppearSpeed);
                    speakCount++;
                    AppSound.GetInstance().PlaySeCamDis(AppSound.SeId.ZonbiVo3, actorCh.GetBodyPos());
                }
            }
        }
예제 #2
0
/// public メソッド
///---------------------------------------------------------------------------

        /// シーンの初期化
        public bool Init(DemoGame.SceneManager sceneMgr)
        {
            /// ゲーム制御開始
            GameCtrlManager.GetInstance().Start();

            /// 配置情報のセット
            SetupObjPlaceData.Load();

            setupLyout();

            AppSound.GetInstance().PlayBgm(AppSound.BgmId.Main, true);

            AppDispEff.GetInstance().SetFadeIn(0xffffff, 10, true);

            useSceneMgr = sceneMgr;

            GameCtrlManager ctrlResMgr = GameCtrlManager.GetInstance();

            DemoGame.GraphicsDevice useGraphDev = ctrlResMgr.GraphDev;

            pauseFlag = false;


            return(true);
        }
예제 #3
0
/// public メソッド
///---------------------------------------------------------------------------

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

            AppLyout.GetInstance().ClearSpriteAll();

            GameCtrlManager ctrlResMgr = GameCtrlManager.GetInstance();

            if (ctrlResMgr.CtrlPl.Hp <= 0)
            {
                AppLyout.GetInstance().SetSprite(AppLyout.SpriteId.Mess_GAMEOVER);
                AppSound.GetInstance().PlayBgm(AppSound.BgmId.Gameover, false);
            }
            else
            {
                AppLyout.GetInstance().SetSprite(AppLyout.SpriteId.Mess_ENEMYALLCLEAR);
                AppSound.GetInstance().PlayBgm(AppSound.BgmId.Clear, false);
            }

            alphaCnt = 0;
            alpha    = 0.0f;

            return(true);
        }
예제 #4
0
        /// 死亡
        private bool statePlayDead()
        {
            Vector3 effPos = new Vector3(0, 0, 0);

            switch (statePlayTask)
            {
            /// 終了待ち
            case 0:
                Common.VectorUtil.Set(ref effPos, objCh.BodyPos.X, objCh.BodyPos.Y, objCh.BodyPos.Z);

                EventCntr.Add(ActorEventId.Effect, (int)Data.EffTypeId.Eff05, effPos);

                AppSound.GetInstance().PlaySeCamDis(AppSound.SeId.ObjBreak, BasePos);

                deadCnt = 0;
                statePlayTask++;
                break;

            /// エフェクト余韻
            case 1:
                deadCnt++;
                if (deadCnt >= 25)
                {
                    Enable = false;
                }
                break;
            }

            return(true);
        }
예제 #5
0
        /// フレーム処理
        public bool Update()
        {
            switch (taskId)
            {
            case 0:
                taskId++;
                break;

            case 1:
                /// リソース管理クラスの初期化
                Data.ModelDataManager.GetInstance().Init((int)Data.ModelResId.Max,
                                                         (int)Data.ModelTexResId.Max, (int)Data.ModelShaderReslId.Max);
                Data.CharParamDataManager.GetInstance().Init(5);
                taskId++;
                break;

            case 2:
                /// レイアウト&2D素材の読み込み
                AppLyout.GetInstance().Load();

                /// サウンドの読み込み
                AppSound.GetInstance().Init();

                loadModelData();
                loadParamData();

                useSceneMgr.Next((new SceneTitle()), false);
                break;
            }

            return(true);
        }
예제 #6
0
        /// フレーム処理
        protected override bool DoFrame()
        {
            /// 壊れる
            if (brokenFlg == true)
            {
                /// 草を刈る
                if (fixTypeId == Data.FixTypeId.Fix03)
                {
                    EventCntr.Add(ActorEventId.Effect, (int)Data.EffTypeId.Eff11, BasePos);
                }

                /// 木製の備品の破壊
                else
                {
                    EventCntr.Add(ActorEventId.Effect, (int)Data.EffTypeId.Eff09, BasePos);
                    AppSound.GetInstance().PlaySeCamDis(AppSound.SeId.ObjBreak, BasePos);
                }

                Enable = false;
                return(false);
            }

            objFix.Frame();
            return(true);
        }
예제 #7
0
        /// 歩く
        private bool statePlayMove()
        {
            if (moveCnt >= 12)
            {
                if (movePow != 0.0f)
                {
                    AppSound.GetInstance().PlaySe(AppSound.SeId.PlFoot);
                }
                moveCnt = 0;
            }
            moveCnt++;

            /// 移動
            if (movePow != 0.0f)
            {
                unitCmnPlay.SetMoveActor(moveVec, movePow);
            }

            /// 旋回
            if (moveTurn != 0.0f)
            {
                unitCmnPlay.SetRot(moveTurn);
            }

            movePow  = 0.0f;
            moveTurn = 0.0f;
            return(true);
        }
        /// 命令:SE再生

        /**
         *  ATB[0]    : SEのNo.
         **/
        private void cmdActSetSePlay(int cmdIdx)
        {
            int seId = usePlayAct.GetAtb(cmdIdx, 0);

            GameActorProduct trgActor = useUnitCmn.GetUseActor();

            AppSound.GetInstance().PlaySeCamDis((AppSound.SeId)seId, trgActor.BasePos);
        }
예제 #9
0
        /// フレーム処理
        public bool Update()
        {
            switch (taskId)
            {
            case 0:
                if (AppSound.GetInstance().IsBgmPlaing() == false)
                {
                    AppLyout.GetInstance().SetSprite(AppLyout.SpriteId.TouchScreen);
                    taskId++;
                }
                break;

            case 1:
                if (AppInput.GetInstance().TouchRelease == true)
                {
                    alphaCnt = 0;
                    AppDispEff.GetInstance().SetFadeOut(0xffffff, 5, true);
                    taskId++;
                    break;
                }

                alphaCnt++;
                if (alphaCnt < 100)
                {
                    alpha += 0.02f;
                    if (alpha >= 1.0f)
                    {
                        alpha    = 1.0f;
                        alphaCnt = 100;
                    }
                }
                else
                {
                    alpha -= 0.02f;
                    if (alpha < 0.25f)
                    {
                        alpha    = 0.25f;
                        alphaCnt = 0;
                    }
                }
                break;

            case 2:
                if (AppDispEff.GetInstance().NowEffId != AppDispEff.EffId.FadeOut)
                {
                    useSceneMgr.Next((new SceneTitle()), false);
                }
                alpha = 0.0f;
                break;
            }

            GameCtrlManager ctrlResMgr = GameCtrlManager.GetInstance();

            ctrlResMgr.FrameResult();

            AppLyout.GetInstance().SetAlpha(AppLyout.SpriteId.TouchScreen, alpha);
            return(true);
        }
예제 #10
0
        /// フレーム処理
        public override bool DoFrame()
        {
            if (TexId + (int)Data.Tex2dResId.TowerStart != (int)Data.Tex2dResId.Bosstower)
            {
                if (glowNumber == 3)
                {
                    glowCounter = (int)Data.SetupValue.ToNextStageCount * 3;
                    glowFinish  = true;
                }
                if (glowCounter >= (int)Data.SetupValue.ToNextStageCount * 3)
                {
                    if (glowCounter == (int)Data.SetupValue.ToNextStageCount * 3 && glowNumber == 2)
                    {
                        changeFlag = true;
                        AppSound.GetInstance().PlaySeCamDis(AppSound.SeId.MakeMo, BodyPos);

                        glowNumber++;
                    }
                    else if (appearCount == (int)Data.SetupValue.AppearAndLeaveTime && changeFlag == true)
                    {
                        changeFlag = false;
                        startforChange(TexId);
                    }
                }
                else if (glowCounter >= (int)Data.SetupValue.ToNextStageCount * 2)
                {
                    if (glowCounter == (int)Data.SetupValue.ToNextStageCount * 2 && glowNumber == 1)
                    {
                        changeFlag = true;
                        AppSound.GetInstance().PlaySeCamDis(AppSound.SeId.MakeTower1, BodyPos);
                        glowNumber++;
                    }
                    else if (appearCount == (int)Data.SetupValue.AppearAndLeaveTime && changeFlag == true)
                    {
                        changeFlag = false;
                        startforChange((int)Data.Tex2dResId.MakingWall3);
                    }
                }
                else if (glowCounter >= (int)Data.SetupValue.ToNextStageCount)
                {
                    if (glowCounter == (int)Data.SetupValue.ToNextStageCount && glowNumber == 0)
                    {
                        changeFlag = true;
                        AppSound.GetInstance().PlaySeCamDis(AppSound.SeId.MakeTower2, BodyPos);
                        glowNumber++;
                    }
                    else if (appearCount == (int)Data.SetupValue.AppearAndLeaveTime && changeFlag == true)
                    {
                        changeFlag = false;
                        startforChange((int)Data.Tex2dResId.MakingWall2);
                    }
                }
            }

//        useMdlHdl.UpdateAnim();
            return(true);
        }
예제 #11
0
 private void battleEffect(ActorChHobit actorCh)
 {
     if (StaticDataList.getRandom(0, (int)Data.SetupValue.BattleEffectRand + 1) == 0)
     {
         AppSound.GetInstance().PlaySeCamDis(AppSound.SeId.PlDamage, actorCh.GetBodyPos());
         //ctrlResMgr.CtrlPl.Addeffect(new Vector3( actorCh.BasePos.X + StaticDataList.getRandom(-15,15)/5.0f ,actorCh.BasePos.Y + 0.2f ,actorCh.BasePos.Z+ StaticDataList.getRandom(-15,15)/5.0f));
         ctrlResMgr.AddEffectFromEnemy = true;
         ctrlResMgr.AddEnemyEffectPos  = actorCh.BasePos;
     }
 }
예제 #12
0
        /// 開始
        public override bool DoStart()
        {
            objBullet.Start();
            objBullet.SetScale(0.25f);

            calCollMove.SetMoveType(Data.CollTypeId.BullMove);

            moveLife = lifeFrameMax;    /// 移動寿命フレーム

            AppSound.GetInstance().PlaySe(AppSound.SeId.PlSpelAtk);
            return(true);
        }
예제 #13
0
        /// 食べられる
        private bool statePlayEat()
        {
            GameCtrlManager ctrlResMgr = GameCtrlManager.GetInstance();

            switch (statePlayTask)
            {
            case 0:
                statePlayTask++;
                break;

            /// 終了待ち
            case 1:
                statePlayTask++;
                //食われる動作
                break;

            /// エフェクト余韻
            case 2:
                EatAngle = new Vector3(ctrlResMgr.CtrlCam.GetCamPos().X, ctrlResMgr.CtrlCam.GetCamPos().Y - 1.0f, ctrlResMgr.CtrlCam.GetCamPos().Z) - BasePos;
                BasePos += EatAngle.Normalize() * (int)(Data.SetupValue.EatingSpeed) / 10.0f;
                float dis = Common.VectorUtil.Distance(BasePos, ctrlResMgr.CtrlCam.GetCamPos());
                if (dis < (int)Data.SetupValue.EatingDeadArea / 10.0f)
                {
                    statePlayTask++;
                }
                break;

            case 3:
//            EventCntr.Add( ActorEventId.Effect, (int)Data.EffTypeId.Eff05, BasePos );
                AppSound.GetInstance().PlaySeCamDis(AppSound.SeId.ObjBreak, BasePos);
                if (objCh.glowNumber == 0)
                {
                    ctrlResMgr.EatCharNumber = (int)Data.Tex2dResId.Gareki;
                }
                else if (objCh.glowNumber == 1)
                {
                    ctrlResMgr.EatCharNumber = (int)Data.Tex2dResId.GarekiWall;
                }
                else if (objCh.glowNumber == 2)
                {
                    ctrlResMgr.EatCharNumber = TexId + (int)Data.Tex2dResId.HouseStart;
                }
                ctrlResMgr.EatingFlag = true;
                Enable = false;
                break;
            }
            return(true);
        }
예제 #14
0
        /// ゲームスタート時のメッセージ
        private void renderStartMess()
        {
            DemoGame.GraphicsDevice useGraphDev = ctrlResMgr.GraphDev;

            int strW = DemoGame.Graphics2D.CurrentFont.GetTextWidth(strStartMess[outputString]);
            int strH = DemoGame.Graphics2D.CurrentFont.Size;

            DemoGame.Graphics2D.FillRect(0x80000000, 0, useGraphDev.DisplayHeight / 2 - strH / 2 - 5, useGraphDev.DisplayWidth, strH + 10);
            DemoGame.Graphics2D.AddSprite("Mess", strStartMess[outputString], 0xffffffff,
                                          useGraphDev.DisplayWidth - (useGraphDev.DisplayWidth + strW) * startMessCnt / 180, useGraphDev.DisplayHeight / 2 - strH / 2);

            if (startMessCnt == 0)
            {
                AppSound.GetInstance().PlaySe(AppSound.SeId.Anous);
            }
        }
예제 #15
0
 /// フレーム処理
 public override bool DoFrame()
 {
     if (TexId != (int)Data.Tex2dResId.BossWall)
     {
         if (glowNumber == 2)
         {
             glowCounter = (int)Data.SetupValue.ToNextStageCount * 3;
             glowFinish  = true;
         }
         if (glowCounter >= (int)Data.SetupValue.ToNextStageCount * 2)
         {
             if (glowCounter == (int)Data.SetupValue.ToNextStageCount * 2 && glowNumber == 1)
             {
                 changeFlag = true;
                 AppSound.GetInstance().PlaySeCamDis(AppSound.SeId.MakeMo, BodyPos);
                 glowNumber++;
             }
             if (appearCount == (int)Data.SetupValue.AppearAndLeaveTime && changeFlag == true)
             {
                 changeFlag = false;
                 startforChange(TexId);
             }
         }
         else if (glowCounter >= (int)Data.SetupValue.ToNextStageCount)
         {
             if (glowCounter == (int)Data.SetupValue.ToNextStageCount && glowNumber == 0)
             {
                 changeFlag = true;
                 AppSound.GetInstance().PlaySeCamDis(AppSound.SeId.MakeTower1, BodyPos);
                 glowNumber++;
             }
             if (appearCount == (int)Data.SetupValue.AppearAndLeaveTime && changeFlag == true)
             {
                 changeFlag = false;
                 startforChange((int)Data.Tex2dResId.GarekiWall);
             }
         }
     }
     return(true);
 }
예제 #16
0
        /// フレーム処理
        public override bool DoFrame()
        {
            movePos.X = BasePos.X + BaseMtx.M31 * 1.0f;
            movePos.Y = BasePos.Y + BaseMtx.M32 * 1.0f;
            movePos.Z = BasePos.Z + BaseMtx.M33 * 1.0f;

            moveLife--;

            // 移動寿命
            if (moveLife <= 0)
            {
                EventCntr.Add(ActorEventId.Effect, (int)Data.EffTypeId.Eff08, BasePos);
                this.Enable = false;
            }

            /// 移動
            else if (calCollMove.Check(moveCollMgr, movePos) == true)
            {
                EventCntr.Add(ActorEventId.Effect, (int)Data.EffTypeId.Eff08, BasePos);

                if (moveCollMgr.TrgContainer.GetEntryObjParent(0).EventCntr != null)
                {
                    moveCollMgr.TrgContainer.GetEntryObjParent(0).EventCntr.Add(ActorEventId.Damage, (int)Data.AttackTypeId.Magic, null);
                    moveCollMgr.TrgContainer.GetEntryObjParent(0).EventCntr.Add(ActorEventId.LookTrg, 0, BasePos);
                }

                AppSound.GetInstance().PlaySeCamDis(AppSound.SeId.EnSpelHit, BasePos);
                this.Enable = false;
            }
            else
            {
                BasePos = calCollMove.NextPos;
            }

            Common.MatrixUtil.SetTranslate(ref BaseMtx, BasePos);
            objBullet.SetMatrix(BaseMtx);

            objBullet.Frame();
            return(true);
        }
예제 #17
0
        /// ダメージ演出
        private void setDamageEff()
        {
            /// 攻撃対象の方向へ向く
            if (dmgTrgObj != null)
            {
                Vector4 x   = new Vector4(0, 0, 0, 0);
                Vector4 y   = new Vector4(0, 0, 0, 0);
                Vector4 z   = new Vector4(0, 0, 0, 0);
                Vector4 w   = new Vector4(0, 0, 0, 0);
                Matrix4 mtx = new Matrix4(x, y, z, w);
                Vector3 vec = new Vector3((dmgTrgObj.Mtx.M41 - objCh.Mtx.M41), 0.0f, (dmgTrgObj.Mtx.M43 - objCh.Mtx.M43));
                Common.MatrixUtil.LookTrgVec(ref mtx, vec);
                Common.MatrixUtil.SetTranslate(ref mtx, BasePos);
                this.SetPlace(mtx);
            }

            /// エフェクト表示
            Vector3 effPos = new Vector3(objCh.Mtx.M41 + objCh.Mtx.M31 * 0.25f, objCh.Mtx.M42 + 0.9f, objCh.Mtx.M43 + objCh.Mtx.M33 * 0.25f);

            EventCntr.Add(ActorEventId.Effect, (int)Data.EffTypeId.Eff12, effPos);
            AppSound.GetInstance().PlaySe(AppSound.SeId.PlDamage);
        }
예제 #18
0
        /// 死亡
        private bool statePlayDead()
        {
            Vector3 effPos = new Vector3(0, 0, 0);

            switch (statePlayTask)
            {
            /// 終了待ち
            case 0:
//            if( mvtHdl.IsActive() == false ){
                Common.VectorUtil.Set(ref effPos, objCh.BodyPos.X, objCh.BodyPos.Y, objCh.BodyPos.Z);

/*				switch(chTypeId){
 *              case Data.ChTypeId.MonsterA:        effPos.Y -= 0.6f;            break;
 *              case Data.ChTypeId.MonsterB:        effPos.Y -= 0.1f;            break;
 *              case Data.ChTypeId.MonsterC:        effPos.Y -= 0.1f;            break;
 *              }
 */
                EventCntr.Add(ActorEventId.Effect, (int)Data.EffTypeId.Eff05, effPos);

                AppSound.GetInstance().PlaySeCamDis(AppSound.SeId.ObjBreak, BasePos);

                deadCnt = 0;
                statePlayTask++;
                //           }
                break;

            /// エフェクト余韻
            case 1:
                deadCnt++;
                if (deadCnt >= 25)
                {
                    Enable = false;
                }
                break;
            }

            return(true);
        }
예제 #19
0
        /// 死亡
        private bool statePlayDead()
        {
            Vector3 effPos = StaticDataList.getVectorZero();

            switch (statePlayTask)
            {
            case 0:
                AppSound.GetInstance().PlaySeCamDis(AppSound.SeId.ObjBreak, BasePos);
                deadCnt = 0;
                statePlayTask++;
                break;

            /// エフェクト余韻
            case 1:
                deadCnt++;
                if (deadCnt >= 15)
                {
                    Enable = false;
                }
                break;
            }

            return(true);
        }
예제 #20
0
        /// 破棄
        public override bool DoTerm()
        {
            if (sceneMgr != null)
            {
                sceneMgr.Term();
            }
            sceneMgr = null;

            GameCtrlManager ctrlResMgr = GameCtrlManager.GetInstance();

            ctrlResMgr.Term();

            AppDispEff.GetInstance().Term();

            AppDebug.Term();
            AppInput.GetInstance().Term();
            AppLyout.GetInstance().Term();
            AppSound.GetInstance().Term();
            DemoGame.RenderGeometry.Term();

            Data.ModelDataManager.GetInstance().Term();

            return(true);
        }
예제 #21
0
        /// 食べられる
        private bool statePlayEat()
        {
            GameCtrlManager ctrlResMgr = GameCtrlManager.GetInstance();

            switch (statePlayTask)
            {
            case 0:
                statePlayTask++;
                break;

            /// 終了待ち
            case 1:
                EatAngle = new Vector3(ctrlResMgr.CtrlCam.GetCamPos().X, ctrlResMgr.CtrlCam.GetCamPos().Y - 1.0f, ctrlResMgr.CtrlCam.GetCamPos().Z) - BasePos;
                statePlayTask++;
                //食われる動作
                break;

            /// エフェクト余韻
            case 2:
                BasePos += EatAngle.Normalize() * (int)(Data.SetupValue.EatingSpeed) / 10.0f;
                float dis = Common.VectorUtil.Distance(BasePos, ctrlResMgr.CtrlCam.GetCamPos());
                if (dis < (int)Data.SetupValue.EatingDeadArea / 10.0f)
                {
                    statePlayTask++;
                }
                break;

            case 3:
//            EventCntr.Add( ActorEventId.Effect, (int)Data.EffTypeId.Eff05, BasePos );
                AppSound.GetInstance().PlaySeCamDis(AppSound.SeId.Eat, BasePos);
                ctrlResMgr.EatingFlag = true;
                Enable = false;
                break;
            }
            return(true);
        }
예제 #22
0
        /// 死亡
        private bool statePlayDead()
        {
            Vector3 effPos = StaticDataList.getVectorZero();

            switch (statePlayTask)
            {
            /// 死亡セット
            case 0:
                //           mvtHdl.SetPlayMvt( (int)Data.ChMvtResId.Dead, false );

                /// 攻撃対象の方向へ向く
                if (dmgTrgObj != null)
                {
                    Vector4 x   = new Vector4(0, 0, 0, 0);
                    Vector4 y   = new Vector4(0, 0, 0, 0);
                    Vector4 z   = new Vector4(0, 0, 0, 0);
                    Vector4 w   = new Vector4(0, 0, 0, 0);
                    Matrix4 mtx = new Matrix4(x, y, z, w);
                    Vector3 vec;
                    vec.X = dmgTrgObj.Mtx.M41 - objCh.Mtx.M41;
                    vec.Y = 0.0f;
                    vec.Z = dmgTrgObj.Mtx.M43 - objCh.Mtx.M43;
                    Common.MatrixUtil.LookTrgVec(ref mtx, vec);
                    Common.MatrixUtil.SetTranslate(ref mtx, BasePos);
                    this.SetPlace(mtx);
                }
                statePlayTask++;
                break;

            /// 終了待ち
            case 1:
//            if( mvtHdl.IsActive() == false ){

                //Common.VectorUtil.Set( ref effPos, objCh.BodyPos.X, objCh.BodyPos.Y, objCh.BodyPos.Z );

/*
 *              switch(chTypeId){
 *              case Data.ChTypeId.MonsterA:        effPos.Y -= 0.6f;            break;
 *              case Data.ChTypeId.MonsterB:        effPos.Y -= 0.1f;            break;
 *              case Data.ChTypeId.MonsterC:        effPos.Y -= 0.1f;            break;
 *              }
 */

//                EventCntr.Add( ActorEventId.Effect, (int)Data.EffTypeId.Eff05, effPos );

                AppSound.GetInstance().PlaySeCamDis(AppSound.SeId.ObjBreak, BasePos);
                deadCnt = 0;
                statePlayTask++;
                break;

            /// エフェクト余韻
            case 2:
                deadCnt++;
                if (deadCnt >= 15)
                {
                    Enable = false;
                }
                break;
            }

            return(true);
        }
예제 #23
0
        /// 食べられる
        private bool statePlayEat()
        {
            if (objCh.texId != (int)Data.Tex2dResId.Necromancer1)
            {
                if (ctrlResMgr.CtrlCam.camModeId == CtrlCamera.ModeId.CloseLook || ctrlResMgr.CtrlCam.camModeId == CtrlCamera.ModeId.CloseLookToNormal || ctrlResMgr.CtrlCam.camModeId == CtrlCamera.ModeId.NormalToCloseLook)
                {
                    switch (statePlayTask)
                    {
                    case 0:
                        statePlayTask++;
                        break;

                    /// 終了待ち
                    case 1:
                        ActiveDis = 0.001f;
                        statePlayTask++;
                        //食われる動作
                        break;

                    /// エフェクト余韻
                    case 2:
                        EatAngle = new Vector3(ctrlResMgr.CtrlCam.GetCamPos().X, ctrlResMgr.CtrlCam.GetCamPos().Y - 1.0f, ctrlResMgr.CtrlCam.GetCamPos().Z) - BasePos;
                        BasePos += EatAngle.Normalize() * (int)(Data.SetupValue.EatingSpeed) / 10.0f;
                        float dis = Common.VectorUtil.DistanceY(BasePos, ctrlResMgr.CtrlCam.GetCamPos());
                        if (dis < (int)Data.SetupValue.EatingDeadArea / 10.0f)
                        {
                            statePlayTask++;
                        }
                        break;

                    case 3:
                        //            EventCntr.Add( ActorEventId.Effect, (int)Data.EffTypeId.Eff05, BasePos );
                        AppSound.GetInstance().PlaySeCamDis(AppSound.SeId.Eat, BasePos);
                        ctrlResMgr.EatingFlag    = true;
                        ctrlResMgr.EatCharNumber = objCh.texId;
                        Enable = false;

                        break;
                    }
                }
                else
                {
                    ctrlResMgr.EatCharNumber = objCh.texId;
                    Enable = false;
                }
            }
            else
            {
                switch (statePlayTask)
                {
                case 0:
                    statePlayTask++;
                    break;

                /// 終了待ち
                case 1:
                    ctrlResMgr.changePlAni = true;
                    ctrlResMgr.eatingBoss  = true;
                    ctrlResMgr.CtrlCam.SetCamMode(CtrlCamera.ModeId.NormalToLookMyself);
                    EatAngle = new Vector3(ctrlResMgr.CtrlCam.GetCamPos().X, ctrlResMgr.CtrlCam.GetCamPos().Y - 1.0f, ctrlResMgr.CtrlCam.GetCamPos().Z) - BasePos;
                    //BasePos.X = ctrlResMgr.CtrlPl.GetPos().X + FMath.Sin( ctrlResMgr.CtrlCam.GetCamRot().Y / 180 *FMath.PI)*5;
                    //BasePos.Y = 2;
                    //BasePos.Z = ctrlResMgr.CtrlPl.GetPos().Z + FMath.Cos( ctrlResMgr.CtrlCam.GetCamRot().Y / 180 *FMath.PI)*5;;
                    float angleY = ctrlResMgr.CtrlPl.GetRotY() - 30;
                    if (angleY < -360.0f)
                    {
                        angleY += 360.0f;
                    }
                    else if (angleY > 360.0f)
                    {
                        angleY -= 360.0f;
                    }

                    BasePos.X = ctrlResMgr.CtrlPl.GetPos().X + FMath.Sin(angleY * FMath.PI / 180.0f) * 19;
                    BasePos.Z = ctrlResMgr.CtrlPl.GetPos().Z + FMath.Cos(angleY * FMath.PI / 180.0f) * 19;
                    BasePos.Y = ctrlResMgr.CtrlPl.GetPos().Y;

                    eatingTime = 0;
                    moveAngle  = false;
                    statePlayTask++;
                    //食われる動作
                    break;

                /// エフェクト余韻
                case 2:
                    float angleY2 = ctrlResMgr.CtrlPl.GetRotY() - 30;
                    if (angleY2 < -360.0f)
                    {
                        angleY2 += 360.0f;
                    }
                    else if (angleY2 > 360.0f)
                    {
                        angleY2 -= 360.0f;
                    }

//				BasePos.X = ctrlResMgr.CtrlPl.GetPos().X + FMath.Sin ( angleY2 * FMath.PI / 180.0f ) * (19 - 12* FMath.Cos ( (1-eatingTime / 40.0f) * FMath.PI/2 ));
//				BasePos.Z = ctrlResMgr.CtrlPl.GetPos().Z + FMath.Cos ( angleY2 * FMath.PI / 180.0f ) * (19 - 12* FMath.Cos ( (1-eatingTime / 40.0f) * FMath.PI/2 ));
                    BasePos.X = ctrlResMgr.CtrlPl.GetPos().X + FMath.Sin(angleY2 * FMath.PI / 180.0f) * 19;
                    BasePos.Z = ctrlResMgr.CtrlPl.GetPos().Z + FMath.Cos(angleY2 * FMath.PI / 180.0f) * 19;
                    BasePos.Y = ctrlResMgr.CtrlPl.GetPos().Y + FMath.Sin(eatingTime / 80.0f * FMath.PI) * 13.0f;
                    eatingTime++;

                    if (eatingTime > 30)
                    {
                        statePlayTask++;
                    }
                    float dis = Common.VectorUtil.DistanceY(BasePos, ctrlResMgr.CtrlCam.GetCamPos());


                    /*
                     * if(dis < (int)Data.SetupValue.EatingDeadArea){
                     * statePlayTask ++;
                     * }*/
                    break;

                case 3:
                    float angleY3 = ctrlResMgr.CtrlPl.GetRotY() - 30;
                    if (angleY3 < -360.0f)
                    {
                        angleY3 += 360.0f;
                    }
                    else if (angleY3 > 360.0f)
                    {
                        angleY3 -= 360.0f;
                    }

                    BasePos.X = ctrlResMgr.CtrlPl.GetPos().X + FMath.Sin(angleY3 * FMath.PI / 180.0f) * 19 * (1 - (eatingTime - 30) / 40.0f) + FMath.Sin(ctrlResMgr.CtrlPl.GetRotY() * FMath.PI / 180.0f) * 3 * (eatingTime - 30) / 40.0f;
                    BasePos.Z = ctrlResMgr.CtrlPl.GetPos().Z + FMath.Cos(angleY3 * FMath.PI / 180.0f) * 19 * (1 - (eatingTime - 30) / 40.0f) + FMath.Cos(ctrlResMgr.CtrlPl.GetRotY() * FMath.PI / 180.0f) * 3 * (eatingTime - 30) / 40.0f;

                    if (eatingTime < 40)
                    {
                        BasePos.Y = ctrlResMgr.CtrlPl.GetPos().Y + FMath.Sin(eatingTime / 80.0f * FMath.PI) * 13.0f;
                    }
                    eatingTime++;
                    if (eatingTime > 55)
                    {
                        statePlayTask++;
                        eatingTime = 0;
                    }

                    break;

                case 4:
                    //            EventCntr.Add( ActorEventId.Effect, (int)Data.EffTypeId.Eff05, BasePos );
                    ctrlResMgr.CtrlPl.Addeffect(BasePos);
                    statePlayTask++;
                    break;

                case 5:
                    eatingTime++;
                    if (eatingTime == 15)
                    {
                        ctrlResMgr.CtrlPl.Addeffect(new Vector3(BasePos.X + 1.0f, BasePos.Y + 0.3f, BasePos.Z + 1.0f));
                    }

                    if (eatingTime > 30)
                    {
                        statePlayTask++;
                    }
                    break;

                case 6:
                    //            EventCntr.Add( ActorEventId.Effect, (int)Data.EffTypeId.Eff05, BasePos );
                    ctrlResMgr.CtrlCam.SetCamMode(CtrlCamera.ModeId.LookMyselfToNormal);
                    ctrlResMgr.changePlAni = true;
                    ctrlResMgr.eatingBoss  = false;
                    AppSound.GetInstance().PlaySeCamDis(AppSound.SeId.Eat, BasePos);
                    ctrlResMgr.CtrlPl.Addeffect(BasePos);
                    ctrlResMgr.CtrlStg.MonumentSetFlag = true;
                    ctrlResMgr.EatCharNumber           = objCh.texId;
                    eatingTime++;
                    if (eatingTime > 20)
                    {
                        statePlayTask++;
                    }
//				ctrlResMgr.CtrlPl.Addeffect(BasePos);
                    Enable = false;
                    break;
                }
            }


            return(true);
        }
예제 #24
0
        /// 食べられる
        private bool statePlayEat()
        {
            GameCtrlManager ctrlResMgr = GameCtrlManager.GetInstance();

            if (ctrlResMgr.CtrlCam.camModeId == CtrlCamera.ModeId.CloseLook || ctrlResMgr.CtrlCam.camModeId == CtrlCamera.ModeId.CloseLookToNormal || ctrlResMgr.CtrlCam.camModeId == CtrlCamera.ModeId.NormalToCloseLook)
            {
                switch (statePlayTask)
                {
                case 0:
                    statePlayTask++;
                    break;

                /// 終了待ち
                case 1:
                    ActiveDis = 0.001f;
                    statePlayTask++;
                    //食われる動作
                    break;

                /// エフェクト余韻
                case 2:
                    EatAngle = new Vector3(ctrlResMgr.CtrlCam.GetCamPos().X, ctrlResMgr.CtrlCam.GetCamPos().Y - 1.0f, ctrlResMgr.CtrlCam.GetCamPos().Z) - BasePos;
                    BasePos += EatAngle.Normalize() * (int)(Data.SetupValue.EatingSpeed) / 10.0f;
                    float dis = Common.VectorUtil.DistanceY(BasePos, ctrlResMgr.CtrlCam.GetCamPos());
                    if (dis < (int)Data.SetupValue.EatingDeadArea / 10.0f)
                    {
                        statePlayTask++;
                    }
                    break;

                case 3:
                    //            EventCntr.Add( ActorEventId.Effect, (int)Data.EffTypeId.Eff05, BasePos );
                    AppSound.GetInstance().PlaySeCamDis(AppSound.SeId.Eat, BasePos);
                    ctrlResMgr.EatingFlag = true;
                    if (objCh.glowNumber == 0)
                    {
                        ctrlResMgr.EatCharNumber = (int)Data.Tex2dResId.MakingWall1;
                    }
                    else if (objCh.glowNumber == 1)
                    {
                        ctrlResMgr.EatCharNumber = (int)Data.Tex2dResId.MakingWall2;
                    }
                    else if (objCh.glowNumber == 2)
                    {
                        ctrlResMgr.EatCharNumber = (int)Data.Tex2dResId.MakingWall3;
                    }
                    else if (objCh.glowNumber == 3)
                    {
                        ctrlResMgr.EatCharNumber = TexId + (int)Data.Tex2dResId.TowerStart;
                    }
                    Enable = false;

                    break;
                }
            }
            else
            {
                ctrlResMgr.EatCharNumber = objCh.texId;
                Enable = false;
            }
            return(true);
        }
예제 #25
0
        /// 全コントロールのUpdate
        public void Frame()
        {
            /*
             * Console.WriteLine(GetMs());
             * Console.WriteLine(ctrlHobit.GetEntryNum()+ctrlTo.GetEntryNum()+ctrlHouse.GetEntryNum()+ctrlWall.GetEntryNum());
             * Console.WriteLine();
             */
            countTime++;

            if (changePlAni == true)
            {
                if (changePlMode == false)
                {
//				ctrlPl.changeAnimation(true);
                    changePlMode = true;
                }
                else if (changePlMode == true)
                {
//				ctrlPl.changeAnimation(false);
                    changePlMode = false;
                }
                changePlAni = false;
            }

            makeHouseAndEnTimer();
            if (AddEnemyFromMo == true)
            {
                if (CtrlHobit.stateId == CtrlHobit.CtrlStateId.Move)
                {
                    AddEnemyFromMonument();
                }
                AddEnemyFromMo = false;
            }

            if (AddEnemyFromNecro == true)
            {
                ctrlHobit.EntryAddEnemy((int)Data.Tex2dResId.Necromancer1, new Vector3(AddEnemyPos.X, 34.0f, AddEnemyPos.Z));
                AddEnemyFromNecro = false;
            }

            if (AddHouseFromMo == true)
            {
                AddHouseFromMonument();
                AddHouseFromMo = false;
            }

            if (battleStartFlag == true)
            {
                battleStart();
                battleStartFlag = false;
            }

            if (AddEffectFromEnemy == true)
            {
                ctrlPl.Addeffect(AddEnemyEffectPos);
                AddEffectFromEnemy = false;
            }

            if (AddTower == true)
            {
//			ctrlTo.EntryAddTower(StaticDataList.getRandom((int)Data.Tex2dResId.TowerStart+1,(int)(Data.Tex2dResId.TowerMax)),AddTowerPos);
                ctrlTo.EntryAddTower((int)Data.Tex2dResId.SouryoTower1, AddTowerPos);
                AppSound.GetInstance().PlaySeCamDis(AppSound.SeId.MakeMo, AddTowerPos);
                AddTower = false;
            }

            if (AddWall == true)
            {
                CtrlWall.EntryAddWall(StaticDataList.getRandom((int)Data.Tex2dResId.WallStart + 1, (int)Data.Tex2dResId.WallMax), AddWallPos1, AddWallPos2);
                AddWall = false;
            }

            if (EatCharNumber > 0)
            {
                Console.WriteLine(EatCharNumber);
                Scene2dTex.GetInstance().AddHp(EatCharNumber);
                switch (EatCharNumber)
                {
                case (int)Data.Tex2dResId.Noumin1:              CtrlPl.Hp = CtrlPl.Hp + 1;      break;

                case (int)Data.Tex2dResId.Senshi1:              CtrlPl.Hp = CtrlPl.Hp + 1;      break;

                case (int)Data.Tex2dResId.Souryo1:              CtrlPl.Hp = CtrlPl.Hp + 2;      break;

                case (int)Data.Tex2dResId.Zonbi1:               CtrlPl.Hp = CtrlPl.Hp + 1;      ctrlPl.Poision += 70; break;

                case (int)Data.Tex2dResId.Necromancer1: CtrlPl.Hp = CtrlPl.Hp + 1;      break;

                case (int)Data.Tex2dResId.TowerStart:   CtrlPl.Hp = CtrlPl.Hp + 1;      break;

                case (int)Data.Tex2dResId.SenshiTower1: CtrlPl.Hp = CtrlPl.Hp + 1;      break;

                case (int)Data.Tex2dResId.SenshiTower2: CtrlPl.Hp = CtrlPl.Hp + 1;      break;

                case (int)Data.Tex2dResId.SouryoTower1: CtrlPl.Hp = CtrlPl.Hp + 1;      break;

                case (int)Data.Tex2dResId.SouryoTower2: CtrlPl.Hp = CtrlPl.Hp + 1;      break;

                case (int)Data.Tex2dResId.NouminHouse1: CtrlPl.Hp = CtrlPl.Hp + 1;      break;

                case (int)Data.Tex2dResId.NouminHouse2: CtrlPl.Hp = CtrlPl.Hp + 1;      break;

                case (int)Data.Tex2dResId.NouminHouse3: CtrlPl.Hp = CtrlPl.Hp + 1;      break;

                case (int)Data.Tex2dResId.NouminHouse4: CtrlPl.Hp = CtrlPl.Hp + 1;      break;

                case (int)Data.Tex2dResId.NouminHouse5: CtrlPl.Hp = CtrlPl.Hp + 1;      break;

                case (int)Data.Tex2dResId.SenshiHouse1: CtrlPl.Hp = CtrlPl.Hp + 1;      break;

                case (int)Data.Tex2dResId.SenshiHouse2: CtrlPl.Hp = CtrlPl.Hp + 1;      break;

                case (int)Data.Tex2dResId.SenshiHouse3: CtrlPl.Hp = CtrlPl.Hp + 1;      break;

                case (int)Data.Tex2dResId.SenshiHouse4: CtrlPl.Hp = CtrlPl.Hp + 1;      break;

                case (int)Data.Tex2dResId.SenshiHouse5: CtrlPl.Hp = CtrlPl.Hp + 1;      break;

                case (int)Data.Tex2dResId.SouryoHouse1: CtrlPl.Hp = CtrlPl.Hp + 1;      break;

                case (int)Data.Tex2dResId.SouryoHouse2: CtrlPl.Hp = CtrlPl.Hp + 1;      break;

                case (int)Data.Tex2dResId.SouryoHouse3: CtrlPl.Hp = CtrlPl.Hp + 1;      break;

                case (int)Data.Tex2dResId.SouryoHouse4: CtrlPl.Hp = CtrlPl.Hp + 1;      break;

                case (int)Data.Tex2dResId.SouryoHouse5: CtrlPl.Hp = CtrlPl.Hp + 1;      break;

                case (int)Data.Tex2dResId.Gareki:               CtrlPl.Hp = CtrlPl.Hp + 0.5f;   break;

                case (int)Data.Tex2dResId.GarekiWall:   CtrlPl.Hp = CtrlPl.Hp + 0.5f;   break;

                case (int)Data.Tex2dResId.MakingWall1:  CtrlPl.Hp = CtrlPl.Hp + 0.5f;   break;

                case (int)Data.Tex2dResId.MakingWall2:  CtrlPl.Hp = CtrlPl.Hp + 0.5f;   break;

                case (int)Data.Tex2dResId.MakingWall3:  CtrlPl.Hp = CtrlPl.Hp + 0.5f;   break;
                }
                EatCharNumber = 0;
            }

            switch (SortNumber)
            {
            case 0: ctrlTo.setActiveChList();               ctrlTo.SortNear();                      break;

            case 1: ctrlWall.setActiveChList();             ctrlWall.SortNear();            break;

            case 2: ctrlHouse.setActiveChList();    ctrlHouse.SortNear();           break;

            case 3: ctrlMo.setActiveChList();               ctrlMo.SortNear();                      break;

            case 4: ctrlHobit.setActiveChList();    ctrlHobit.SortNear();           break;
            }

            SortNumber++;
            if (SortNumber > 8)
            {
                SortNumber = 0;
            }

            /*
             * threadEn = new Thread(new ThreadStart(ThreadEnFrame));
             * threadOther = new Thread(new ThreadStart(ThreadOtherFrame));
             * threadEn.Start();
             * threadOther.Start();
             */


            ctrlHobit.Frame();
            ctrlTo.Frame();
            ctrlWall.Frame();
            ctrlHouse.Frame();
            ctrlStg.Frame();
            ctrlEffect.Frame();
            ctrlMo.Frame();
            ctrlCam.Frame();
            ctrlStg.Frame();
            ctrlEffect.Frame();
            ctrlPl.Frame();
            FrameEat();
            Scene2dTex.GetInstance().SetHp(CtrlPl.Hp);
            Scene2dTex.GetInstance().frame();


            if (countTime % (int)Data.SetupValue.TweetTime == 0)
            {
                //SocketSample.GetInstance().sendData(StaticDataList.getRandom(1,5),StaticDataList.getRandom(0,10));
            }
        }
예제 #26
0
        /// 食べられる
        private bool statePlayEat()
        {
            GameCtrlManager ctrlResMgr = GameCtrlManager.GetInstance();

            if (ctrlResMgr.CtrlCam.camModeId == CtrlCamera.ModeId.CloseLook || ctrlResMgr.CtrlCam.camModeId == CtrlCamera.ModeId.CloseLookToNormal || ctrlResMgr.CtrlCam.camModeId == CtrlCamera.ModeId.NormalToCloseLook)
            {
                switch (statePlayTask)
                {
                case 0:
                    statePlayTask++;
                    break;

                /// 終了待ち
                case 1:
                    ActiveDis = 0.001f;
                    statePlayTask++;
                    //食われる動作
                    break;

                /// エフェクト余韻
                case 2:
                    EatAngle = new Vector3(ctrlResMgr.CtrlCam.GetCamPos().X, ctrlResMgr.CtrlCam.GetCamPos().Y - 1.0f, ctrlResMgr.CtrlCam.GetCamPos().Z) - BasePos;
                    BasePos += EatAngle.Normalize() * (int)(Data.SetupValue.EatingSpeed) / 10.0f;
                    float dis = Common.VectorUtil.DistanceY(BasePos, ctrlResMgr.CtrlCam.GetCamPos());
                    if (dis < (int)Data.SetupValue.EatingDeadArea / 10.0f)
                    {
                        statePlayTask++;
                    }
                    break;

                case 3:
                    //            EventCntr.Add( ActorEventId.Effect, (int)Data.EffTypeId.Eff05, BasePos );
                    AppSound.GetInstance().PlaySeCamDis(AppSound.SeId.Eat, BasePos);
                    ctrlResMgr.EatingFlag    = true;
                    ctrlResMgr.EatCharNumber = objCh.texId + (int)Data.Tex2dResId.HouseStart;
                    if (objCh.texId + (int)Data.Tex2dResId.HouseStart == (int)Data.Tex2dResId.NouminHouse1 ||
                        objCh.texId + (int)Data.Tex2dResId.HouseStart == (int)Data.Tex2dResId.NouminHouse2 ||
                        objCh.texId + (int)Data.Tex2dResId.HouseStart == (int)Data.Tex2dResId.NouminHouse3 ||
                        objCh.texId + (int)Data.Tex2dResId.HouseStart == (int)Data.Tex2dResId.NouminHouse4 ||
                        objCh.texId + (int)Data.Tex2dResId.HouseStart == (int)Data.Tex2dResId.NouminHouse5)
                    {
                        if (ctrlResMgr.CtrlHobit.FarmerList.Count != 0)
                        {
                            ctrlResMgr.CtrlHobit.FarmerList[0].changeId((int)Data.Tex2dResId.Senshi1);
                        }

                        /*
                         * if(ctrlResMgr.CtrlHobit.FarmerList.Count != 0){
                         *      ctrlResMgr.CtrlHobit.FarmerList[StaticDataList.getRandom(ctrlResMgr.CtrlHobit.FarmerList.Count)].changeId((int)Data.Tex2dResId.Senshi1);
                         * }
                         */
                    }
                    else if (objCh.texId + (int)Data.Tex2dResId.HouseStart == (int)Data.Tex2dResId.SenshiHouse1 ||
                             objCh.texId + (int)Data.Tex2dResId.HouseStart == (int)Data.Tex2dResId.SenshiHouse2 ||
                             objCh.texId + (int)Data.Tex2dResId.HouseStart == (int)Data.Tex2dResId.SenshiHouse3 ||
                             objCh.texId + (int)Data.Tex2dResId.HouseStart == (int)Data.Tex2dResId.SenshiHouse4 ||
                             objCh.texId + (int)Data.Tex2dResId.HouseStart == (int)Data.Tex2dResId.SenshiHouse5)
                    {
                        if (ctrlResMgr.CtrlHobit.FarmerList.Count != 0)
                        {
                            ctrlResMgr.CtrlHobit.FarmerList[0].changeId((int)Data.Tex2dResId.Senshi1);
                        }
                    }
                    else if (objCh.texId + (int)Data.Tex2dResId.HouseStart == (int)Data.Tex2dResId.SouryoHouse1 ||
                             objCh.texId + (int)Data.Tex2dResId.HouseStart == (int)Data.Tex2dResId.SouryoHouse2 ||
                             objCh.texId + (int)Data.Tex2dResId.HouseStart == (int)Data.Tex2dResId.SouryoHouse3 ||
                             objCh.texId + (int)Data.Tex2dResId.HouseStart == (int)Data.Tex2dResId.SouryoHouse4 ||
                             objCh.texId + (int)Data.Tex2dResId.HouseStart == (int)Data.Tex2dResId.SouryoHouse5)
                    {
                        if (ctrlResMgr.CtrlHobit.FarmerList.Count != 0)
                        {
                            ctrlResMgr.CtrlHobit.FarmerList[0].changeId((int)Data.Tex2dResId.Souryo1);
                        }
                    }
                    Enable = false;

                    break;
                }
            }
            else
            {
                ctrlResMgr.EatCharNumber = objCh.texId;
                Enable = false;
            }
            return(true);
        }
예제 #27
0
        /// 敵陣地の拡大
        public void setMonument(int scrPosX, int scrPosY)
        {
            GameActorCollManager useCollMgr = actorDestination.GetMoveCollManager();

            Vector3 posStart = new Vector3(0, 0, 0);
            Vector3 posEnd   = new Vector3(0, 0, 0);

            /// チェックする開始座標と終了座標のセット
            ctrlResMgr.GraphDev.GetScreenToWorldPos(scrPosX, scrPosY, 0.0f, ref posStart);
            ctrlResMgr.GraphDev.GetScreenToWorldPos(scrPosX, scrPosY, 1.0f, ref posEnd);


            DemoGame.GeometryLine moveMoveLine = new DemoGame.GeometryLine(posStart, posEnd);

            /// 衝突対象の登録
            useCollMgr.TrgContainer.Clear();

            useCollMgr.TrgContainer.Add(actorStg, actorStg.GetUseObj(0));


            /// 衝突判定
            calCollLook.SetMoveType(Data.CollTypeId.ChDestination);

            bool checkBound = calCollLook.Check(useCollMgr, moveMoveLine);

            if (checkBound)
            {
                TouchPostion = calCollLook.NextPos;
                if (ctrlResMgr.CtrlMo.inDistance(TouchPostion) == true)
                {
                    ctrlResMgr.CtrlMo.EntryAddMonument(1, 0, new Vector3(TouchPostion.X, 30.0f, TouchPostion.Z));
                    ctrlResMgr.CtrlPl.Addeffect(towerNowPos);
                    AppSound.GetInstance().PlaySeCamDis(AppSound.SeId.MakeMo, towerNowPos);
                    //makeEnemyTower

                    if (makeEnemyMonument == 0)
                    {
                        //+-3
                        ctrlResMgr.CtrlTo.EntryAddTower((int)Data.Tex2dResId.Bosstower, new Vector3((int)Data.SetupValue.EnemyMonumentPosX - 3, 30.0f, (int)Data.SetupValue.EnemyMonumentPosY - 3));
                        ctrlResMgr.CtrlTo.EntryAddTower((int)Data.Tex2dResId.Bosstower, new Vector3((int)Data.SetupValue.EnemyMonumentPosX - 3, 30.0f, (int)Data.SetupValue.EnemyMonumentPosY + 3));
                        ctrlResMgr.CtrlTo.EntryAddTower((int)Data.Tex2dResId.Bosstower, new Vector3((int)Data.SetupValue.EnemyMonumentPosX + 3, 30.0f, (int)Data.SetupValue.EnemyMonumentPosY + 3));
                        ctrlResMgr.CtrlTo.EntryAddTower((int)Data.Tex2dResId.Bosstower, new Vector3((int)Data.SetupValue.EnemyMonumentPosX + 3, 30.0f, (int)Data.SetupValue.EnemyMonumentPosY - 3));

                        ctrlResMgr.CtrlWall.EntryAddWall((int)Data.Tex2dResId.BossWall, new Vector3((int)Data.SetupValue.EnemyMonumentPosX - 3, 30.0f, (int)Data.SetupValue.EnemyMonumentPosY - 3), new Vector3((int)Data.SetupValue.EnemyMonumentPosX - 3, 30.0f, (int)Data.SetupValue.EnemyMonumentPosY + 3));
                        ctrlResMgr.CtrlWall.EntryAddWall((int)Data.Tex2dResId.BossWall, new Vector3((int)Data.SetupValue.EnemyMonumentPosX - 3, 30.0f, (int)Data.SetupValue.EnemyMonumentPosY + 3), new Vector3((int)Data.SetupValue.EnemyMonumentPosX + 3, 30.0f, (int)Data.SetupValue.EnemyMonumentPosY + 3));
                        ctrlResMgr.CtrlWall.EntryAddWall((int)Data.Tex2dResId.BossWall, new Vector3((int)Data.SetupValue.EnemyMonumentPosX + 3, 30.0f, (int)Data.SetupValue.EnemyMonumentPosY + 3), new Vector3((int)Data.SetupValue.EnemyMonumentPosX + 3, 30.0f, (int)Data.SetupValue.EnemyMonumentPosY - 3));
                        ctrlResMgr.CtrlWall.EntryAddWall((int)Data.Tex2dResId.BossWall, new Vector3((int)Data.SetupValue.EnemyMonumentPosX + 3, 30.0f, (int)Data.SetupValue.EnemyMonumentPosY - 3), new Vector3((int)Data.SetupValue.EnemyMonumentPosX - 3, 30.0f, (int)Data.SetupValue.EnemyMonumentPosY - 3));
                    }
                    else if (makeEnemyMonument == 1)
                    {
                        int prePosX = 0, prePosY = 0;
                        int i = -2;
                        int j = -2;
                        for (j = -2; j <= 2; j++)
                        {
                            ctrlResMgr.CtrlTo.EntryAddTower((int)Data.Tex2dResId.Bosstower, new Vector3((int)Data.SetupValue.EnemyMonumentPosX + 6 * i, 30.0f, (int)Data.SetupValue.EnemyMonumentPosY + 6 * j));
                            if (j != -2)
                            {
                                ctrlResMgr.CtrlWall.EntryAddWall((int)Data.Tex2dResId.BossWall, new Vector3(prePosX, 30.0f, prePosY), new Vector3((int)Data.SetupValue.EnemyMonumentPosX + 6 * i, 30.0f, (int)Data.SetupValue.EnemyMonumentPosY + 6 * j));
                            }
                            prePosX = (int)Data.SetupValue.EnemyMonumentPosX + 6 * i;
                            prePosY = (int)Data.SetupValue.EnemyMonumentPosY + 6 * j;
                        }

                        i = 2;
                        for (j = -2; j <= 2; j++)
                        {
                            ctrlResMgr.CtrlTo.EntryAddTower((int)Data.Tex2dResId.Bosstower, new Vector3((int)Data.SetupValue.EnemyMonumentPosX + 6 * i, 30.0f, (int)Data.SetupValue.EnemyMonumentPosY + 6 * j));
                            if (j != -2)
                            {
                                ctrlResMgr.CtrlWall.EntryAddWall((int)Data.Tex2dResId.BossWall, new Vector3(prePosX, 30.0f, prePosY), new Vector3((int)Data.SetupValue.EnemyMonumentPosX + 6 * i, 30.0f, (int)Data.SetupValue.EnemyMonumentPosY + 6 * j));
                            }
                            prePosX = (int)Data.SetupValue.EnemyMonumentPosX + 6 * i;
                            prePosY = (int)Data.SetupValue.EnemyMonumentPosY + 6 * j;
                        }

                        j = -2;
                        for (i = -2; i <= 2; i++)
                        {
                            ctrlResMgr.CtrlTo.EntryAddTower((int)Data.Tex2dResId.Bosstower, new Vector3((int)Data.SetupValue.EnemyMonumentPosX + 6 * i, 30.0f, (int)Data.SetupValue.EnemyMonumentPosY + 6 * j));
                            if (i != -2)
                            {
                                ctrlResMgr.CtrlWall.EntryAddWall((int)Data.Tex2dResId.BossWall, new Vector3(prePosX, 30.0f, prePosY), new Vector3((int)Data.SetupValue.EnemyMonumentPosX + 6 * i, 30.0f, (int)Data.SetupValue.EnemyMonumentPosY + 6 * j));
                            }
                            prePosX = (int)Data.SetupValue.EnemyMonumentPosX + 6 * i;
                            prePosY = (int)Data.SetupValue.EnemyMonumentPosY + 6 * j;
                        }

                        j = 2;
                        for (i = -2; i <= 2; i++)
                        {
                            ctrlResMgr.CtrlTo.EntryAddTower((int)Data.Tex2dResId.Bosstower, new Vector3((int)Data.SetupValue.EnemyMonumentPosX + 6 * i, 30.0f, (int)Data.SetupValue.EnemyMonumentPosY + 6 * j));
                            if (i != -2)
                            {
                                ctrlResMgr.CtrlWall.EntryAddWall((int)Data.Tex2dResId.BossWall, new Vector3(prePosX, 30.0f, prePosY), new Vector3((int)Data.SetupValue.EnemyMonumentPosX + 6 * i, 30.0f, (int)Data.SetupValue.EnemyMonumentPosY + 6 * j));
                            }
                            prePosX = (int)Data.SetupValue.EnemyMonumentPosX + 6 * i;
                            prePosY = (int)Data.SetupValue.EnemyMonumentPosY + 6 * j;
                        }
                    }
                    makeEnemyMonument++;
                    MonumentSetFlag = false;
                }
            }
        }
예제 #28
0
/// サウンドチェック
///---------------------------------------------------------------------------

        public bool frameSoundCheck()
        {
            DemoGame.InputGamePad pad = AppInput.GetInstance().Pad;

            if ((pad.Trig & DemoGame.InputGamePadState.Start) != 0)
            {
                changeTask(debugMenuTaskId.MenuTop);
                return(true);
            }

            if ((pad.Trig & DemoGame.InputGamePadState.Up) != 0)
            {
                soundTrg--;
                if (soundTrg < 0)
                {
                    soundTrg = 1;
                }
            }
            else if ((pad.Trig & DemoGame.InputGamePadState.Down) != 0)
            {
                soundTrg = (soundTrg + 1) % 2;
            }

            if ((pad.Trig & DemoGame.InputGamePadState.Left) != 0)
            {
                if (soundTrg == 0)
                {
                    soundBgmNo--;
                    if (soundBgmNo < 0)
                    {
                        soundBgmNo = (int)AppSound.BgmId.Max - 1;
                    }
                }
                else
                {
                    soundSeNo--;
                    if (soundSeNo < 0)
                    {
                        soundSeNo = (int)AppSound.SeId.Max - 1;
                    }
                }
            }
            else if ((pad.Trig & DemoGame.InputGamePadState.Right) != 0)
            {
                if (soundTrg == 0)
                {
                    soundBgmNo = (soundBgmNo + 1) % ((int)AppSound.BgmId.Max);
                }
                else
                {
                    soundSeNo = (soundSeNo + 1) % ((int)AppSound.SeId.Max);
                }
            }

            /// 再生
            if ((pad.Trig & DemoGame.InputGamePadState.Circle) != 0)
            {
                if (soundTrg == 0)
                {
                    AppSound.GetInstance().PlayBgm((AppSound.BgmId)soundBgmNo, false);
                }
                else
                {
                    AppSound.GetInstance().PlaySe((AppSound.SeId)soundSeNo);
                }
            }

            return(true);
        }