/// <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. scenario = new Scenario2D(this); scenario2DPainter = new Scenario2DPainter(GraphicsDevice, scenario); scenario.CameraFacing = new Vector2(0, 1); scenario.CameraPosition = new Vector2(0, 0); scenario.ViewHeight = 300; scenario.ViewWidth = 400; texture1 = Content.Load<Texture2D>("field"); texture2 = Content.Load<Texture2D>("cloud"); // TODO: use this.Content to load your game content here }
public Match(Game game, Team homeTeam, Team awayTeam, CameraType cameraType, Difficulty difficulty, Weather weather, int duration, bool player2Cpu) : base(game) { CameraType = cameraType; Difficulty = difficulty; Weather = weather; Duration = duration; HomeTeam = homeTeam; AwayTeam = awayTeam; AwayTeam.IsHomeTeam = false; Player1Index = 0; Player2Index = 0; Player2Cpu = player2Cpu; Scenario = new Scenario2D(Game); Scenario2DPainter = new Scenario2DPainter(Game.GraphicsDevice, Scenario); timer = -1; Pause = false; DisplayRadar = true; hold = true; KickOff = true; KickOffStart = true; HomeTeamStart = true; FreeKickStart = false; TmpTeam = null; Ball = new Ball(game, Weather); Field = new Field(game); Panel = new Panel(game); //passing MaxPassSpeed = 800; MaxErrorAngle = 15; PerfectPassFactor = 2.8f; Rand = new Random(); Audience = new Song[3]; }