Arma Reforger Explorer
1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Toggle main menu visibility
Loading...
Searching...
No Matches
SCR_TransportUnitHelpTaskEntity.c
Go to the documentation of this file.
1
class
SCR_TransportUnitHelpTaskEntityClass
:
SCR_TaskClass
2
{
3
}
4
5
class
SCR_TransportUnitHelpTaskEntity :
SCR_Task
6
{
7
protected
SCR_TransportUnitComponent
m_TransportUnit
;
8
9
//------------------------------------------------------------------------------------------------
10
SCR_TransportUnitComponent
GetTransportUnit
()
11
{
12
return
m_TransportUnit
;
13
}
14
15
//------------------------------------------------------------------------------------------------
16
void
SetTransportUnit
(
SCR_TransportUnitComponent
transportUnit)
17
{
18
if
(
m_TransportUnit
== transportUnit)
19
return
;
20
21
if
(
m_TransportUnit
)
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
//------------------------------------------------------------------------------------------------
32
protected
void
OnTransportUnitStateChanged
(
SCR_ETransportUnitState
state)
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
//------------------------------------------------------------------------------------------------
42
void
~SCR_TransportUnitHelpTaskEntity
()
43
{
44
if
(
m_TransportUnit
)
45
m_TransportUnit
.GetOnStateChanged().Remove(
OnTransportUnitStateChanged
);
46
}
47
}
SCR_ETransportUnitState
SCR_ETransportUnitState
Definition
SCR_ETransportUnitState.c:2
SCR_Task
void SCR_Task(IEntitySource src, IEntity parent)
Definition
SCR_Task.c:1938
SCR_ETaskState
SCR_ETaskState
Definition
SCR_Task.c:3
m_TaskSystem
SCR_TaskSystem m_TaskSystem
Definition
SCR_TaskNotificationComponent.c:11
m_TransportUnit
SCR_TransportUnitHelpTaskEntityClass m_TransportUnit
~SCR_TransportUnitHelpTaskEntity
void ~SCR_TransportUnitHelpTaskEntity()
Definition
SCR_TransportUnitHelpTaskEntity.c:42
SetTransportUnit
void SetTransportUnit(SCR_TransportUnitComponent transportUnit)
Definition
SCR_TransportUnitHelpTaskEntity.c:16
GetTransportUnit
SCR_TransportUnitComponent GetTransportUnit()
Definition
SCR_TransportUnitHelpTaskEntity.c:10
OnTransportUnitStateChanged
void OnTransportUnitStateChanged(SCR_ETransportUnitState state)
Definition
SCR_TransportUnitHelpTaskEntity.c:32
SCR_TaskClass
Definition
SCR_Task.c:75
SCR_TransportUnitComponent
Definition
SCR_TransportUnitComponent.c:11
SCR_TransportUnitHelpTaskEntityClass
Definition
SCR_TransportUnitHelpTaskEntity.c:2
scripts
Game
Tasks
SCR_TransportUnitHelpTaskEntity.c
Generated by
1.17.0