示例#1
0
 public void EjectExternalTank()
 {
     if (canister.HasContainerInserted)
     {
         if (canister.tankValveOpen)
         {
             StartCoroutine(DisplayFlashingText("Close the valve first!"));
         }
         else
         {
             canister.RetrieveInsertedContainer();
             StartCoroutine(DisplayFlashingText("Tank ejected!"));
         }
     }
     else
     {
         StartCoroutine(DisplayFlashingText("No Tank Inserted"));
     }
 }
示例#2
0
        public void EjectExternalTank()
        {
            Canister canister = Provider.GetComponent <Canister>();

            if (canister.InsertedContainer != null)
            {
                if (tankValveOpen)
                {
                    StartCoroutine(DisplayFlashingText("Close the valve first!"));
                }
                else
                {
                    canister.RetrieveInsertedContainer();
                    StartCoroutine(DisplayFlashingText("Tank ejected!"));
                }
            }
            else
            {
                StartCoroutine(DisplayFlashingText("No Tank Inserted"));
            }
        }