Example #1
0
    public bool Fill(float amount, Liquid temp)
    {
        bool isPosiible = temp.GetVolume() + amount < _volumeOfThisTube;

        if (isPosiible)
        {
            temp.AddVolume(amount);
        }
        return(isPosiible);
    }
Example #2
0
    public bool Dispense(float amount, Liquid temp)
    {
        bool isPosiible = temp.GetVolume() - amount > 0;

        if (isPosiible)
        {
            temp.AddVolume(-amount);
        }
        return(isPosiible);
    }
Example #3
0
 private void Start()
 {
     _water.AddVolume(_waterPreSettings);
     _oil.AddVolume(_oilPreSettings);
     _mercury.AddVolume(_mercuryPreSettings);
 }