예제 #1
0
        public void UpdatePlanetInfo(PlanetInfo info, PlanetResourcesDetails resDetails, List<Building> buildings, 
            List<ResourceDeposit> unusedResources, BuildQueue queue)
        {           
            if (info.IsHabited.Equals("True"))
            {
                IsInhabited = true;
                if (info.IsOwnedByPlayer)
                {
                    SliderTaxRate = int.Parse(info.TaxRate);
                    IsDetailsEnabled = true;
                }
                else
                {
                    IsDetailsEnabled = false;
                }

            }
            else
            {
                IsInhabited = false;
                IsDetailsEnabled = false;
            }
            PlanetBuildingsData.UpdateBuildingDetails(buildings, unusedResources, queue);
            InfoTabData.UpdateDetails(info);
            PlanetResourcesData.UpdateResourceDetails(resDetails);
            RaisePropertyChanged("IsDetailsEnabled");
            RaisePropertyChanged("InfoTabData");
            RaisePropertyChanged("PlanetResourcesData");
            RaisePropertyChanged("PlanetBuildingsData");
        }
예제 #2
0
 internal void UpdateAdminInfo(PlanetInfo planetInfo)
 {
     model.UpdateAdminInfo(planetInfo.PopIncreaseRate);
 }
예제 #3
0
 public void UpdatePlanetInfo(PlanetInfo info, PlanetResourcesDetails resDetails, 
     List<Building> buildings, ResourceManager manager, List<ResourceDeposit> unusedResources,
     BuildQueue queue)
 {
     model.UpdatePlanetInfo(info, resDetails, buildings, unusedResources, queue);
     UpdateResources(manager);
 }
예제 #4
0
 public void UpdateDetails(PlanetInfo info)
 {
     PNameText = "Name: " + info.Name;
     PTierText = "Tier: " + info.Tier;
     PSpeedText = "Speed: " + info.Speed;
     PDistanceText = "Distance from star: " + info.Distance;
     POwnerText = "Owned by: " + info.Owner;
     PHabitedText = "Is Habited: " + info.IsHabited;
     PPopulationText = "Population: " + info.Population;
     PPopIncRateText = "Population Growth Rate: " + info.PopIncreaseRate;           
     MapImage.Texture = info.PlanetMapTexture;            
 }