Ejemplo n.º 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;
		}
Ejemplo n.º 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;
		}
Ejemplo n.º 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;
			}
		}
Ejemplo n.º 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;
            }
        }
Ejemplo n.º 5
0
		public Potion(Potion value)
			: base(value.Value)
		{ }
Ejemplo n.º 6
0
		internal void Add(Currency currency)
		{
			_Coin += currency.Coin;
			_Potion += currency.Potion;
		}
Ejemplo n.º 7
0
 public Currency(Currencies.Coin coin, Currencies.Potion potion)
 {
     _Coin.Value   = coin.Value;
     _Potion.Value = potion.Value;
 }
Ejemplo n.º 8
0
 internal void Add(Currency currency)
 {
     _Coin   += currency.Coin;
     _Potion += currency.Potion;
 }
Ejemplo n.º 9
0
 public Potion(Potion value)
     : base(value.Value)
 {
 }