예제 #1
0
 public State(ContentManager content, Game1 game, GraphicsDevice graphicsDevice, Camera2d camera2D)
 {
     _Camera2D       = camera2D;
     _Content        = content;
     _Game           = game;
     _GraphicsDevice = graphicsDevice;
     _Texts          = new List <SpriteText>();
 }
예제 #2
0
 public StateStartScreen(ContentManager content, Game1 game, GraphicsDevice graphicsDevice, Camera2d camera2D) : base(content, game, graphicsDevice, camera2D)
 {
     _Texts = XmlContent.StartScreenText;
 }
예제 #3
0
 public StateDevEnvironment(ContentManager content, Game1 game, GraphicsDevice graphicsDevice, Camera2d camera2D) : base(content, game, graphicsDevice, camera2D)
 {
     _DevGuy = new SpriteDevGuy(content.Load <Texture2D>("DevGuy"), new Vector2(0, 0));
     _AllSprites.Add(_DevGuy);
 }
예제 #4
0
 public StateSplashScreen(ContentManager content, Game1 game, GraphicsDevice graphicsDevice, Camera2d camera2D) : base(content, game, graphicsDevice, camera2D)
 {
     _Texts        = XmlContent.SplashScreenText;
     _Camera2D.Pos = new Vector2(400, 240);
 }
예제 #5
0
        public StateGamePlaying(ContentManager content, Game1 game, GraphicsDevice graphicsDevice, Camera2d camera2D) : base(content, game, graphicsDevice, camera2D)
        {
            _IoController = game.IoController;
            _AllSprites   = new List <Sprite>();

            _Levels = XmlContent.Levels;

            _CurrentLevel = _Levels[XmlContent.FirstLevel];

            _PlayerCharacter = new SpritePlayerCharacter(
                XmlContent.PlayerCharacterUpTextures,
                XmlContent.PlayerCharacterDownTextures,
                XmlContent.PlayerCharacterLeftTextures,
                XmlContent.PlayerCharacterRightTextures,
                _CurrentLevel.PlayerCharacterDefaultCoordinates, ref game.IoController);

            ChangeLevel(_Levels[XmlContent.FirstLevel]);

            //foreach (Sprite block in _CurrentLevel.Blocks)
            //{
            //    _AllSprites.Add(block);
            //}
        }