コード例 #1
0
 public void Show(StreetBuilding toShow)
 {
     this.gameObject.SetActive(true);
     this.m_streetName.text = toShow.Data.Name;
     this.m_icon.sprite     = toShow.Data.Icon;
     this.m_street          = toShow;
 }
コード例 #2
0
ファイル: GameHUD.cs プロジェクト: ThePeat94/LD48-DeeperWell
 public void ShowStreetUI(StreetBuilding street)
 {
     this.m_productionBuildingUI.Hide();
     this.m_civilBuildingUI.Hide();
     this.m_wellUI.Hide();
     this.m_streetUI.Show(street);
 }
コード例 #3
0
        private void SetUpgradePresentation()
        {
            StreetBuilding building = this.street.Building;

            string currBuildingImg = string.Empty;
            string nextBuildingImg = string.Empty;

            if (this.street.Owner == null)
            {
                currBuildingImg = "grass.png";
            }
            else
            {
                if (building == null)
                {
                    currBuildingImg = "foundation.png";
                    nextBuildingImg = "house1.png";
                }
                else if (building.Type == TypeOfBuilding.House)
                {
                    currBuildingImg = "house1.png";
                    nextBuildingImg = "hotel1.png";
                }
                else if (building.Type == TypeOfBuilding.Hotel)
                {
                    currBuildingImg = "hotel1.png";
                    nextBuildingImg = "palace1.png";
                }
                else if (building.Type == TypeOfBuilding.Palace)
                {
                    currBuildingImg = "palace1.png";
                    nextBuildingImg = string.Empty;
                }
            }

            CurrBuildingImg.Source = new BitmapImage(new Uri("/Media/Images/Buildings/" + currBuildingImg, UriKind.RelativeOrAbsolute));
            NextBuildingImg.Source = new BitmapImage(new Uri("/Media/Images/Buildings/" + nextBuildingImg, UriKind.RelativeOrAbsolute));
        }