Package com.prineside.luaj.mapping.parts
Class LJ_GDX_ai.StateMachine_BQ.LIP
java.lang.Object
com.prineside.luaj.mapping.InterfaceProxy
com.prineside.luaj.mapping.parts.LJ_GDX_ai.StateMachine_BQ.LIP
- All Implemented Interfaces:
com.badlogic.gdx.ai.fsm.StateMachine,com.badlogic.gdx.ai.msg.Telegraph,com.esotericsoftware.kryo.KryoSerializable
- Enclosing class:
- LJ_GDX_ai.StateMachine_BQ
public static class LJ_GDX_ai.StateMachine_BQ.LIP
extends InterfaceProxy
implements com.badlogic.gdx.ai.fsm.StateMachine
-
Method Summary
Modifier and TypeMethodDescriptionvoidchangeState(com.badlogic.gdx.ai.fsm.State p1) Performs a transition to the specified state.com.badlogic.gdx.ai.fsm.StateReturns the current state of this state machine.com.badlogic.gdx.ai.fsm.StateReturns the global state of this state machine.com.badlogic.gdx.ai.fsm.StateReturns the last state of this state machine.booleanhandleMessage(com.badlogic.gdx.ai.msg.Telegram p1) Handles received telegrams.booleanisInState(com.badlogic.gdx.ai.fsm.State p1) Indicates whether the state machine is in the given state.booleanChanges the state back to the previous state.voidsetGlobalState(com.badlogic.gdx.ai.fsm.State p1) Sets the global state of this state machine.voidsetInitialState(com.badlogic.gdx.ai.fsm.State p1) Sets the initial state of this state machine.voidupdate()Updates the state machine.Methods inherited from class com.prineside.luaj.mapping.InterfaceProxy
getLuaObj, read, write
-
Method Details
-
changeState
public void changeState(com.badlogic.gdx.ai.fsm.State p1) Description copied from interface:com.badlogic.gdx.ai.fsm.StateMachinePerforms a transition to the specified state.- Specified by:
changeStatein interfacecom.badlogic.gdx.ai.fsm.StateMachine- Parameters:
p1- the state to transition to
-
getCurrentState
public com.badlogic.gdx.ai.fsm.State getCurrentState()Description copied from interface:com.badlogic.gdx.ai.fsm.StateMachineReturns the current state of this state machine.- Specified by:
getCurrentStatein interfacecom.badlogic.gdx.ai.fsm.StateMachine
-
getGlobalState
public com.badlogic.gdx.ai.fsm.State getGlobalState()Description copied from interface:com.badlogic.gdx.ai.fsm.StateMachineReturns the global state of this state machine.Implementation classes should invoke the
updatemethod of the global state every time the FSM is updated. Also, they should never invoke itsenterandexitmethod.- Specified by:
getGlobalStatein interfacecom.badlogic.gdx.ai.fsm.StateMachine
-
getPreviousState
public com.badlogic.gdx.ai.fsm.State getPreviousState()Description copied from interface:com.badlogic.gdx.ai.fsm.StateMachineReturns the last state of this state machine.- Specified by:
getPreviousStatein interfacecom.badlogic.gdx.ai.fsm.StateMachine
-
handleMessage
public boolean handleMessage(com.badlogic.gdx.ai.msg.Telegram p1) Description copied from interface:com.badlogic.gdx.ai.fsm.StateMachineHandles received telegrams.Implementation classes should first route the telegram to the current state. If the current state does not deal with the message, it should be routed to the global state.
- Specified by:
handleMessagein interfacecom.badlogic.gdx.ai.fsm.StateMachine- Specified by:
handleMessagein interfacecom.badlogic.gdx.ai.msg.Telegraph- Parameters:
p1- the received telegram- Returns:
- true if telegram has been successfully handled; false otherwise.
-
isInState
public boolean isInState(com.badlogic.gdx.ai.fsm.State p1) Description copied from interface:com.badlogic.gdx.ai.fsm.StateMachineIndicates whether the state machine is in the given state.- Specified by:
isInStatein interfacecom.badlogic.gdx.ai.fsm.StateMachine- Parameters:
p1- the state to be compared with the current state- Returns:
- true if the current state's type is equal to the type of the class passed as a parameter.
-
revertToPreviousState
public boolean revertToPreviousState()Description copied from interface:com.badlogic.gdx.ai.fsm.StateMachineChanges the state back to the previous state.- Specified by:
revertToPreviousStatein interfacecom.badlogic.gdx.ai.fsm.StateMachine- Returns:
Truein case there was a previous state that we were able to revert to. In case there is no previous state, no state change occurs andfalsewill be returned.
-
setGlobalState
public void setGlobalState(com.badlogic.gdx.ai.fsm.State p1) Description copied from interface:com.badlogic.gdx.ai.fsm.StateMachineSets the global state of this state machine.- Specified by:
setGlobalStatein interfacecom.badlogic.gdx.ai.fsm.StateMachine- Parameters:
p1- the global state.
-
setInitialState
public void setInitialState(com.badlogic.gdx.ai.fsm.State p1) Description copied from interface:com.badlogic.gdx.ai.fsm.StateMachineSets the initial state of this state machine.- Specified by:
setInitialStatein interfacecom.badlogic.gdx.ai.fsm.StateMachine- Parameters:
p1- the initial state.
-
update
public void update()Description copied from interface:com.badlogic.gdx.ai.fsm.StateMachineUpdates the state machine.Implementation classes should invoke first the
updatemethod of the global state (if any) then theupdatemethod of the current state.- Specified by:
updatein interfacecom.badlogic.gdx.ai.fsm.StateMachine
-