public void Setup(Model.Faction faction) { _Faction = faction ?? throw new System.ArgumentNullException(nameof(faction)); _Faction.GoldChanged += Faction_GoldChanged; UpdateGoldText(); }
public FactionDiplomacy(Model.Faction faction) { InitializeComponent(); this.faction = faction; this.UpdateView(); }
public void SetCurrentPlayer(Model.Faction faction) { if (faction == null) { throw new System.ArgumentNullException(nameof(faction)); } _Text.text = $"{faction.Name} turn"; }
private void Start() { _UnitFactionDropdown.onValueChanged.AddListener((index) => _SelectedFaction = _GameManager.Game.Factions.Single(f => f.Name == _UnitFactionDropdown.options[index].text)); _SpawnUnitButton.onClick.AddListener(() => _UIManager.DebugCreateUnit(_SelectedFaction)); _UnitFactionDropdown.AddOptions(_GameManager.Game.Factions.Select(f => f.Name).ToList()); _SelectedFaction = _GameManager.Game.Factions.First(); _ResetMapButton.onClick.AddListener(() => _Map.ModelMap.ApplyScenario(_GameManager.CurrentScenario)); }