Пример #1
0
 public GameOverLayout(DarkJetpack game) : base(game)
 {
     score               = player.score;
     particleMashine     = new ParticleMashine(150, DarkJetpack.baseTexture, null);
     interferenceTexture = new Texture2D(game.GraphicsDevice, 200, 150);
     SaveGameStorage.SaveData(player.highscore);
 }
Пример #2
0
 public Player(DarkJetpack _game, Texture2D terrain)
 {
     game      = _game;
     Terrain   = terrain;
     Position  = Vector2.Zero;
     texture   = game.Content.Load <Texture2D>(@"player");
     Rotation  = 0;
     Speed     = new Vector2(2, 2);
     pmS       = new ParticleMashine(50, Terrain, new Rectangle(365, 321, 64, 64));
     pmF       = new ParticleMashine(20, Terrain, new Rectangle(365, 381, 64, 64));
     highscore = SaveGameStorage.LoadData();
 }
Пример #3
0
        protected override void LoadContent()
        {
            if (!(File.Exists("Save.djp")))
            {
                SaveGameStorage.SaveData(0);
            }
            spriteBatch = new SpriteBatch(GraphicsDevice);


            baseTexture = new Texture2D(GraphicsDevice, 1, 1);
            baseTexture.SetData(new Color[] { Color.White });
            Terrain    = Content.Load <Texture2D>(@"Terrain");
            Explosion  = Content.Load <Texture2D>(@"Explosion1");
            Explosion1 = Content.Load <Texture2D>(@"Explosion2");
            #region LoadMusic
            song[0]  = Content.Load <Song>(@"music/01. Epsilon");
            song[1]  = Content.Load <Song>(@"music/02. Game Not Over");
            song[2]  = Content.Load <Song>(@"music/03. Dead Space");
            song[3]  = Content.Load <Song>(@"music/04. Mounting a Nightmare");
            song[4]  = Content.Load <Song>(@"music/05. Reach the Galaxy");
            song[5]  = Content.Load <Song>(@"music/06. Sky Pony");
            song[6]  = Content.Load <Song>(@"music/07. Hard Drive");
            song[7]  = Content.Load <Song>(@"music/08. Jinx");
            song[8]  = Content.Load <Song>(@"music/09. Between Death And Stars");
            song[9]  = Content.Load <Song>(@"music/10. Nobody Will Escape ");
            song[10] = Content.Load <Song>(@"music/11. Pen In My Hand");
            song[11] = Content.Load <Song>(@"music/12. Road To Heaven (feat. Matty M.)");
            song[12] = Content.Load <Song>(@"music/13. Optimistic (Instrumental)");
            song[13] = Content.Load <Song>(@"music/14. Rain Of That Day (Elzevir Cover)");
            song[14] = Content.Load <Song>(@"music/15. Dark Energy (Instrumental)");
            #endregion
            changeLayoutTo(new MainMenuLayout(this));

            backColor = new Color(76, 220, 241);
            baseFont  = Content.Load <SpriteFont>(@"ScoreFont");
        }
Пример #4
0
 public bool exitGame()
 {
     SaveGameStorage.SaveData(Layout.player.highscore);
     this.Exit();
     return(true);
 }