public Options(Microsoft.Xna.Framework.Game game)
        {
            this.game = game;
            service = (Microsoft.Xna.Framework.Graphics.IGraphicsDeviceService)game.Services.GetService(typeof(Microsoft.Xna.Framework.Graphics.IGraphicsDeviceService));

            //Assign Spritebatch
            spriteBatch = new SpriteBatch(service.GraphicsDevice);
        }
        public Lose(Microsoft.Xna.Framework.Game game)
        {
            this.game = game;
            service = (Microsoft.Xna.Framework.Graphics.IGraphicsDeviceService)game.Services.GetService(typeof(Microsoft.Xna.Framework.Graphics.IGraphicsDeviceService));

            //Assign Spritebatch
            spriteBatch = new SpriteBatch(service.GraphicsDevice);
            medalstrue = RankManager.medalstrue1;
        }
        public Highscores(Microsoft.Xna.Framework.Game game)
        {
            this._game = game;
            _service = (Microsoft.Xna.Framework.Graphics.IGraphicsDeviceService)game.Services.GetService(typeof(Microsoft.Xna.Framework.Graphics.IGraphicsDeviceService));
            _content = new ContentManager(game.Services);
            _content.RootDirectory = "content";
            _graphicsDev = game.GraphicsDevice;
            _spriteBatch = new SpriteBatch(_graphicsDev);
            _font = _content.Load<SpriteFont>("Fonts\\Neuropolitical");

            _entitiesL1 = SceneManager.GetInstance(_game)._dao.getHighScores(1);
            _entitiesL2 = SceneManager.GetInstance(_game)._dao.getHighScores(2);
            _entitiesL3 = SceneManager.GetInstance(_game)._dao.getHighScores(3);

            _positionOffset1 = 80;
            _positionOffset2 = 80;
            _positionOffset3 = 80;

            for (int i=0; i<_entitiesL2.Length;i++)
            {
                if (_entitiesL2[i].L2Minutes == 60)
                {
                    _entitiesL2[i].L2Minutes = 0;
                }
                if (_entitiesL2[i].L2Seconds == 60)
                {
                    _entitiesL2[i].L2Seconds = 0;
                }
            }
            for (int i = 0; i < _entitiesL1.Length; i++)
            {
                if (_entitiesL1[i].L1Minutes == 60)
                {
                    _entitiesL1[i].L1Minutes = 0;
                }
                if (_entitiesL1[i].L1Seconds == 60)
                {
                    _entitiesL1[i].L1Seconds = 0;
                }
            }
            for (int i = 0; i < _entitiesL3.Length; i++)
            {
                if (_entitiesL3[i].L3Minutes == 60)
                {
                    _entitiesL3[i].L3Minutes = 0;
                }
                if (_entitiesL3[i].L3Seconds == 60)
                {
                    _entitiesL3[i].L3Seconds = 0;
                }
            }
        }
Beispiel #4
0
        //SoundEffectInstance _musicIns;
        public Menu(Microsoft.Xna.Framework.Game game)
        {
            this._game = game;
            _service = (Microsoft.Xna.Framework.Graphics.IGraphicsDeviceService)game.Services.GetService(typeof(Microsoft.Xna.Framework.Graphics.IGraphicsDeviceService));
            _content = new ContentManager(game.Services);
            _content.RootDirectory = "content";
            _graphicsDev = game.GraphicsDevice;
            _spriteBatch = new SpriteBatch(_graphicsDev);
            _inputName = new InputName(_content);
            _color1 = Color.White;
            _color2 = Color.White;
            _color3 = Color.White;

            Initialize();
        }
        public LevelOne(Microsoft.Xna.Framework.Game game)
        {
            this._game = game;
            _service = (Microsoft.Xna.Framework.Graphics.IGraphicsDeviceService)game.Services.GetService(typeof(Microsoft.Xna.Framework.Graphics.IGraphicsDeviceService));
            _content = new ContentManager(game.Services);
            _content.RootDirectory = "content";
            _graphicsDev = game.GraphicsDevice;
            _spriteBatch = new SpriteBatch(_graphicsDev);
            _camera = new Camera(_graphicsDev.Viewport);
            _rightBounds = new Rectangle(_graphicsDev.Viewport.Width - 500, 0, 800, _graphicsDev.Viewport.Height);
            _leftBounds = new Rectangle(_graphicsDev.Viewport.X - 100, 0, 500, _graphicsDev.Viewport.Height);
            _backgroundBounds = new Rectangle(0, 0, _graphicsDev.Viewport.Width + 100, _graphicsDev.Viewport.Height + 80);
            _levelBuilder = new LevelBuilder(_content, 1);
            _scorePos = new Vector2(40, 20);
            _levelTime = TimeSpan.Zero;

            Initialize();
        }
 public Main(Microsoft.Xna.Framework.Game game)
 {
     this.game = game;
     service = (Microsoft.Xna.Framework.Graphics.IGraphicsDeviceService)game.Services.GetService(typeof(Microsoft.Xna.Framework.Graphics.IGraphicsDeviceService));
 }