Class GKStateMachine

  • All Implemented Interfaces:
    NSObject

    public class GKStateMachine
    extends NSObject
    Models a finite state machine that has a single current state.
    • Constructor Detail

      • GKStateMachine

        protected GKStateMachine​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allocWithZone

        public static java.lang.Object allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(java.lang.String key)
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(java.lang.Object aTarget,
                                                                                 org.moe.natj.objc.SEL aSelector,
                                                                                 java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        public static org.moe.natj.objc.Class classForKeyedUnarchiver()
      • debugDescription_static

        public static java.lang.String debugDescription_static()
      • description_static

        public static java.lang.String description_static()
      • hash_static

        public static long hash_static()
      • instanceMethodSignatureForSelector

        public static NSMethodSignature instanceMethodSignatureForSelector​(org.moe.natj.objc.SEL aSelector)
      • instancesRespondToSelector

        public static boolean instancesRespondToSelector​(org.moe.natj.objc.SEL aSelector)
      • isSubclassOfClass

        public static boolean isSubclassOfClass​(org.moe.natj.objc.Class aClass)
      • keyPathsForValuesAffectingValueForKey

        public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(java.lang.String key)
      • new_objc

        public static java.lang.Object new_objc()
      • resolveClassMethod

        public static boolean resolveClassMethod​(org.moe.natj.objc.SEL sel)
      • resolveInstanceMethod

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • stateMachineWithStates

        public static GKStateMachine stateMachineWithStates​(NSArray<? extends GKState> states)
        Creates a state machine with an array of possible states and an initial state.
        Parameters:
        states - a list of possible states for this state machine.
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • version_static

        public static long version_static()
      • canEnterState

        public boolean canEnterState​(org.moe.natj.objc.Class stateClass)
        Returns YES if the indicated class is a a valid next state or if currentState is nil
        Parameters:
        stateClass - the class of the state to be tested
      • currentState

        public GKState currentState()
        The current state that the state machine is in. Prior to the first called to enterState this is equal to nil.
      • enterState

        public boolean enterState​(org.moe.natj.objc.Class stateClass)
        Calls canEnterState to check if we can enter the given state and then enters that state if so. [GKState willExitWithNextState:] is called on the old current state. [GKState didEnterWithPreviousState:] is called on the new state.
        Parameters:
        stateClass - the class of the state to switch to
        Returns:
        YES if state was entered. NO otherwise.
      • stateForClass

        public GKState stateForClass​(org.moe.natj.objc.Class stateClass)
        Gets the instance of the indicated state class from this state machine. Returns nil if the state does not exist
        Parameters:
        stateClass - the class of the state to be retrieved
      • updateWithDeltaTime

        public void updateWithDeltaTime​(double sec)
        Updates the current state machine.
        Parameters:
        sec - the time, in seconds, since the last frame