staminamodifierdata.c 992 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. //supplemental data struct for 'StaminaModifier' class
  2. class SMDataBase
  3. {
  4. bool m_InUse = false;
  5. int m_Type;
  6. void SMDataBase()
  7. {
  8. Init();
  9. }
  10. //! Used to set values for the type
  11. void Init();
  12. int GetType() { return m_Type; }
  13. bool IsInUse() { return m_InUse; }
  14. void SetInUse(bool val) { m_InUse = val; }
  15. }
  16. class SMDataExponential : SMDataBase
  17. {
  18. float m_BaseValue;
  19. float m_Exponent;
  20. float m_Multiplier;
  21. float m_Cooldown;
  22. float m_StartTimeAdjustment;
  23. float m_Duration;
  24. override void Init()
  25. {
  26. m_BaseValue = GameConstants.STAMINA_DRAIN_HOLD_BREATH_START;
  27. m_Exponent = GameConstants.STAMINA_DRAIN_HOLD_BREATH_EXPONENT;
  28. m_Multiplier = CfgGameplayHandler.GetHoldBreathStaminaModifier();
  29. m_Cooldown = GameConstants.STAMINA_REGEN_COOLDOWN_DEPLETION;
  30. m_StartTimeAdjustment = PlayerSwayConstants.SWAY_TIME_IN + PlayerSwayConstants.SWAY_TIME_STABLE;
  31. m_Duration = GameConstants.STAMINA_DRAIN_HOLD_BREATH_DURATION;
  32. }
  33. }
  34. class SMDataHoldBreath : SMDataExponential
  35. {
  36. }