61 eStaminaState GetStaminaState(eStaminaTendency tendency,
eStaminaZones zone)
63 eStaminaState stamina_state;
67 if(zone ==
eStaminaZones.ZONE1 && tendency == eStaminaTendency.DOWN)
69 stamina_state = eStaminaState.ZONE1_DOWN;
72 if(zone ==
eStaminaZones.ZONE1 && tendency == eStaminaTendency.UP)
74 stamina_state = eStaminaState.ZONE1_UP;
77 if(zone ==
eStaminaZones.ZONE2 && tendency == eStaminaTendency.DOWN)
79 stamina_state = eStaminaState.ZONE2_DOWN;
82 if(zone ==
eStaminaZones.ZONE2 && tendency == eStaminaTendency.UP)
84 stamina_state = eStaminaState.ZONE2_UP;
87 if(zone ==
eStaminaZones.ZONE0 && tendency == eStaminaTendency.UP)
89 stamina_state = eStaminaState.ZONE0_UP;
92 if(zone ==
eStaminaZones.ZONE0 && tendency == eStaminaTendency.DOWN)
94 stamina_state = eStaminaState.ZONE0_DOWN;
122 eStaminaTendency stamina_tendency;
127 if( stamina_delta > 0 )
129 stamina_tendency = eStaminaTendency.DOWN;
131 if( stamina_delta <= 0 )
133 stamina_tendency = eStaminaTendency.UP;
155 float stamina_normalized =
Math.InverseLerp(0,
m_Player.GetStaminaHandler().GetStaminaCap(), stamina);
156 stamina_normalized =
Math.Clamp(stamina_normalized,0,1);
180 float m_PostponeTime = -1;
184 bool m_StaminaUpEndPlayed =
true;
189 void PostponeStamina(
float time)
191 m_PostponeTime =
GetGame().GetTime() + time;
202 eStaminaState stamina_state =
m_Player.GetStaminaState();
203 switch(stamina_state)
205 case eStaminaState.ZONE1_DOWN:
208 m_StaminaUpEndPlayed =
false;
212 case eStaminaState.ZONE1_UP:
215 m_StaminaUpEndPlayed =
false;
219 case eStaminaState.ZONE2_DOWN:
222 m_StaminaUpEndPlayed =
false;
226 case eStaminaState.ZONE2_UP:
229 m_StaminaUpEndPlayed =
false;
233 case eStaminaState.ZONE0_UP:
236 m_StaminaUpEndPlayed =
true;
244 case eStaminaState.ZONE0_DOWN: