public StartScreen(SpriteBatch spriteBatch, PlayerCard humanCard, PlayerCard alienCard, Player thisPlayer, MapBuilder mapBuilder, Texture2D checkedTexture, Texture2D unCheckedTexture, SpriteFont font) { this.spriteBatch = spriteBatch; this.humanCard = humanCard; this.alienCard = alienCard; this.thisPlayer = thisPlayer; this.mapBuilder = mapBuilder; this.checkedTexture = checkedTexture; this.unCheckedTexture = unCheckedTexture; //clientCheckBox = new CheckBox(unCheckedTexture, checkedTexture, "Client", new Rectangle(20, 300, 50, 50), spriteBatch, font); //clientCheckBox.IsChecked = true; serverCheckBox = new CheckBox(unCheckedTexture, checkedTexture, "Server", new Rectangle(20, 360, 50, 50), spriteBatch, font); }
protected override void LoadContent() { spriteBatch = new SpriteBatch(GraphicsDevice); screenWidth = graphics.GraphicsDevice.PresentationParameters.BackBufferWidth; screenHeight = graphics.GraphicsDevice.PresentationParameters.BackBufferHeight; thisPlayer.ScreenCenter = new Vector2(screenWidth / 2, screenHeight / 2); thisPlayer.Position = new Vector2(1000, 700); thisPlayer.Life = 2000; thisPlayer.IsThisPlayer = true; mapBuilder = new MapBuilder(this, screenWidth, screenHeight, graphics, tileSize, thisPlayer, spriteBatch, players); shadowmapResolver = new ShadowmapResolver(GraphicsDevice, quadRender, ShadowmapSize.Size256, ShadowmapSize.Size1024); shadowmapResolver.LoadContent(Content); lightArea1 = new LightArea(GraphicsDevice, ShadowmapSize.Size1024); lightArea2 = new LightArea(GraphicsDevice, ShadowmapSize.Size512); lightPosition = thisPlayer.ScreenCenter; lightPosition2 = new Vector2(screenWidth / 2 - 80, screenHeight / 2); screenShadows = new RenderTarget2D(GraphicsDevice, GraphicsDevice.Viewport.Width, GraphicsDevice.Viewport.Height); crossTexture = Content.Load<Texture2D>("cross"); font = Content.Load<SpriteFont>("myFont"); whiteBackground = Content.Load<Texture2D>("Cards/whitebackground"); startScreen = new StartScreen(spriteBatch, new PlayerCard { Texture = Content.Load<Texture2D>("Cards/human"), BoundingBox = new Rectangle(20, 20, 200, 200), AnimatedTexture = new AnimatedTexture(Content.Load<Texture2D>("PlayerSprites/dudespritesheet"), 4, 4, true, 20, spriteBatch, 50, 50, new Vector2(25, 25), null) }, new PlayerCard { Texture = Content.Load<Texture2D>("Cards/alien"), BoundingBox = new Rectangle(300, 20, 200, 200), AnimatedTexture = new AnimatedTexture(Content.Load<Texture2D>("PlayerSprites/alienspritesheet"), 4, 4, true, 20, spriteBatch, 70, 70, new Vector2(25, 25), null) }, thisPlayer, mapBuilder, Content.Load<Texture2D>("Cards/checked"), Content.Load<Texture2D>("Cards/unchecked"), font); LoadWeaponDefinitions(); artificialWallTexture = new AnimatedTexture(Content.Load<Texture2D>("MapItems/artificialwall"), 8, 1, false, 1, spriteBatch, 40, 40, new Vector2(20, 20), null); bloodTexture = new AnimatedTexture(Content.Load<Texture2D>("WeaponSprites/blood"), 13, 1, false, 26, spriteBatch, 50, 50, new Vector2(25, 25), null); }