-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create (sup_)Artillery class with CBA statemachine
- Loading branch information
1 parent
f1f844f
commit 4a04214
Showing
3 changed files
with
275 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
class ArtilleryStateMachine { | ||
list = ""; | ||
|
||
class Idle { | ||
onState = ""; | ||
onStateEntered = ""; | ||
onStateLeaving = ""; | ||
|
||
class HasFireMission { | ||
targetState = "Active"; | ||
condition = "[_this, 'hasFireMission'] call ALIVE_fnc_Artillery"; | ||
onTransition = ""; | ||
}; | ||
}; | ||
|
||
class Active { | ||
onState = "[_this, 'onActive'] call ALIVE_fnc_Artillery"; | ||
onStateEntered = ""; | ||
onStateLeaving = ""; | ||
|
||
class InRange { | ||
targetState = "Execute"; | ||
condition = "[_this, 'inRange'] call ALIVE_fnc_Artillery"; | ||
onTransition = ""; | ||
}; | ||
|
||
class NotInRange { | ||
targetState = "Move"; | ||
condition = "!([_this, 'inRange'] call ALIVE_fnc_Artillery)"; | ||
onTransition = ""; | ||
}; | ||
}; | ||
|
||
class Move { | ||
onState = "[_this, 'onMove'] call ALIVE_fnc_Artillery"; | ||
onStateEntered = ""; | ||
onStateLeaving = ""; | ||
|
||
class InPosition { | ||
targetState = "Execute"; | ||
condition = "[_this, 'inPosition'] call ALIVE_fnc_Artillery"; | ||
onTransition = ""; | ||
}; | ||
|
||
class Abort { | ||
targetState = "ReturnToBase"; | ||
condition = "!([_this, 'hasFireMission'] call ALIVE_fnc_Artillery)"; | ||
onTransition = ""; | ||
}; | ||
}; | ||
|
||
class Execute { | ||
onState = "[_this, 'onExecute'] call ALIVE_fnc_Artillery"; | ||
onStateEntered = ""; | ||
onStateLeaving = ""; | ||
|
||
class Abort { | ||
targetState = "ReturnToBase"; | ||
condition = "!([_this, 'hasFireMission'] call ALIVE_fnc_Artillery)"; | ||
onTransition = ""; | ||
}; | ||
}; | ||
|
||
class Fire { | ||
onState = "[_this, 'onFire'] call ALIVE_fnc_Artillery"; | ||
onStateEntered = ""; | ||
onStateLeaving = ""; | ||
|
||
class FireMissionComplete { | ||
targetState = "ReturnToBase"; | ||
condition = "[_this, 'isFireMissionComplete'] call ALIVE_fnc_Artillery"; | ||
onTransition = ""; | ||
}; | ||
|
||
class Fired { | ||
targetState = "FireDelay"; | ||
condition = "true"; | ||
onTransition = ""; | ||
}; | ||
}; | ||
|
||
class FireDelay { | ||
onState = ""; | ||
onStateEntered = ""; | ||
onStateLeaving = ""; | ||
|
||
class Continue { | ||
targetState = "Fire"; | ||
condition = "[_this, 'fireNextRound'] call ALIVE_fnc_Artillery"; | ||
onTransition = ""; | ||
}; | ||
}; | ||
|
||
class ReturnToBase { | ||
onState = "[_this, 'onReturnToBase'] call ALIVE_fnc_Artillery"; | ||
onStateEntered = ""; | ||
onStateLeaving = ""; | ||
|
||
class AtBase { | ||
targetState = "Idle"; | ||
condition = "[_this, 'inPosition'] call ALIVE_fnc_Artillery"; | ||
onTransition = ""; | ||
}; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters