private void OnTimerStarted(TimeManager.GameTime time) { _beginCell = GameManager.Instance.MapManager.GetCell(0, 0); ConstructNewDistrict(_beginCell, GetBuilding(1)); StartCoroutine(SendEvent()); }
private void OnNewMonth(TimeManager.GameTime time) { var income = 0.0; var marketShares = new List <double>(); var totalSubscribers = 0; foreach (var customersManager in this._networks) { customersManager.OnNewMonth(); income += customersManager.MonthlyIncome; marketShares.Add(customersManager.MarketShare); totalSubscribers += customersManager.SubscribersNumber; Debug.Log($"Network: {customersManager.NetworkType} - Customer Satisfaction Variation {customersManager.CustomerSatisfactionVariation} - Market variation: {customersManager.MarketShareVariation} - Satisfaction: {customersManager.CustomerSatisfaction} (+/- {customersManager.CustomerSatisfactionVariation})"); } if (marketShares.Any()) { this.MarketShare = marketShares.Average(); } var maintenanceCost = this._infrastructuresList.Sum(e => e.MaintenanceCost); this.MaintenanceCosts = maintenanceCost + 10 * totalSubscribers; this.Income = income; this.Money += this.Income - this.MaintenanceCosts; Debug.Log($"Account: {this.Money}€ - Maintenance costs: {this.MaintenanceCosts}€ - Income: {this.Income}€ - Market Share: {this.MarketShare * 100}% of {GameManager.Instance.TownExpensionManager.GetPeoplesNumber()} habs - Subscribers: {totalSubscribers}"); if (this.Money < 0) { this._gameManager.GameOver(); } }
public Speed1200Bits() { this.Name = "1200 bit/s"; this.Description = "This is slow, like reaaaaaaaally slow."; this.InfrastructureLevelType = InfrastructureLevelType.Technology; this.Level = 0; this.BuildCost = 1500; this.MaintenanceCost = 40; this.SatisfactionProvided = 1.40; this.Range = 50; this.CreationDate = new TimeManager.GameTime { Months = 0, Years = 1980 }; this.ExpirationDate = new TimeManager.GameTime { Months = 0, Years = 1990 }; }
public LevelOne() { this.Name = "Level 1"; this.Description = "This is low capacity, like reaaaaaaaally low capacity."; this.InfrastructureLevelType = InfrastructureLevelType.Capacity; this.Level = 0; this.BuildCost = 1500; this.MaintenanceCost = 40; this.SatisfactionProvided = 1.40; this.Range = 50; this.CreationDate = new TimeManager.GameTime { Months = 0, Years = 1980 }; this.ExpirationDate = new TimeManager.GameTime { Months = 0, Years = 1990 }; }
public FiveG() { this.Name = "5G"; this.Description = "Ok, this is still slow, but faster than before, right? RIGHT?"; this.InfrastructureLevelType = InfrastructureLevelType.Technology; this.Level = 4; this.BuildCost = 24000; this.MaintenanceCost = 800; this.SatisfactionProvided = 1.25; this.Range = 55; this.CreationDate = new TimeManager.GameTime() { Months = 0, Years = 2008 }; this.ExpirationDate = new TimeManager.GameTime() { Months = 0, Years = 2030 }; }
public LevelTwo() { this.Name = "Level 2"; this.Description = "Ok, this is still low capacity, but bigger than before, right? RIGHT?"; this.InfrastructureLevelType = InfrastructureLevelType.Capacity; this.Level = 1; this.BuildCost = 3000; this.MaintenanceCost = 80; this.SatisfactionProvided = 1.25; this.Range = 55; this.CreationDate = new TimeManager.GameTime() { Months = 0, Years = 1994 }; this.ExpirationDate = new TimeManager.GameTime() { Months = 0, Years = 1998 }; }
public ADSL() { this.Name = "ADSL"; this.Description = "More Speed ! I can watch a video and play videogames!"; this.InfrastructureLevelType = InfrastructureLevelType.Technology; this.Level = 3; this.BuildCost = 40000; this.MaintenanceCost = 6000; this.SatisfactionProvided = 1.2; this.Range = 55; this.CreationDate = new TimeManager.GameTime() { Months = 0, Years = 1998 }; this.ExpirationDate = new TimeManager.GameTime() { Months = 0, Years = 2016 }; }
public AOL() { this.Name = "AOL"; this.Description = "Amazing, more speed ! Well.. It's not perfect... But works"; this.InfrastructureLevelType = InfrastructureLevelType.Technology; this.Level = 2; this.BuildCost = 6000; this.MaintenanceCost = 160; this.SatisfactionProvided = 1.15; this.Range = 55; this.CreationDate = new TimeManager.GameTime() { Months = 0, Years = 1996 }; this.ExpirationDate = new TimeManager.GameTime() { Months = 0, Years = 2000 }; }
public VDSL() { this.Name = "VDSL"; this.Description = "I can play to an mmorpg during my mother and my father are watching a movie on their computer !"; this.InfrastructureLevelType = InfrastructureLevelType.Technology; this.Level = 4; this.BuildCost = 40000; this.MaintenanceCost = 6000; this.SatisfactionProvided = 1.1; this.Range = 55; this.CreationDate = new TimeManager.GameTime() { Months = 0, Years = 2012 }; this.ExpirationDate = new TimeManager.GameTime() { Months = 0, Years = 2030 }; }
public Fibre() { this.Name = "Fiber"; this.Description = "Too much speed ! My computer can't follow my network ! Love it"; this.InfrastructureLevelType = InfrastructureLevelType.Technology; this.Level = 5; this.BuildCost = 160000; this.MaintenanceCost = 24000; this.SatisfactionProvided = 1.3; this.Range = 55; this.CreationDate = new TimeManager.GameTime() { Months = 0, Years = 2020 }; this.ExpirationDate = new TimeManager.GameTime() { Months = 0, Years = 2050 }; }
private void OnNewMonth(TimeManager.GameTime time) { if (time.Months % 3 == 0) { int number = _random.Next(0, 101); int numberOfBuildings = 1; if (number == 100) { numberOfBuildings = 3; } else if (number >= 89) { numberOfBuildings = 2; } TestToConstruct(_beginCell, -1, numberOfBuildings); } }
public Speed56K() { this.Name = "56 kbit/s"; this.Description = "Ok, this is still slow, but faster than before, right? RIGHT?"; this.InfrastructureLevelType = InfrastructureLevelType.Technology; this.Level = 1; this.BuildCost = 3000; this.MaintenanceCost = 80; this.SatisfactionProvided = 1.1; this.Range = 55; this.CreationDate = new TimeManager.GameTime() { Months = 0, Years = 1994 }; this.ExpirationDate = new TimeManager.GameTime() { Months = 0, Years = 1998 }; }
private void ViewMonth(TimeManager.GameTime time) { textMonth.GetComponent <TranslateText>().SetText("Month: {0}", new object[] { time.Months }); textYear.GetComponent <TranslateText>().SetText("Year: {0}", new object[] { time.Years }); }
private void OnTimerPaused(TimeManager.GameTime time) { _gameIsPaused = true; }
private void OnTimerResumed(TimeManager.GameTime time) { _gameIsPaused = false; }