private void registrerDepression()
 {
     if (depressed && ventilatorAttacher.Attached)
     {
         DepressionsQueue.Enqueue(Time.time);
         calculateVentilationRate();
     }
 }
Beispiel #2
0
    //method handling what to do when player presses the "perform compression button"
    public void UpdateCompressionState(bool state)
    {
        if (isCompressing)
        {
            if (comp.SuccessfulCompression)
            {
                isCompressing = false;

                compressionQueue.Enqueue(Time.time); //add timestamp of end of compression to queue
                calculateCompressionRate();
            }

            BreathBone.transform.localScale = new Vector3(comp.Compress(), 1, 1); //update breathbone length with new value
        }

        if (!isCompressing && state && isCounting)
        {
            isCompressing = true; //start single compression
        }
    }