/// <summary> /// Schedule a new game. /// </summary> /// <param name="opponent">the opponent team</param> /// <param name="time">the date/time of the game</param> public Game(StadiumStructure _stadium, OpponentTeam _opponent, TimeLength _time) { this.stadium = _stadium; this.opponent = _opponent; this.date = World.world.clock + _time; World.world.clock.registerOneShot(new ClockHandler(onGameDate), _time); }
/// <summary> /// Removes the structure from given location, if any. /// </summary> public override void remove(MapViewWindow view, Location loc) { StadiumStructure c = World.world.getEntityAt(loc) as StadiumStructure; if (c != null) { c.remove(); } }
internal StadiumPropertyDialog(StadiumStructure _structure) { this.structure = _structure; InitializeComponent(); stadiumName.Text = structure.stadiumName; teamName.Text = structure.teamName; foreach (Game g in structure.pastGames) { ListViewItem lvi = g.createListItem(); pastGameView.Items.Add(lvi); lvi.EnsureVisible(); } foreach (Game g in structure.futureGames) { upcomingGameView.Items.Add(g.createListItem()); } }
public override bool canBeBuilt(Location baseLoc, ControlMode cm) { return(StadiumStructure.canBeBuilt(baseLoc, size, cm)); }
public Game(StadiumStructure _stadium, TimeLength _time) : this(_stadium, OpponentTeam.drawRandom(), _time) { }