Esempio n. 1
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
		}
Esempio n. 2
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();
		}