7 void RifleSingleShotManual_Base ()
11 override void InitStateMachine()
14 m_abilities.Insert(
new AbilityRecord(WeaponActions.MECHANISM, WeaponActionMechanismTypes.MECHANISM_CLOSED));
15 m_abilities.Insert(
new AbilityRecord(WeaponActions.MECHANISM, WeaponActionMechanismTypes.MECHANISM_OPENED));
16 m_abilities.Insert(
new AbilityRecord(WeaponActions.CHAMBERING, WeaponActionChamberingTypes.CHAMBERING_ONEBULLET_CLOSED));
17 m_abilities.Insert(
new AbilityRecord(WeaponActions.CHAMBERING, WeaponActionChamberingTypes.CHAMBERING_ONEBULLET_OPENED));
18 m_abilities.Insert(
new AbilityRecord(WeaponActions.UNJAMMING, WeaponActionUnjammingTypes.UNJAMMING_START));
19 m_abilities.Insert(
new AbilityRecord(WeaponActions.UNJAMMING, WeaponActionUnjammingTypes.UNJAMMING_END));
20 m_abilities.Insert(
new AbilityRecord(WeaponActions.FIRE, WeaponActionFireTypes.FIRE_NORMAL));
21 m_abilities.Insert(
new AbilityRecord(WeaponActions.FIRE, WeaponActionFireTypes.FIRE_COCKED));
30 WeaponStateBase Mech_E =
new WeaponCharging(
this, NULL, WeaponActions.MECHANISM, WeaponActionMechanismTypes.MECHANISM_OPENED);
31 WeaponStateBase Mech_F =
new WeaponCharging(
this, NULL, WeaponActions.MECHANISM, WeaponActionMechanismTypes.MECHANISM_CLOSED);
32 WeaponStateBase Mech_L =
new WeaponEjectBullet(
this, NULL, WeaponActions.MECHANISM, WeaponActionMechanismTypes.MECHANISM_CLOSED);
34 WeaponChambering Chamber_E =
new WeaponChambering(
this, NULL, WeaponActions.CHAMBERING, WeaponActionChamberingTypes.CHAMBERING_ONEBULLET_CLOSED);
35 WeaponChambering Chamber_F =
new WeaponChambering(
this, NULL, WeaponActions.CHAMBERING, WeaponActionChamberingTypes.CHAMBERING_ONEBULLET_OPENED);
38 WeaponStateBase Trigger_E =
new WeaponDryFire(
this, NULL, WeaponActions.FIRE, WeaponActionFireTypes.FIRE_COCKED);
39 WeaponStateBase Trigger_L =
new WeaponFire(
this, NULL, WeaponActions.FIRE, WeaponActionFireTypes.FIRE_NORMAL);
40 WeaponStateBase Trigger_F =
new WeaponDryFire(
this, NULL, WeaponActions.FIRE, WeaponActionFireTypes.FIRE_COCKED);
42 WeaponStateBase Trigger_LJ =
new WeaponFireToJam(
this, NULL, WeaponActions.FIRE, WeaponActionFireTypes.FIRE_JAM);
44 WeaponStateBase Unjam_J =
new WeaponUnjamming(
this, NULL, WeaponActions.UNJAMMING, WeaponActionUnjammingTypes.UNJAMMING_START);
56 m_fsm =
new WeaponFSM();
63 m_fsm.AddTransition(
new WeaponTransition( Mech_F, _fin_,
F, NULL,
new WeaponGuardCurrentChamberFiredOut(
this)));
65 m_fsm.AddTransition(
new WeaponTransition( Mech_F, _abt_,
F, NULL,
new WeaponGuardCurrentChamberFiredOut(
this)));
70 m_fsm.AddTransition(
new WeaponTransition( Mech_L, _fin_,
E, NULL,
new WeaponGuardCurrentChamberEmpty(
this)));
72 m_fsm.AddTransition(
new WeaponTransition( Mech_L, _abt_,
E, NULL,
new WeaponGuardCurrentChamberEmpty(
this)));
77 m_fsm.AddTransition(
new WeaponTransition( Chamber_E, _fin_,
E, NULL,
new WeaponGuardCurrentChamberEmpty(
this)));
79 m_fsm.AddTransition(
new WeaponTransition( Chamber_E, _abt_,
E, NULL,
new WeaponGuardCurrentChamberEmpty(
this)));
83 m_fsm.AddTransition(
new WeaponTransition( Chamber_F, _fin_,
F, NULL,
new WeaponGuardCurrentChamberFiredOut(
this)));
84 m_fsm.AddTransition(
new WeaponTransition( Chamber_F, _fin_,
E, NULL,
new WeaponGuardCurrentChamberEmpty(
this)));
86 m_fsm.AddTransition(
new WeaponTransition( Chamber_F, _abt_,
F, NULL,
new WeaponGuardCurrentChamberFiredOut(
this)));
87 m_fsm.AddTransition(
new WeaponTransition( Chamber_F, _abt_,
E, NULL,
new WeaponGuardCurrentChamberEmpty(
this)));
111 m_fsm.AddTransition(
new WeaponTransition( Unjam_J, _fin_, J, NULL,
new WeaponGuardJammed(
this)));
116 bool discharged =
false;
127 SetInitialState(init_state);
129 SelectionBulletHide();
enum FSMTransition WeaponTransition
enum FSMTransition WeaponEventBase
void WeaponStableState(Weapon_Base w=NULL, WeaponStateBase parent=NULL, int anim_state=-1)