public Team(PlayerType type, GEnvironment environment) { _players = new List<Player>(); _environment = environment; for (int i = 0; i < TEAM_SIZE; i++) { Player player = new Player(type); _players.Add(player); _environment.RegisterEntity(player); } _playerType = type; }
public Football() { _graphics = new GraphicsDeviceManager(this); _graphics.IsFullScreen = true; Content.RootDirectory = "Content"; _environment = new GEnvironment(); _ball = new Ball(_environment); _topTeam = new Team(PlayerType.Top, _environment); _bottomTeam = new Team(PlayerType.Bottom, _environment); _environment.RegisterEntity(_ball); // Frame rate is 30 fps by default for Windows Phone. TargetElapsedTime = TimeSpan.FromTicks(333333); // Pre-autoscale settings. _graphics.PreferredBackBufferWidth = 480; _graphics.PreferredBackBufferHeight = 800; }
public Ball(GEnvironment environment) { _environment = environment; }
public Background(Texture2D lineTexture, GEnvironment environment) { _lineTexture = lineTexture; _environment = environment; }