Beispiel #1
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);*/
        }
        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);*/
        }
Beispiel #3
0
		public override void Load()
		{
			#region Terrain
			/*foreach(Terrain terrain in dynamicTerrains) {
                if (terrain is Block && !terrain.loadManually) {
                    if (terrain.movementType == 0) 
                        if (game.stageNum != 0)                      terrain.Load(content, "Object\\Terrain\\Slopes\\0" + (game.stageNum - 1).ToString() + "\\Block02");
                        else                                        terrain.Load(content, "Object\\Terrain\\Slopes\\0" + (game.stageNum - 1).ToString() + "\\Block01");
                    else if (terrain.movementType == 1)                     terrain.Load(content, "Object\\Terrain\\FrozenBlock");
                    else if (terrain.movementType == 2)                     terrain.Load(content, "Object\\Terrain\\BlockV"); 
                }
                    
                if (terrain is SnowBall)                            terrain.Load(content, "Object\\Terrain\\SnowBall", "Object\\Weapon\\Weapon");
                if (terrain is Meteor) {
                                                                    (terrain as Meteor).Load(content, "Object\\Terrain\\Meteor01", ref terrain.texture);
                                                                    (terrain as Meteor).Load(content, "Object\\Terrain\\Meteor02", ref terrain.texture2);
                }
                if (terrain is DamageObject)                        terrain.Load(content);
            }*/


			foreach (Terrain terrain in staticTerrains) {
				if (terrain is Block && !(terrain is DamageBlock) && !terrain.loadManually) {
					if (terrain.type == 0) {
						if (terrain.isOn && !terrain.isUnder && !(terrain as Block).isUnderSlope) {// 草ブロックにする条件
							terrain.Load(content, "Object\\Terrain\\Block" + (game.stageNum - 1).ToString() + "1");
						} else terrain.Load(content, "Object\\Terrain\\Block" + (game.stageNum - 1).ToString() + "2");
					} else if (terrain.type == 1) terrain.Load(content, "Object\\Terrain\\FrozenBlock");
					else if (terrain.type == 2) terrain.Load(content, "Object\\Terrain\\BlockV");
				} /**/ // 静的な地形に関しては今のところここでもう1回読み込む必要あり:GetDirectionの位置の関係
			}
			#endregion
			#region Character
			// 移行済み
			#endregion
			#region Bullets & Weapon
			// 移行済み
			if (weapons.Count == 0) sword.Load(content, "Object\\Weapon\\Melee");
			/*else foreach (Weapon weapon in weapons) {
				if (weapon is Sword) {
				}
				else                                        weapon.Load(content, "Object\\Weapon\\Melee");
			}*/
			#endregion
			#region Etc
			// UI
			userInterface.Initialize();
			userInterface.Load();

			// BackGround
			scrollingBackGround = new ScrollingBackground(this, Vector2.Zero);
			frontalScrollingBackGround = new ScrollingBackground(this, Vector2.Zero);
			frontalScrollingBackGround.isFrontal = true;

			if (!game.isHighLvl) {
				scrollingBackGround.Load(game.GraphicsDevice, content, "Object\\BackGround\\BackGround" + (game.stageNum - 1).ToString() + "2");
				frontalScrollingBackGround.Load(game.GraphicsDevice, content, "Object\\BackGround\\BackGround" + (game.stageNum - 1).ToString() + "1");
			} else {
				scrollingBackGround.Load(game.GraphicsDevice, content, "Object\\BackGround\\BackGround" + (game.stageNum - 1).ToString() + "3");
				frontalScrollingBackGround.Load(game.GraphicsDevice, content, "Object\\BackGround\\BackGround" + (game.stageNum - 1).ToString() + "1");
			}
			scrollingTASEffect = new ScrollingTASEffect(this, Vector2.Zero);
			scrollingTASEffect.Load(game.GraphicsDevice, content, "Effect\\TAS1");

			// BGM
			//SoundControl.IniMusic("Audio\\BGM\\forest");
			//SoundControl.Play();
			//\
            
            
            gameStatus = new GameStatus();
			DrawBackGround();// 背景バッファの作成
			player.position = new Vector2(game.hasReachedCheckPoint ? 13400 : 100, 100);
			//gameTimeNormal = 0;
			//gameTimeTAS = 0;

			bossScreenEdgeLeft = boss.defaultPosition.X - 640;// -Player.screenPosition.X;
			bossScreenEdgeRight = boss.defaultPosition.X + 640 + 100;// 100
			camera.position = game.hasReachedCheckPoint ? new Vector2(player.position.X, 0) : Vector2.Zero;
			isScrolled = true;
			hasEffectedWarning = false;
			hasEffectedBeginning = false;
			hasEffectedBossExplosion = false;
			inBossBattle = false;
			BGMchanged = false;
            if (game.hasReachedCheckPoint) {
                gameStatus = game.tmpGameStatus;
                hasEffectedBeginning = true;
            }
			#endregion
		}
Beispiel #4
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();
		}