コード例 #1
0
 public void Load(ContentManager Content, GameTime gameTime, SpriteBatch spriteBatch, int loadingState)
 {
     if (loadingState == 0)
     {
         camera.UpdateTransformation(Game1.graphics);
         loadingScreen.Load(Content);
     }
     loadingScreen.UpdateDraw(loadingState, spriteBatch, gameTime, camera);
     switch (loadingState)
     {
         case 0:
             renderScreen = new RenderTarget2D(Game1.graphics.GraphicsDevice, 1920, 1080);
             renderSpine = new RenderTarget2D(Game1.graphics.GraphicsDevice, 1920, 1080);
             renderGame = new RenderTarget2D(Game1.graphics.GraphicsDevice, 1920, 1080);
             renderForeground1 = new RenderTarget2D(Game1.graphics.GraphicsDevice, 1920, 1080);
             renderForeground0 = new RenderTarget2D(Game1.graphics.GraphicsDevice, 1920, 1080);
             renderBackground0 = new RenderTarget2D(Game1.graphics.GraphicsDevice, 1920, 1080);
             renderBackground1 = new RenderTarget2D(Game1.graphics.GraphicsDevice, 1920, 1080);
             renderBackground2 = new RenderTarget2D(Game1.graphics.GraphicsDevice, 1920, 1080);
             renderBackground3 = new RenderTarget2D(Game1.graphics.GraphicsDevice, 1920, 1080);
             renderHud = new RenderTarget2D(Game1.graphics.GraphicsDevice, 1920, 1080);
             renderShader = new RenderTarget2D(Game1.graphics.GraphicsDevice, 1920, 1080);
             font = Content.Load<SpriteFont>("fonts/schrift");
             foreground_1.Load(Content, 5, Convert.ToInt32((double)Game1.luaInstance["planeForeground1HeightOffset"]));
             break;
         case 1:
             spieler.Load(Content, Game1.graphics);
             hero.Load(Content, Game1.graphics);
             princess.Load(Content, Game1.graphics);
             karte.Load(Content);
             karte.Generate(spieler, hero);
             foreground_0.Load(Content, 5, Convert.ToInt32((double)Game1.luaInstance["planeForeground0HeightOffset"]));
             break;
         case 2:
             blood.Load();
             background_0.Load(Content, Convert.ToInt32((double)Game1.luaInstance["planeTilesBackground0"]), 0);
             break;
         case 3:
             RageEffect = Content.Load<Texture2D>("sprites/screenRage");
             background_1.Load(Content, Convert.ToInt32((double)Game1.luaInstance["planeTilesBackground1"]), 0);
             break;
         case 4:
             background_2.Load(Content, Convert.ToInt32((double)Game1.luaInstance["planeTilesBackground2"]), 0);
             break;
         case 5:
             background_3.Load(Content, Convert.ToInt32((double)Game1.luaInstance["planeTilesBackground3"]), 0);
             break;
         case 6:
             //clouds_1.Load(Content, "clouds_1", karte, camera);
             //clouds_2.Load(Content, "clouds_2", karte, camera);
             //clouds_3.Load(Content, "clouds_3", karte, camera);
             gui.Load(Content);
             coverEyes = Content.Load<Effect>("CoverEyes");
             smash = Content.Load<Effect>("Smash");
             dust = Content.Load<Effect>("Dust");
             clear = Content.Load<Effect>("Clear");
             pause = Content.Load<Effect>("Pause");
             gaussShader = new GaussianBlur(Content, Game1.graphics, 1920, 1080, 20f);
             gaussScreen = new GaussianBlur(Content, Game1.graphics, 1920, 1080, 20f);
             gaussBackground0 = new GaussianBlur(Content, Game1.graphics, 1920, 1080, 1f);
             gaussBackground1 = new GaussianBlur(Content, Game1.graphics, 1920, 1080, 3f);
             gaussBackground2 = new GaussianBlur(Content, Game1.graphics, 1920, 1080, 7f);
             gaussBackground3 = new GaussianBlur(Content, Game1.graphics, 1920, 1080, 12f);
             princess.ResetRage(gameTime);
             StartSave();
             Save((int)spieler.position.X);
             pauseMenu = new SubMenu(2, "pause", new Vector2(- 60, -100), 200);
             pauseMenu.Load(Content);
             pauseMenu.buttons.Add(new Button("start", new Rectangle(0, 0, 150, 175), 4));
             pauseMenu.buttons.Add(new Button("exit", new Rectangle(0, 390, 150, 250), 4));
             Sound.Load(Content);
             Cutscene.Load(Content);
             if (intro)
             {
                 Cutscene.Play("intro");
             }
             else if (Game1.sound)
             {
                 Sound.bgMusicInstance.Play();
             }
             break;
     }   
 }
コード例 #2
0
 public void Load(ContentManager Content)
 {
     circle = new Texture2D(Game1.graphics.GraphicsDevice, 1, 1, false, SurfaceFormat.Color);
     circle.SetData<Color>(new Color[]{Color.White});
     background.Load(new Vector2(0,0), "background", 1.0f, 1.0f);
     background.anim("background", 0, true);
     fg_texture = Content.Load<Texture2D>("sprites/level_5/planes/foreground");
     pause = Content.Load<Effect>("Pause");
     scream = Content.Load<Effect>("Scream");
     //attack = Content.Load<Effect>("Attack");
     renderSpine = new RenderTarget2D(Game1.graphics.GraphicsDevice, 1920, 1080);
     renderGame = new RenderTarget2D(Game1.graphics.GraphicsDevice, 1920, 1080);
     renderScreen = new RenderTarget2D(Game1.graphics.GraphicsDevice, 1920, 1080);
     renderBG = new RenderTarget2D(Game1.graphics.GraphicsDevice, 1920, 1080);
     renderShader = new RenderTarget2D(Game1.graphics.GraphicsDevice, 1920, 1080);
     renderAttack = new RenderTarget2D(Game1.graphics.GraphicsDevice, 1920, 1080);
     spieler.Load(Content, Game1.graphics);
     spieler.lifes = 4;
     hero.Load(Content, Game1.graphics);
     hero.start = true;
     hero.spine.anim("idle", 0, false);
     hero.animeTime = 1.0f;
     karte.Load(Content);
     GUI.Load(Content);
     karte.Generate(spieler, hero);
     font = Content.Load<SpriteFont>("fonts/schrift");
     pauseMenu = new SubMenu(2, "pause", new Vector2(-60, -100), 200);
     pauseMenu.Load(Content);
     pauseMenu.buttons.Add(new Button("start", new Rectangle(0, 0, 150, 175), 4));
     pauseMenu.buttons.Add(new Button("exit", new Rectangle(0, 390, 150, 250), 4));
     fadeColor = new Color(0, 0, 0, 0);
     attackBlur = new GaussianBlur(Content, Game1.graphics, 1920, 1080, 10f);
     Sound.Load(Content);
     Cutscene.Load(Content);
     if (cutscene)
     {
         Cutscene.Play("final");
     }
     else if (Game1.sound)
     {
         Sound.bgMusicInstance.Play();
     }
 }