3 protected float m_TimeElpased;
4 protected float m_TotalTimeElpased;
5 protected float m_TimeToComplete;
6 protected float m_DefaultTimeToComplete;
7 protected ref Param1<float> m_SpentUnits;
11 m_DefaultTimeToComplete = time_to_complete_action;
18 m_SpentUnits =
new Param1<float>(0);
22 m_SpentUnits.param1 = 0;
25 m_TimeToComplete = action_data.m_Player.GetSoftSkillsManager().SubtractSpecialtyBonus( m_DefaultTimeToComplete,
m_Action.GetSpecialtyWeight(),
true);
30 if ( !action_data.m_Player )
35 if ( m_TimeElpased < m_TimeToComplete )
37 m_TimeElpased += action_data.m_Player.GetDeltaT();
38 m_TotalTimeElpased += action_data.m_Player.GetDeltaT();
43 m_SpentUnits.param1 = m_TimeElpased;
44 SetACData(m_SpentUnits);
45 m_TimeElpased = m_TimeToComplete - m_TimeElpased;
46 OnCompletePogress(action_data);
55 m_SpentUnits.param1 = m_TotalTimeElpased;
56 SetACData(m_SpentUnits);
61 override float GetProgress()
63 float progress = m_TimeElpased/m_TimeToComplete;
68 void SetProgress(
float value)
70 m_TimeElpased = value;