// Returns all rides and shops by what they serve public List <BuildableObject> GetBuyableObjects(ObjectSpecific.Types objectSpecificType) { var objects = new List <BuildableObject>(); foreach (var rideOrShop in purchasableObjects) { if (rideOrShop.ServesTypes.Contains(objectSpecificType)) { objects.Add(rideOrShop); } } return(objects); }
public Shop() : base() { DesireReasons = new string[] { "{0} looks nice", "I think I'll have lunch at {0}", }; ServesTypes = new ObjectSpecific.Types[] { ObjectSpecific.Types.Food, ObjectSpecific.Types.Drink }; }
// default constructor public Ride() { // Default to free rides without a name or image, nor any statistic boosts Name = "Untitled Ride"; Image = RideImageUnavailableImage; Cost = 0; EntryFee = 0; StatisticBoosts = new List <StatBoost>(); DesireReasons = new string[] { "{0} looks awesome!", "I'm definitely going on {0}!", "{0} looks very promissing!", "I would love to go on {0}!", "{0}, here I come!", }; ServesTypes = new ObjectSpecific.Types[] { ObjectSpecific.Types.Exciting }; }
// Returns a single random rides and shops by what they serve public BuildableObject GetRandomBuyableObject(ObjectSpecific.Types objectSpecificType) { var objects = GetBuyableObjects(objectSpecificType); return(objects[NumberGenerator.Next(objects.Count)]); }