Dayz Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
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;
8 ref WeaponFireWithEject m_fire;
9
10 void WeaponFireLast (Weapon_Base w = NULL, WeaponStateBase parent = NULL, WeaponActions action = WeaponActions.NONE, int actionType = -1)
11 {
12 m_action = action;
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
45
signalize mechanism manipulation
Definition events.c:35
weapon finite state machine
represent weapon state base
Definition bullethide.c:2
Weapon_Base m_weapon
void WeaponFireLast(Weapon_Base w=NULL, WeaponStateBase parent=NULL, WeaponActions action=WeaponActions.NONE, int actionType=-1)
override void OnEntry(WeaponEventBase e)
ref WeaponFSM m_fsm
hierarchical parent state of this state (or null)
void WeaponStateBase(Weapon_Base w=NULL, WeaponStateBase parent=NULL)
internal state id used for load/restore
override void OnExit(WeaponEventBase e)
int m_actionType
action to be played
WeaponActions m_action
WeaponActions
actions
Definition human.c:816
enum FSMTransition WeaponTransition
class WeaponEndAction extends WeaponStartAction m_action
class WeaponFireWithEject extends WeaponFire m_dtAccumulator