Example #1
0
		public static Potion operator +(Potion x, int y)
		{
			Potion newPotion = new Potion(x.Value);
			newPotion.Value += y;
			if (newPotion.Value < 0)
				newPotion.Value = 0;
			return newPotion;
		}
Example #2
0
		public static Potion operator -(Potion x, Potion y)
		{
			Potion newPotion = new Potion(x.Value);
			newPotion.Value -= y.Value;
			if (newPotion.Value < 0)
				newPotion.Value = 0;
			return newPotion;
		}
Example #3
0
		protected virtual void Dispose(bool disposing)
		{
			// Check to see if Dispose has already been called.
			if (!this.disposed)
			{
				// If disposing equals true, dispose all managed
				// and unmanaged resources.
				if (disposing)
				{
					// Dispose managed resources.
					_Coin = null;
					_Potion = null;
				}

				// Call the appropriate methods to clean up
				// unmanaged resources here.
				// If disposing is false,
				// only the following code is executed.

				// Note disposing has been done.
				disposed = true;
			}
		}
Example #4
0
        protected virtual void Dispose(bool disposing)
        {
            // Check to see if Dispose has already been called.
            if (!this.disposed)
            {
                // If disposing equals true, dispose all managed
                // and unmanaged resources.
                if (disposing)
                {
                    // Dispose managed resources.
                    _Coin   = null;
                    _Potion = null;
                }

                // Call the appropriate methods to clean up
                // unmanaged resources here.
                // If disposing is false,
                // only the following code is executed.

                // Note disposing has been done.
                disposed = true;
            }
        }
Example #5
0
		public Potion(Potion value)
			: base(value.Value)
		{ }
Example #6
0
		internal void Add(Currency currency)
		{
			_Coin += currency.Coin;
			_Potion += currency.Potion;
		}
Example #7
0
 public Currency(Currencies.Coin coin, Currencies.Potion potion)
 {
     _Coin.Value   = coin.Value;
     _Potion.Value = potion.Value;
 }
Example #8
0
 internal void Add(Currency currency)
 {
     _Coin   += currency.Coin;
     _Potion += currency.Potion;
 }
Example #9
0
 public Potion(Potion value)
     : base(value.Value)
 {
 }