DayZ 1.24
Loading...
Searching...
No Matches
WeaponFireLast.c
Go to the documentation of this file.
1
2class WeaponFireLast extends WeaponStateBase
3{
5 int m_actionType;
6
7 float m_dtAccumulator;
9
11 {
13 m_actionType = actionType;
14
15 // setup nested state machine
16 m_fire = new WeaponFireWithEject(m_weapon, this, m_action, m_actionType);
17
18 // events
19 WeaponEventBase _fin_ = new WeaponEventHumanCommandActionFinished;
20 WeaponEventReloadTimeout __to_ = new WeaponEventReloadTimeout;
21
22 m_fsm = new WeaponFSM(this); // @NOTE: set owner of the submachine fsm
23
24 // transitions
25 m_fsm.AddTransition(new WeaponTransition(m_fire, _fin_, NULL));
26 m_fsm.AddTransition(new WeaponTransition(m_fire, __to_, NULL));
27
28 m_fsm.SetInitialState(m_fire);
29 }
30
31 override void OnEntry(WeaponEventBase e)
32 {
33 super.OnEntry(e);
34 if (e)
36 }
37
38 override void OnExit(WeaponEventBase e)
39 {
41 super.OnExit(e);
42 }
43};
44
class WeaponGuardIsDestroyed extends WeaponGuardBase m_weapon
Definition Guards.c:602
enum FSMTransition WeaponTransition
class WeaponEndAction extends WeaponStartAction m_action
class WeaponFireWithEject extends WeaponFire m_dtAccumulator
signalize mechanism manipulation
Definition Events.c:35
weapon finite state machine
represent weapon state base
Definition BulletHide.c:2
int m_actionType
action to be played
void WeaponFireLast(Weapon_Base w=NULL, WeaponStateBase parent=NULL, WeaponActions action=WeaponActions.NONE, int actionType=-1)
WeaponActions m_action
override void OnEntry(WeaponEventBase e)
ref WeaponFireWithEject m_fire
override void OnExit(WeaponEventBase e)
WeaponActions
actions
Definition human.c:796