File size: 812 Bytes
24b81cb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
class SymptomCB extends HumanCommandActionCallback
{
	//int m_SymptomUID;
	float m_RunTime;
	float m_StartingTime;
	PlayerBase m_Player;
	
	override void OnFinish(bool pCanceled)
	{
		if( m_Player && m_Player.GetSymptomManager())
		{
			m_Player.GetSymptomManager().OnAnimationFinished();
		}
	}
	
	
	void Init(float run_time, PlayerBase player)
	{
		EnableCancelCondition(true);
		m_RunTime = run_time * 1000;
		m_StartingTime = GetGame().GetTime();
		m_Player = player;
		
		if( m_Player && m_Player.GetSymptomManager())
		{
			m_Player.GetSymptomManager().OnAnimationStarted();
		}
	}
	
	bool CancelCondition()
	{
		if(m_RunTime > 0 && (GetGame().GetTime() > m_StartingTime + m_RunTime))
		{
			return true;
		}
		else
		{
			return false;
		}
	}

	override bool IsSymptomCallback()
	{
		return true;
	}
	
};