Ejemplo n.º 1
0
 public GameState(GameStateManager gsm,ContentManager content)
 {
     batch = Game1.spriteBatch;
     graphics = Game1.graphics;
     this.gsm = gsm;
     this.content = content;
 }
Ejemplo n.º 2
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);
            basiceffect = new BasicEffect(GraphicsDevice);

            gsm = new GameStateManager(this.Content);

            gsm.loadContent();
            // TODO: use this.Content to load your game content here
        }
Ejemplo n.º 3
0
        public PlayState(GameStateManager gsm, ContentManager content)
            : base(gsm, content)
        {
            keyb = Keyboard.GetState();

            cam = new FirstPersonCamera(Vector3.Zero, Vector3.Zero, Consts.WORLDSCALE/15f, 0.001f);

            map = new Map(content,cam);
            map.setLevel(1);

            cam.setMap(map);

            player = new Player(content, map,cam);
        }