Hi all,
Ive wrote up two classes to read XML files into a FiniteSM and into the CombinedSM:
FiniteSM:
<finiteMachine initialState="monster uncaring">
<state name="monster uncaring">
<pair input="player see" output="monster annoyed" />
<pair input="player shoot" output="monster dead" />
</state>
<state name="monster annoyed">
<pair input="player see" output="monster annoyed" />
<pair input="player shoot" output="monster dead" />
</state>
<state name="monster dead"></state>
</finiteMachine>
CombinedSM
<CombinedMachine initialState="monster angreness">
<state name="monster angreness">
<innerstate name="uncaring" lowRange="0" highrange="50" />
<innerstate name="angry" lowRange="30" highrange="55" />
<innerstate name="enraged" lowRange="50" highrange="100" />
</state>
<state name="monster speed accuracy">
<innerstate name="accuracy" lowRange="0" highrange="60" />
<innerstate name="enraged" lowRange="40" highrange="100" />
</state>
</combinedMachine>
Are those OK?
I could also create a class that would load an Entity with set attributes from an XML file if you want?
DP