update method

StateMachine update()

Updates the internal state of the FSM. Usually called by {@link GameEntity#update}.

Implementation

StateMachine update() {
	if ( globalState != null ) {
		globalState?.execute( owner );
	}

	if ( currentState != null ) {
		currentState?.execute( owner );
	}

	return this;
}