Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void FixedUpdate ()
- {
- //update BPM_Multiplier
- BPM_Multiplier = Heart_Rate / 72f;
- //HeartSphere = GameObject.Find("HeartSphere").GetComponent<Transform>();
- //toggle size of heart to show systole
- //toggle systole/diastole if timer > BPMMultiplier
- if (timer.ElapsedMilliseconds >= (Systole ? 300 : 500) * (1 / BPM_Multiplier))
- {
- //toggle heart size to show it pumping
- Ventricle.localScale = Ventricle.localScale * (Systole ? 1.25f : 0.8f);
- Atrium.localScale = Atrium.localScale * (!Systole ? 1.25f : 0.8f);
- //reset timers
- timer.Reset();
- timer.Start();
- Systole = !Systole;
- }
- //update cardiac output
- //poll each output of each vein attached
- //set output based on function% and if heart is in systole or dystole
- }
Advertisement
Add Comment
Please, Sign In to add comment