Пример #1
0
        public Option(Scene privousScene)
            : base(privousScene)
        {
            sceneTitle = "Option";

            menuString = new string[] {
                //"KeyConfig",
                "Full Screen / Window",
                "BGM volume : " + SoundControl.volumeAll.ToString("F1"),
                "Mute all sound " + (game.isMuted ? "On" : "Off"),
                "SoundTest",
                "ViewRanking",
                "StageSelect",
                "Credit",
                "Simple / Technical",
                "Back"
            };
            buttonNum = menuString.Length;
            button = new Button[buttonNum];

            for (int i = 0; i < button.Length; i++) {
                button[i].color = Color.Blue;
                button[i].name = menuString[i];
            }

            Load();
        }
Пример #2
0
 public Ending(Scene privousScene, bool fromGame)
     : base(privousScene)
 {
     Load();
     defDrawTime = musicTime / textureNum;
     this.fromGame = fromGame;
     this.timer = new Timer();
 }
Пример #3
0
 public LvlSelect(Scene privousScene)
     : base(privousScene)
 {
     buttonNum = 2;
     button = new Button[buttonNum];
     for (int i = 0; i < buttonNum; i++)
         button[i].color = Color.Blue;
     Load();
 }
Пример #4
0
        public MainMenu(Scene privousScene)
            : base(privousScene)
        {
            buttonNum = 3;
            button = new Button[buttonNum];
            for(int i = 0; i < buttonNum; i++)
                button[i].color = Color.Blue;

            Load();
        }
Пример #5
0
        public KeyConfig(Scene previousScene)
            : base(previousScene)
        {
            buttonNum = 3;
            button = new Button[buttonNum];
            for (int i = 0; i < buttonNum; i++) {
                button[i].color = Color.Blue;
            }

            Load();
        }
        public AvilitySelect(Scene privousScene)
            : base(privousScene)
        {
            buttonNum = 3;
            button = new Button[buttonNum];

            for (int i = 0; i < button.Length; i++)
                button[i].color = Color.Blue;

            Load();
        }
Пример #7
0
        //private const int displayNum = 5;
        //private int[] scores = new int[displayNum];
        public Ranking(Scene upperScene)
            : base(upperScene)
        {
            buttonNum = 1;
            button = new Button[buttonNum];

            for (int i = 0; i < button.Length; i++)
                button[i].color = Color.Blue;

            Load();
        }
Пример #8
0
        public SoundTest(Scene privousScene)
            : base(privousScene)
        {
            sceneTitle = "SoundTest";
            buttonNum = 5;
            button = new Button[buttonNum];
            musics = new SoundEffect[musicString.Length];
            soundEffects = new SoundEffect[seString.Length];

            Load();

            for (int i = 0; i < button.Length; i++) {
                button[i].color = Color.Blue;
                button[i].name = menuString[i];
            }
        }
Пример #9
0
        public StageSelect(Scene privousScene)
            : base(privousScene)
        {
            sceneTitle = "Stage Select";
            buttonNum = 4;
            button = new Button[buttonNum];
            menuString = new string[] {
                "Stage 1",
                "Stage 2",
                "Stage 3",
                "Back"
            };

            for (int i = 0; i < button.Length; i++) {
                button[i].color = Color.Blue;
                button[i].name = menuString[i];
            }

            Load();
        }
Пример #10
0
        public BossTest(Scene privousScene, bool isHighLvl)
            : base(privousScene, isHighLvl)
        {
            contentDirectory = "BossTest";
            scrollingBackGround = new ScrollingBackground(Vector2.Zero);
            frontalScrollingBackGround = new ScrollingBackground(new Vector2(0, 260));
            surfaceHeightAtBoss = 482;
            //characters.Add(new StationalEnemy(this, 150, 100, 48, 48, 5));
            //characters.Add(new StationalEnemy(this, 200, 100, 48, 48, 5));
            /*characters.Add(new StationalEnemy(this, 250, 100, 48, 48, 5));// 毎フレームダメージ判定入れる技の調整用
            characters.Add(new JumpingEnemy(this, 300, 100, 32, 32, 5));
            characters.Add(new FlyingEnemy(this, 350, 100, 32, 32, 5));
            characters.Add(new ShootingEnemy(this, 400, 100, 48, 48, 5));// サイズ変更
            characters.Add(new FlyingOutEnemy(this, 4500, 480 - 32, 32, 32, 5));*/

            //sword = new Sword(this,player, 200, 100, 64, 8, 0);
            //devided1 = new string[500];
            //devided2 = new string[500, 5];
            //LoadMapData(1, "Flat_Map.txt", 0, 0);//"Flat_Map3840.txt"
            //LoadMapData(1, "Flat_Map3840.txt", CheckMapEnd(devided2) * 2 + 32);
            /*LoadMapData(1, "Flat_Map3840.txt", CheckMapEnd(devided2) * 3 + 32);
            LoadMapData(1, "Flat_Map3840.txt", CheckMapEnd(devided2) * 4 + 32);
            LoadMapData(1, "Flat_Map3840.txt", CheckMapEnd(devided2) * 5 + 32);
            LoadMapData(1, "Flat_Map3840.txt", CheckMapEnd(devided2) * 6 + 32);
            LoadMapData(1, "Flat_Map3840.txt", CheckMapEnd(devided2) * 7 + 32);// このくらいでちょっと重くなってくる(GetDirection切った上体で)
            //LoadMapData(1, "Flat_Map3840.txt", CheckMapEnd(devided2)*2 + 32);*/
            // CheckMapEndを使うとすごく重くなるようだ? 端が重なる値にしたからかもしれないが...
            // Mapを追加すると重いのかもCheckMapEndは全然関係なさそう 1つのファイルから読み込んだ場合は長くても重くならないような...

            //LoadMapData(1, "Flat_Map2.txt", 0);
            //LoadMapData(1, "Flat_Map2.txt", CheckMapEnd(devided2));
            /*LoadMapData(1, "Flat_Map2.txt", CheckMapEnd(devided2) * 2);
            LoadMapData(1, "Flat_Map2.txt", CheckMapEnd(devided2) * 3);
            LoadMapData(1, "Flat_Map2.txt", CheckMapEnd(devided2) * 4);
            LoadMapData(1, "Flat_Map2.txt", CheckMapEnd(devided2) * 5);*/
        }
Пример #11
0
        // デバッグ用の単色矩形のみ,みたいなステージ
        public Stage0(Scene privousScene, bool isHighLvl)
            : base(privousScene, isHighLvl)
        {
            contentDirectory = "Stage00";

            /*characters.Add(new StationalEnemy(this, 300, 100,48, 48, 5));
            characters.Add(new StationalEnemy(this, 450, 100,48, 48, 5));
            characters.Add(new StationalEnemy(this, 600, 100,48, 48, 5));
            characters.Add(new StationalEnemy(this, 670, 100,48, 48, 5));// 毎フレームダメージ判定入れる技の調整用
            characters.Add(new JumpingEnemy  (this, 800, 100, 32, 32,5));
            characters.Add(new FlyingEnemy   (this, 1000, 100, 32, 32, 5));
            characters.Add(new ShootingEnemy (this, 500, 100, 48, 48,5));// サイズ変更
            characters.Add(new FlyingOutEnemy(this, 500, 480-32, 32, 32, 5));*/

            //characters.Add(new RotatingEnemy (this, 200, 50 - 32, 32, 32, 5,new Vector2(16,16)));

            //characters.Add(new SkatingEnemy(this, 500, 100, 32, 32, -6, 5));
            //characters.Add(new SkatingEnemy(this, 500, 100, 32, 32, -4, 5));
            //characters.Add(new SkatingEnemy(this, 500, 100, 32, 32, -2, 5));

            //dynamicTerrains.Add(new CollapsingBlock(this, 200, 300, 32, 32, 0));
            //dynamicTerrains.Add(new CollapsingBlock(this, 300, 300, 32, 32, 0));

            //dynamicTerrains.Add(new Thread(this, 200, 100, 8, 150, 0,45,150));

            //dynamicTerrains.Add(new CollapsingBlock(this, 100, 300, 32, 32, 0));
            //dynamicTerrains.Add(new CollapsingBlock(this, 000, 300, 32, 32, 0));

            /*staticTerrains.Add(new Slope128(this, 400, 320, 128, 128));
            staticTerrains.Add(new Slope(this, 200, 300, 32, 32));

            staticTerrains.Add(new Slope(this, 32, 250, 32, 32, true, 0));
            staticTerrains.Add(new Slope(this, 64, 282, 32, 32, true, 0));
            staticTerrains.Add(new Slope(this, 96, 250, 64, 32, true, 1));// width&heightの間違いが多くなりそうである
            staticTerrains.Add(new Block(this, 96, 282, 32, 32));

            staticTerrains.Add(new Slope(this, 96, 416, 128, 32, true, 2));
            staticTerrains.Add(new Slope(this, 224, 384, 128, 32, true, 2));
            //dynamicTerrains.Add(new TestBlock(this, 200, 3528, 32, 32));

            staticTerrains.Add(new Slope(this, 320, 288, 32, 32, false, 0));
            staticTerrains.Add(new Slope(this, 352, 320, 128, 32, false, 2));*/

            //objects.Add(player);

            //objects.Add(sword);

            //devided1 = new string[500];
            //devided2 = new string[500, 5];
            /*
            LoadMapData(1, "Flat_Map.txt", 0, 0);
            LoadMapData(1, "Flat_Map.txt", 0, -448);
            LoadMapData(1, "Flat_Map.txt", CheckMapEnd(mapDatas[0].devided2), 0);
            LoadMapData(1, "Flat_Map2.txt", CheckMapEnd(mapDatas[0].devided2) * 2, 0);*/// 個々の実装を直さなければ...

            //LoadMapData(0, "SlopeTest2.txt", 0, 0);
            //LoadMapData(0, "Stage2Testb.txt", 0, 0);
            //LoadMapData(0, "segmentTest.txt", 0, 0);
            //LoadMapData(0, "SlopeTest3.txt", 0, 0);
            //LoadMapData(0, "Stage2_1.txt", 0, 0);

            //SetTerrainDirection();// 実行位置を変更
        }
Пример #12
0
        /// <summary>
        /// Allows the game to run logic such as updating the world,
        /// checking for collisions, gathering input, and playing audio.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        protected override void Update(GameTime gameTime)
        {
            // Allows the game to exit
            if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed)
                this.Exit();

            // TODO: Add your update logic here
            //JoyStick.Update(1);
            JoyStick.Update(1);
            KeyInput.Update();
            if (KeyInput.KEY(Keys.Escape) || KeyInput.IsOnKeyDown(Keys.Escape)) Exit();
            dt = gameTime.ElapsedGameTime.TotalSeconds;

            currentScene = scenes.Peek();
            while (currentScene.isEndScene) {
                scenes.Pop();
                if (scenes.Count > 0) {
                    currentScene = scenes.Peek();
                }
                else {
                    this.Exit();
                    break;
                }
            }
            if (scenes.Count > 0) {
                currentScene.Update(gameTime.ElapsedGameTime.TotalSeconds);
            }
            else this.Exit();

            base.Update(gameTime);
        }
Пример #13
0
 public void PushScene(Scene scene)
 {
     scenes.Push(scene);//this.Window.
 }
Пример #14
0
 public Stage1(Scene privousScene, bool isHighLvl)
     : base(privousScene, isHighLvl)
 {
     contentDirectory = "Stage01";
 }
Пример #15
0
 public MainTitle(Scene privousScene)
     : base(privousScene)
 {
     Load();
 }
Пример #16
0
		public Stage(Scene privousScene, bool isHighLvl)
			: base(privousScene)
		{
			this.isHighLvl = isHighLvl;
			// System
			reverse = new Reverse(this, game, content);
			slowmotion = new SlowMotion();
			damageControl = new DamageManeger(this, attackedObjects, damagedObjects);
			effectControl = new EffectManeger(this);
			camera = new Camera(this, 320, 240, 640, 480);
			effectBoss = new Effect(this);
			effectStage = new Effect(this);
			effectPlayerDeath = new Effect(this);
			debug = new Debug(game, this);

			// Lists
			characters = new List<Character>();
			dynamicTerrains = new List<Terrain>();
			staticTerrains = new List<Terrain>();
			bullets = new List<Bullet>();
			objects = new List<Object>();
			effects = new List<Effect>();
			damagedCharacters = new List<Character>();
			effectedCharacters = new List<Character>();
			activeDynamicTerrains1 = new List<Terrain>();
			activeDynamicTerrains2 = new List<Terrain>();
			inComboObjects = new List<Object>();
			backGrounds = new List<BackGround>();
			activeCharacters = new List<Character>();
			activeTerrains = new List<Terrain>();
			activeDynamicTerrains = new List<Terrain>();
			activeDynamicTerrainsD = new List<Terrain>();
			activeStaticTerrains = new List<Terrain>();
			activeBullets = new List<Bullet>();
			activeObjects = new List<Object>();
			damagedBullets = new List<Bullet>();
			damagedObjects = new List<Object>();
			attackedObjects = new List<Object>();
			adObjects = new List<Object2>();
			weapons = new List<Weapon>();
			activeWeapons = new List<Weapon>();

			unitToAdd = new List<Object>();
			cameraWall = new List<Block>();
			bgs = new List<ScrollingBackground>();

			// UI
			userInterface = new UserInterface(game, this);
			userInterface.Initialize();

			// Else
			scrollingBackGround = new ScrollingBackground(this, Vector2.Zero);
			frontalScrollingBackGround = new ScrollingBackground(this, Vector2.Zero);
			frontalScrollingBackGround.isFrontal = true;
			scrollingTASEffect = new ScrollingTASEffect(this, Vector2.Zero);
			defHP = 3;
			scrollSpeed = 2;
			
			Load();
		}
Пример #17
0
 /// <summary>
 /// ゲームに新たなシーンを追加し、即座にシーンを変更する。
 /// シーンが終了状態であれば、自動的に開始状態にする。
 /// </summary>
 /// <param name="scene">追加するシーン</param>
 public static void PushScene(Scene scene)
 {
     game.PushScene(scene);
     if (scene.isEndScene) {
         scene.isEndScene = false;
     }
 }
Пример #18
0
 public SelectScene(Scene privousScene)
     : base(privousScene)
 {
 }
Пример #19
0
 public SelectScene(Scene privousScene)
     : base(privousScene)
 {
 }
Пример #20
0
 /// <summary>
 /// 開始状態のシーンを生成する。
 /// </summary>
 public Scene(Scene privousScene)
 {
     isEndScene = false;
     upperScene = privousScene;
 }
Пример #21
0
 public Tutorial(Scene privousScene)
     : base(privousScene)
 {
     Load();
 }