Skip to content

Commit

Permalink
Update ArtilleryStateMachine (onState => onStateEntered)
Browse files Browse the repository at this point in the history
  • Loading branch information
marceldev89 committed Aug 6, 2016
1 parent 7f842a4 commit da5b4ab
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions addons/sup_artillery/ArtilleryStateMachine.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class ArtilleryStateMachine {
list = "";
list = "ALIVE_sup_artillery_stateMachine_list";

class Idle {
onState = "";
Expand All @@ -14,8 +14,8 @@ class ArtilleryStateMachine {
};

class Active {
onState = "[_this, 'onActive'] call ALIVE_fnc_artillery";
onStateEntered = "";
onState = "";
onStateEntered = "[_this, 'onActive'] call ALIVE_fnc_artillery";
onStateLeaving = "";

class InRange {
Expand All @@ -32,8 +32,8 @@ class ArtilleryStateMachine {
};

class Move {
onState = "[_this, 'onMove'] call ALIVE_fnc_artillery";
onStateEntered = "";
onState = "";
onStateEntered = "[_this, 'onMove'] call ALIVE_fnc_artillery";
onStateLeaving = "";

class InPosition {
Expand All @@ -50,10 +50,16 @@ class ArtilleryStateMachine {
};

class Execute {
onState = "[_this, 'onExecute'] call ALIVE_fnc_artillery";
onStateEntered = "";
onState = "";
onStateEntered = "[_this, 'onExecute'] call ALIVE_fnc_artillery";
onStateLeaving = "";

class Fire {
targetState = "Fire";
condition = "[_this, 'fireNextRound'] call ALIVE_fnc_artillery";
onTransition = "";
};

class Abort {
targetState = "ReturnToBase";
condition = "!([_this, 'hasFireMission'] call ALIVE_fnc_artillery)";
Expand All @@ -62,8 +68,8 @@ class ArtilleryStateMachine {
};

class Fire {
onState = "[_this, 'onFire'] call ALIVE_fnc_artillery";
onStateEntered = "";
onState = "";
onStateEntered = "[_this, 'onFire'] call ALIVE_fnc_artillery";
onStateLeaving = "";

class FireMissionComplete {
Expand Down Expand Up @@ -92,8 +98,8 @@ class ArtilleryStateMachine {
};

class ReturnToBase {
onState = "[_this, 'onReturnToBase'] call ALIVE_fnc_artillery";
onStateEntered = "";
onState = "";
onStateEntered = "[_this, 'onReturnToBase'] call ALIVE_fnc_artillery";
onStateLeaving = "";

class AtBase {
Expand Down

0 comments on commit da5b4ab

Please sign in to comment.