Пример #1
0
 /// <summary>
 /// functions used to store power to PowerSource
 /// </summary>
 public virtual void PowerDown()                                 // virtual for now(in case)
 {
     if (IsPowered && PowerSource.HasStoredPower(RequiredPower)) // if it's powered, check if power source is not full
     {
         IsPowered = false;                                      // if it's not, give back power and turn off.
     }
 }