55 {
56
57 m_abilities.Insert(
new AbilityRecord(
WeaponActions.MECHANISM, WeaponActionMechanismTypes.MECHANISM_CLOSED));
58 m_abilities.Insert(
new AbilityRecord(
WeaponActions.MECHANISM, WeaponActionMechanismTypes.MECHANISM_OPENED));
62
63
64
68
69 WeaponStateBase Mech_F =
new WeaponCharging(
this, NULL,
WeaponActions.MECHANISM, WeaponActionMechanismTypes.MECHANISM_CLOSED);
70 WeaponStateBase Mech_L =
new WeaponEjectBullet(
this, NULL,
WeaponActions.MECHANISM, WeaponActionMechanismTypes.MECHANISM_OPENED);
71
74
75
79
80
81
90
91 m_fsm = new WeaponFSM();
92
96 m_fsm.AddTransition(
new WeaponTransition( Mech_F, _abt_,
F, NULL,
new WeaponGuardCurrentChamberFiredOut(
this)));
98
99
102 m_fsm.AddTransition(
new WeaponTransition( Mech_L, _abt_,
E, NULL,
new WeaponGuardCurrentChamberEmpty(
this)));
104
108 m_fsm.AddTransition(
new WeaponTransition( Chamber_F, _abt_,
F, NULL,
new WeaponGuardCurrentChamberFiredOut(
this)));
109 m_fsm.AddTransition(
new WeaponTransition( Chamber_F, _abt_,
E, NULL,
new WeaponGuardCurrentChamberEmpty(
this)));
111
112
117
122
126
127
128
129 bool empty = true;
130 bool discharged = false;
132 if (empty)
133 {
134 if (!discharged)
136 }
137 else
138 {
140 }
141 SetInitialState(init_state);
142
143 SelectionBulletHide();
144
145 m_fsm.Start();
146 }
enum FSMTransition WeaponTransition
enum FSMTransition WeaponEventBase
void WeaponStableState(Weapon_Base w=NULL, WeaponStateBase parent=NULL, int anim_state=-1)
WeaponActionChamberingTypes