public GameState(GameStateManager gsm,ContentManager content) { batch = Game1.spriteBatch; graphics = Game1.graphics; this.gsm = gsm; this.content = content; }
/// <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 }
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); }