DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ RifleReChambering()

void WeaponStateBase::RifleReChambering ( Weapon_Base w = NULL,
WeaponStateBase parent = NULL,
WeaponActions action = WeaponActions.NONE,
int actionType = -1 )
inlineprivate

См. определение в файле RifleReChambering.c строка 13

14 {
15 m_action = action;
16 m_actionType = actionType;
17
18 // setup nested state machine
19 m_start = new WeaponChambering_Start(m_weapon, this, m_action, m_actionType);
20 m_eject = new WeaponEjectBullet_Cartridge(m_weapon, this);
21 m_chamber = new WeaponChambering_Cartridge(m_weapon, this);
22 m_w4t = new WeaponChambering_W4T(m_weapon, this);
23 // events
24 WeaponEventAnimBulletEject __be_ = new WeaponEventAnimBulletEject;
25 WeaponEventAnimBulletShow __bs_ = new WeaponEventAnimBulletShow;
26 WeaponEventAnimBulletInChamber __bc_ = new WeaponEventAnimBulletInChamber;
27 WeaponEventBase _fin_ = new WeaponEventHumanCommandActionFinished;
28
29 m_fsm = new WeaponFSM(this); // @NOTE: set owner of the submachine fsm
30 m_fsm.AddTransition(new WeaponTransition(m_start , __be_, m_eject));
31 m_fsm.AddTransition(new WeaponTransition(m_eject , __bs_, m_chamber));
32 m_fsm.AddTransition(new WeaponTransition(m_chamber, __bc_, m_w4t));
33 m_fsm.AddTransition(new WeaponTransition(m_w4t , _fin_, NULL));
34
35 // Safety exits
36 m_fsm.AddTransition(new WeaponTransition(m_chamber, _fin_, null));
37 m_fsm.AddTransition(new WeaponTransition(m_eject , _fin_, null));
38 m_fsm.AddTransition(new WeaponTransition(m_start , _fin_, null));
39
40 m_fsm.SetInitialState(m_start);
41 }
enum FSMTransition WeaponTransition
enum FSMTransition WeaponEventBase
int m_actionType
action to be played
Определения RifleChambering.c:4
ref WeaponChambering_W4T m_w4t
Определения RifleChambering.c:10
ref WeaponFSM m_fsm
hierarchical parent state of this state (or null)
Определения WeaponStateBase.c:14
WeaponActions m_action
Определения RifleChambering.c:3
Weapon_Base m_weapon
Определения WeaponStateBase.c:12
ref WeaponChambering_Cartridge m_chamber
Определения RifleChambering.c:9
ref WeaponStateBase m_start
source of the cartridge
Определения RifleChambering.c:7
ref WeaponEjectCasing m_eject
Определения RifleChambering.c:8

Перекрестные ссылки m_action, m_actionType, m_chamber, m_eject, m_fsm, m_start, m_w4t, m_weapon и WeaponStateBase().