Ejemplo n.º 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");
        }
Ejemplo n.º 2
0
 internal void UpdateAdminInfo(PlanetInfo planetInfo)
 {
     model.UpdateAdminInfo(planetInfo.PopIncreaseRate);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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;            
 }