Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_TransportUnitHelpTaskEntity.c
Go to the documentation of this file.
4
5class SCR_TransportUnitHelpTaskEntity : SCR_Task
6{
8
9 //------------------------------------------------------------------------------------------------
14
15 //------------------------------------------------------------------------------------------------
17 {
18 if (m_TransportUnit == transportUnit)
19 return;
20
22 m_TransportUnit.GetOnStateChanged().Remove(OnTransportUnitStateChanged);
23
24 m_TransportUnit = transportUnit;
25 if (!m_TransportUnit)
26 return;
27
28 m_TransportUnit.GetOnStateChanged().Insert(OnTransportUnitStateChanged);
29 }
30
31 //------------------------------------------------------------------------------------------------
33 {
34 if (state == SCR_ETransportUnitState.ON_TASK)
35 {
36 m_TaskSystem.SetTaskState(this, SCR_ETaskState.COMPLETED);
37 m_TaskSystem.DeleteTask(this);
38 }
39 }
40
41 //------------------------------------------------------------------------------------------------
43 {
45 m_TransportUnit.GetOnStateChanged().Remove(OnTransportUnitStateChanged);
46 }
47}
SCR_ETransportUnitState
void SCR_Task(IEntitySource src, IEntity parent)
Definition SCR_Task.c:1938
SCR_ETaskState
Definition SCR_Task.c:3
SCR_TaskSystem m_TaskSystem
SCR_TransportUnitHelpTaskEntityClass m_TransportUnit
void ~SCR_TransportUnitHelpTaskEntity()
void SetTransportUnit(SCR_TransportUnitComponent transportUnit)
SCR_TransportUnitComponent GetTransportUnit()
void OnTransportUnitStateChanged(SCR_ETransportUnitState state)