Пример #1
0
 public void Consume(Guest guest)
 {
     // Add EntryFee to our parent wallet
     this.ParentWallet.SubtractFromBalance(-EntryFee, guest.Name);
 }
Пример #2
0
 public GuestEnteredEventArgs(Guest guest)
 {
     Guest = guest;
 }
Пример #3
0
 public GuestAddedEventArgs(Guest guest)
 {
     Guest = guest;
 }
Пример #4
0
        private Desire giveDesireByStats(Guest guest)
        {
            // Go through all stats and decide wether we have cravings.
            float          cravings       = 40;
            IDesirable     desirable      = null;
            ObjectSpecific objectSpecific = null;

            foreach (var stat in guest.CurrentStats)
            {
                // If we aren't craving this stat, continue to the next stat.
                if (stat.Value < cravings)
                {
                    continue;
                }

                switch (stat.Type.UniqueId)
                {
                case "hunger":
                {
                    desirable = (IDesirable)Marketplace.Instance.GetRandomBuyableObject(ObjectSpecific.Types.Food);
                    //objectSpecific =
                    break;
                }

                case "thirst":
                {
                    desirable = (IDesirable)Marketplace.Instance.GetRandomBuyableObject(ObjectSpecific.Types.Drink);
                    //objectSpecific =
                    break;
                }

                case "excitement":
                {
                    desirable = (IDesirable)Marketplace.Instance.GetRandomBuyableObject(ObjectSpecific.Types.Exciting);
                    //objectSpecific =
                    break;
                }
                }

                //if (desirable == null)
                //throw new NotImplementedException("Add implementation for this desire!");

                // If we've come here we have a desirable. We only want 1 thing.
                break;
            }

            if (desirable == null)
            {
                return(null);
            }

            // If we desire something out of our stats, enqueue it on our desire list
            Desire desire = new Desire()
            {
                Object   = desirable,
                Specific = objectSpecific
            };

            // Show that this ride/shop doesn't exist yet = (Unavailable)
            // TODO: Change this to say something like "I would love to go on something more exciting than X"
            desire.Reason = string.Format("(Unavailable) " + desire.Object.GetRandomDesireReason(), desire.Object);

            guest.Desires.Enqueue(desire);

            return(desire);
        }
Пример #5
0
 public GuestRemovedEventArgs(Guest guest)
 {
     Guest = guest;
 }