コード例 #1
0
        public void Initialize(GamePlayer gamePlayer)
        {
            Debug.Log($"Initialize: {gamePlayer.Nation}");
            Player = gamePlayer;

            _nationGizmo = DomEdit.I.Ui.Create <NationGizmo>(transform);
            nationButton.transform.SetAsLastSibling();
            UpdateGizmo();
        }
コード例 #2
0
        public void SetOwner(Nation nation)
        {
            if (nation == null || nation.Equals(Nation.Independents))
            {
                if (_nationGizmo != null)
                {
                    Destroy(_nationGizmo.gameObject);
                }
                return;
            }

            if (_nationGizmo == null)
            {
                _nationGizmo = DomEdit.I.Ui.Create <NationGizmo>(transform);
            }

            _nationGizmo.SetNation(nation);

            bool isStartLocation = DomEdit.I.MapMan.Map.Players.Any(x => x.CapitalProvinceNum == Province.ProvinceNumber);

            _nationGizmo.ShowCapitalMarker(isStartLocation);
        }