Guest User

Untitled

a guest
Mar 7th, 2018
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.96 KB | None | 0 0
  1. void FixedUpdate ()
  2.     {
  3.         //update BPM_Multiplier
  4.         BPM_Multiplier = Heart_Rate / 72f;
  5.         //HeartSphere = GameObject.Find("HeartSphere").GetComponent<Transform>();
  6.        
  7.         //toggle size of heart to show systole
  8.         //toggle systole/diastole if timer > BPMMultiplier
  9.         if(Systole ? timer.ElapsedMilliseconds >= 300 * (1/BPM_Multiplier) : timer.ElapsedMilliseconds >= 500 * (1/BPM_Multiplier))
  10.         {
  11.             //toggle heart size to show it pumping
  12.             Ventricle.localScale = Ventricle.localScale * (Systole ? 1.25f : 0.8f);
  13.             Atrium.localScale = Atrium.localScale * (!Systole ? 1.25f : 0.8f);
  14.             //reset timers
  15.             timer.Reset();
  16.             timer.Start();
  17.             Systole = !Systole;
  18.            
  19.         }
  20.        
  21.         //update cardiac output
  22.         //poll each output of each vein attached
  23.         //set output based on function% and if heart is in systole or dystole
  24.     }
Advertisement
Add Comment
Please, Sign In to add comment