3 protected float m_LocalTimeElpased;
4 protected float m_TimeElpased;
5 protected float m_AdjustedTimeToComplete;
6 protected float m_DefaultTimeToComplete;
7 protected ref Param1<float> m_SpentUnits;
11 m_DefaultTimeToComplete = time_to_complete_action;
19 m_SpentUnits =
new Param1<float>(0);
23 m_SpentUnits.param1 = 0;
26 m_AdjustedTimeToComplete = action_data.m_Player.GetSoftSkillsManager().SubtractSpecialtyBonus( m_DefaultTimeToComplete,
m_Action.GetSpecialtyWeight(),
true);
31 if ( m_DefaultTimeToComplete < 0 )
36 if ( !action_data.m_Player )
41 if ( m_TimeElpased < m_AdjustedTimeToComplete )
43 m_TimeElpased += action_data.m_Player.GetDeltaT();
50 m_SpentUnits.param1 = m_TimeElpased;
51 SetACData(m_SpentUnits);
53 OnCompletePogress(action_data);
62 m_SpentUnits.param1 = m_TimeElpased;
63 SetACData(m_SpentUnits);
65 if ( m_DefaultTimeToComplete < 0 )
73 override float GetProgress()
75 if ( m_AdjustedTimeToComplete != 0 )
78 return m_TimeElpased/m_AdjustedTimeToComplete;
82 Print(
"USER ACTION COMPONENT CONTINUOUS TIME - WRONG TIME TO COMPLETE CALCULATION - Incorrect data for progress bar!");