Liberi Developer Guide: Heart
From EQUIS Lab Wiki
Contents |
About
The Heart class is a client-side class which allows game scripts to read and respond to player heart rate in a meaningful manner. In order for the Heart class to function, there must be a device present and regularly providing heart rate information via injection (see below). For full details, read the source file at Scripts/Core/Heart.cs.
API
Enumerations
-
HeartTier
- Enumeration of heart rate tiers. Possible values:
Normal
,Target
,Vigorous
,Extreme
.
Properties
-
Rate
- The current heart rate.
-
Tier
- The "tier" of the current heart rate, as determined by the local player's health profile. The tier can be any of the values defined by the
HeartTier
enumeration (see above).
-
TierTime
- The amount of time for which the player has maintained the current heart rate.
Events
-
TierChanged
- This event is fired when the latest change in heart rate resulted in a change of heart rate tier.
Methods
-
InjectRate
- Call this method from a device script in order to provide heart rate information. For example, this can come from a heart rate monitor, or it can come from the keyboard or even a text file for simulated heart rates.