public bool AttemptToReserveVehicle(OilSlickType type) { if (type == OilSlickType.Land) { if (CurrentOilTrucks < MaximumOilTrucks) { CurrentOilTrucks += 1; PublishEquipmentUpdate(); AudioManager.Instance.Play("Resource/Purchase/OilTruck", pitchMin: 0.95f, pitchMax: 1.05f); return(true); } else { AudioManager.Instance.Play("Resource/Error", pitchMin: 0.8f, pitchMax: 1.2f); return(false); } } else { if (CurrentOilTankers < MaximumOilTankers) { CurrentOilTankers += 1; PublishEquipmentUpdate(); AudioManager.Instance.Play("Resource/Purchase/OilTanker", pitchMin: 0.95f, pitchMax: 1.05f); return(true); } else { AudioManager.Instance.Play("Resource/Error", pitchMin: 0.8f, pitchMax: 1.2f); return(false); } } }
public void ReturnVehicle(OilSlickType type) { if (type == OilSlickType.Land) { CurrentOilTrucks -= 1; } else { CurrentOilTankers -= 1; } PublishEquipmentUpdate(); }