Esempio n. 1
0
        /// 開始
        public bool Start()
        {
            ctrlPl.Start();
            ctrlHobit.Start();
            ctrlTo.Start();
            ctrlWall.Start();
            ctrlCam.Start();
            ctrlStg.Start();
            ctrlEffect.Start();
            ctrlEvent.Start();
            ctrlHouse.Start();
            ctrlMo.Start();

            InitSpriteBatch(4096, graphDev);
            SetSpriteCount(4096);

//		threadEn.Start();
            Scene2dTex.GetInstance().init(graphDev.Graphics);
            Scene2dTex.GetInstance().SetUpperPos(-400);
            Scene2dTex.GetInstance().SetUnderPos(950);
//		Scene2dTex.GetInstance().SetUpperPos(950);
//		Scene2dTex.GetInstance().SetUnderPos(-400);



            GameCtrlDrawManager.GetInstance().Start();
            return(true);
        }
Esempio n. 2
0
        /// 破棄
        public void Term()
        {
            GameCtrlDrawManager.GetInstance().Term();

            ctrlPl.Term();
            ctrlHobit.Term();
            ctrlTo.Term();
            ctrlWall.Term();
            ctrlCam.Term();
            ctrlStg.Term();
            ctrlEffect.Term();
            ctrlEvent.Term();
            ctrlDesMark.Term();
            ctrlHouse.Term();
            ctrlMo.Term();

            ctrlPl      = null;
            ctrlHobit   = null;
            ctrlTo      = null;
            ctrlWall    = null;
            ctrlCam     = null;
            ctrlStg     = null;
            ctrlEffect  = null;
            ctrlEvent   = null;
            ctrlDesMark = null;
            ctrlHouse   = null;
            ctrlMo      = null;
            graphDev    = null;
        }
Esempio n. 3
0
 /// 描画処理
 public bool Draw(DemoGame.GraphicsDevice graphDev)
 {
     for (int i = 0; i < actorEffList.Count; i++)
     {
         if (actorEffList[i].Enable == true)
         {
             GameCtrlDrawManager.GetInstance().EntryEffect(actorEffList[i], true);
         }
     }
     return(true);
 }
Esempio n. 4
0
/// LODパラメータのセット
///---------------------------------------------------------------------------

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

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

            pad.SetRepeatParam(10, 2);
            if ((pad.Repeat & DemoGame.InputGamePadState.Left) != 0)
            {
                GameCtrlDrawManager.GetInstance().SetLodParam(lodNo, (GameCtrlDrawManager.GetInstance().GetLodParam(lodNo) - 1.0f));
            }
            else if ((pad.Repeat & DemoGame.InputGamePadState.Right) != 0)
            {
                GameCtrlDrawManager.GetInstance().SetLodParam(lodNo, (GameCtrlDrawManager.GetInstance().GetLodParam(lodNo) + 1.0f));
            }

            return(true);
        }
Esempio n. 5
0
        /// デバック用の描画
        public void DrawDebug()
        {
            ctrlCam.Draw(graphDev);

            /// 不透明の物は手前から描く
            GameCtrlDrawManager.GetInstance().EntryStart();
            ctrlHobit.DrawDebug(graphDev);
            ctrlPl.Draw(graphDev);

            GameCtrlDrawManager.GetInstance().Draw(graphDev);

            ctrlStg.Draw(graphDev);

            /// 半透明の物は奥から描く
            GameCtrlDrawManager.GetInstance().EntryStart();
            ctrlPl.DrawAlpha(graphDev);
            ctrlHobit.DrawAlpha(graphDev);
            ctrlEffect.Draw(graphDev);
            GameCtrlDrawManager.GetInstance().SortFar();
            GameCtrlDrawManager.GetInstance().Draw(graphDev);

            ctrlEvent.Draw(graphDev);
        }
Esempio n. 6
0
        /// 全コントロールの描画
        public void Draw()
        {
            graphDev.Graphics.SetTexture(0, StaticDataList.textureUnified);

            ctrlCam.Draw(graphDev);

            if (countTime <= (int)Data.SetupValue.EnemyAppearTime - 50)
            {
                ctrlStg.setBrightness(0.0f);
            }
            else if ((int)Data.SetupValue.EnemyAppearTime - 50 < countTime && countTime <= (int)Data.SetupValue.EnemyAppearTime)
            {
                ctrlStg.setBrightness(1.0f - ((int)Data.SetupValue.EnemyAppearTime - countTime) / 50.0f);
            }
            else if ((int)Data.SetupValue.EnemyAppearTime < countTime && countTime <= (int)Data.SetupValue.EnemyAppearTime + (int)Data.SetupValue.EnemyAppearingTime - 50)
            {
                ctrlStg.setBrightness(1.0f);
            }
            else if ((int)Data.SetupValue.EnemyAppearTime + (int)Data.SetupValue.EnemyAppearingTime - 50 < countTime && countTime < (int)Data.SetupValue.EnemyAppearTime + (int)Data.SetupValue.EnemyAppearingTime)
            {
                ctrlStg.setBrightness((((int)Data.SetupValue.EnemyAppearTime + (int)Data.SetupValue.EnemyAppearingTime) - countTime) / 50.0f);
            }
            else if ((int)Data.SetupValue.EnemyAppearTime + (int)Data.SetupValue.EnemyAppearingTime < countTime && countTime < (int)Data.SetupValue.EnemyAppearTime + (int)Data.SetupValue.EnemyAppearingTime + 200)
            {
                ctrlStg.setBrightness(0.0f);
            }
            else if ((int)Data.SetupValue.EnemyAppearTime + (int)Data.SetupValue.EnemyAppearingTime + 200 < countTime)
            {
                countTime = 0;
            }
            ctrlStg.Draw(graphDev);

//		int allNumber = ctrlMo.GetActiveNum() + ctrlHobit.GetActiveNum() + ctrlHouse.GetActiveNum() + ctrlTo.GetActiveNum() + ctrlWall.GetActiveNum() + Scene2dTex.GetInstance().GetObjNumber();
            int allNumber = ctrlMo.GetActiveNum() + ctrlHobit.GetActiveNum() + CtrlHobit.speakCount + ctrlHouse.GetActiveNum() + ctrlTo.GetActiveNum() + ctrlWall.GetActiveNum() + 1;

            if (allNumber > 4096)
            {
                 allNumber = 4096;
            }
            SetSpriteCount(allNumber);

            if (eatingBoss == true)
            {
                ctrlPl.Draw(graphDev);
            }

            ClearSpriteCounter();

            while (true)
            {
                SetDrawFlag();

                if (EnemyDrawFlag == true)
                {
                    ctrlHobit.DrawIdx(graphDev, EnemyNumber);
                    EnemyNumber++;
                    EnemyDrawFlag = false;
                }

                if (TowerDrawFlag == true)
                {
                    ctrlTo.DrawIdx(graphDev, TowerNumber);
                    TowerNumber++;
                    TowerDrawFlag = false;
                }

                if (HouseDrawFlag == true)
                {
                    ctrlHouse.DrawIdx(graphDev, HouseNumber);
                    HouseNumber++;
                    HouseDrawFlag = false;
                }

                if (MonumentDrawFlag == true)
                {
                    ctrlMo.DrawIdx(graphDev, MonumentNumber);
                    MonumentNumber++;
                    MonumentDrawFlag = false;
                }

                if (WallDrawFlag == true)
                {
                    ctrlWall.DrawIdx(graphDev, WallNumber);
                    WallNumber++;
                    WallDrawFlag = false;
                }



                if ((EnemyNumber == ctrlHobit.GetActiveNum() || ctrlHobit.GetActiveNum() == 0) &&
                    (TowerNumber == ctrlTo.GetActiveNum() || ctrlTo.GetActiveNum() == 0) &&
                    (HouseNumber == ctrlHouse.GetActiveNum() || ctrlHouse.GetActiveNum() == 0) &&
                    (WallNumber == ctrlWall.GetActiveNum() || ctrlWall.GetActiveNum() == 0) &&
                    (MonumentNumber == ctrlMo.GetActiveNum() || ctrlMo.GetActiveNum() == 0))
                {
                    EnemyNumber      = 0;
                    TowerNumber      = 0;
                    HouseNumber      = 0;
                    WallNumber       = 0;
                    MonumentNumber   = 0;
                    EnemyDrawFlag    = false;
                    TowerDrawFlag    = false;
                    HouseDrawFlag    = false;
                    WallDrawFlag     = false;
                    MonumentDrawFlag = false;
                    break;
                }
            }
            batch.Draw(graphDev);

            ctrlHobit.DrawText(graphDev);

            Scene2dTex.GetInstance().Draw();

            for (int i = 0; i < spriteCount; i++)
            {
                sprites[i].UpdatePosTex();
            }


            /*
             * for(int i=0;i<spriteCount;i++){
             *      sprites[i].UpdateAll();
             * }
             * spriteCount = 8000;
             */
            /// 半透明の物は奥から描く
            GameCtrlDrawManager.GetInstance().EntryStart();
            if (eatingBoss == false)
            {
                ctrlPl.Draw(graphDev);
            }
            ctrlEffect.Draw(graphDev);
            GameCtrlDrawManager.GetInstance().SortFar();
            GameCtrlDrawManager.GetInstance().Draw(graphDev);
        }
Esempio n. 7
0
/// public メソッド
///---------------------------------------------------------------------------

        /// 初期化
        public bool Init()
        {
            ctrlPl = new CtrlPlayer();
            ctrlPl.Init();

            ctrlHobit = new CtrlHobit();
            ctrlHobit.Init();

            ctrlTo = new CtrlTower();
            ctrlTo.Init();

            ctrlWall = new CtrlWall();
            ctrlWall.Init();

            ctrlCam = new CtrlCamera();
            ctrlCam.Init();

            ctrlStg = new CtrlStage();
            ctrlStg.Init();

            ctrlEffect = new CtrlEffect();
            ctrlEffect.Init();

            ctrlEvent = new CtrlEvent();
            ctrlEvent.Init();

            ctrlDesMark = new CtrlDestinationMark();
            ctrlDesMark.Init();

            ctrlHouse = new CtrlHouse();
            ctrlHouse.Init();

            ctrlMo = new CtrlMonument();
            ctrlMo.Init();

            GameCtrlDrawManager.GetInstance().Init();

            EnemyNumber      = 0;
            HouseNumber      = 0;
            TowerNumber      = 0;
            WallNumber       = 0;
            MonumentNumber   = 0;
            EnemyDrawFlag    = false;
            TowerDrawFlag    = false;
            WallDrawFlag     = false;
            HouseDrawFlag    = false;
            EatingFlag       = false;
            MonumentDrawFlag = false;
            EatCharNumber    = 0;

            AddEnemyFromMo     = false;
            AddHouseFromMo     = false;
            changePlAni        = false;
            changePlMode       = false;
            eatingBoss         = false;
            AddEnemyFromNecro  = false;
            battleStartFlag    = false;
            AddEffectFromEnemy = false;
            AddTower           = false;

            ZonbiNumber = 30;

            EnemyMoPos = new Vector3(-70.0f, 45.0f, 65.0f);

            countTime  = 0;
            SortNumber = 0;
            nowFps     = 0.0f;

            EatingNow   = false;
            EatingCount = 0;
            EatingStart = 20;

            return(true);
        }