Example #1
0
        public void Setup(Model.Faction faction)
        {
            _Faction = faction ?? throw new System.ArgumentNullException(nameof(faction));

            _Faction.GoldChanged += Faction_GoldChanged;

            UpdateGoldText();
        }
Example #2
0
        public FactionDiplomacy(Model.Faction faction)
        {
            InitializeComponent();

            this.faction = faction;

            this.UpdateView();
        }
Example #3
0
        public void SetCurrentPlayer(Model.Faction faction)
        {
            if (faction == null)
            {
                throw new System.ArgumentNullException(nameof(faction));
            }

            _Text.text = $"{faction.Name} turn";
        }
Example #4
0
        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));
        }