public void AddCityStayWithPkg(City city, SightseeingPackage package) { CityStay newStay = new CityStay(city, package.days); Trip.AddStay(newStay); if (Trip.arrivedInTime) { CulturePoints += package.culturePoints; } UsePackageResources(package); }
private void UseCityStayResources(CityStay stay) { float days = stay.DaysStaytime; float costs; CulturePoints += Trip.CurrentCity.CulturePointsPer12Hrs * 2 * days; CulturePoints += UnityEngine.Random.Range(-2, 3); // + or - 2 points randomly if (days > 1) { costs = days * stay.City.CostsPerNight[Avatar.AvatarType]; } else { costs = stay.City.CostsPerDay[Avatar.AvatarType]; } Resources[typeof(MoneyResource)].Use(costs); NotifyObservers(Resources); }
public void AddStay(CityStay stay) { route.Add(stay); }