Class SKNode

    • Constructor Detail

      • SKNode

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

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • alloc

        public static SKNode alloc()
      • allocWithZone

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

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

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

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

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

        @NotNull
        public static @NotNull org.moe.natj.objc.Class classForKeyedUnarchiver()
      • clearTextInputContextIdentifier

        public static void clearTextInputContextIdentifier​(@NotNull
                                                           @NotNull java.lang.String identifier)
      • 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

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

        public static SKNode new_objc()
      • node

        public static SKNode node()
      • nodeWithFileNamed

        public static SKNode nodeWithFileNamed​(@NotNull
                                               @NotNull java.lang.String filename)
      • obstaclesFromNodeBounds

        @NotNull
        public static @NotNull NSArray<? extends GKPolygonObstacle> obstaclesFromNodeBounds​(@NotNull
                                                                                            @NotNull NSArray<? extends SKNode> nodes)
        Returns an array of GKPolygonObstacles from a group of SKNode's transformed bounds in scene space.
        See Also:
        GKObstacleGraph
      • obstaclesFromNodePhysicsBodies

        @NotNull
        public static @NotNull NSArray<? extends GKPolygonObstacle> obstaclesFromNodePhysicsBodies​(@NotNull
                                                                                                   @NotNull NSArray<? extends SKNode> nodes)
        Returns an array of GKPolygonObstacles from a group of SKNode's physics bodies in scene space.
        See Also:
        GKObstacleGraph
      • obstaclesFromSpriteTexturesAccuracy

        @NotNull
        public static @NotNull NSArray<? extends GKPolygonObstacle> obstaclesFromSpriteTexturesAccuracy​(@NotNull
                                                                                                        @NotNull NSArray<? extends SKNode> sprites,
                                                                                                        float accuracy)
        Returns an array of GKPolygonObstacles from a group of SKSpriteNode's textures in scene space.
        See Also:
        GKObstacleGraph
      • 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)
      • superclass_static

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

        public static long version_static()
      • actionForKey

        @Nullable
        public @Nullable SKAction actionForKey​(@NotNull
                                               @NotNull java.lang.String key)
      • addChild

        public void addChild​(@NotNull
                             @NotNull SKNode node)
        Adds a node as a child node of this node The added node must not have a parent.
        Parameters:
        node - the child node to add.
      • alpha

        public double alpha()
        Alpha of this node (multiplied by the output color to give the final result)
      • calculateAccumulatedFrame

        public CGRect calculateAccumulatedFrame()
        Calculates the bounding box including all child nodes in parents coordinate system.
      • canBecomeFocused

        public boolean canBecomeFocused()
        Description copied from interface: UIFocusItem
        Indicates whether or not this item is currently allowed to become focused. Returning NO restricts the item from being focusable, even if it is visible in the user interface. For example, UIControls return NO if they are disabled.
        Specified by:
        canBecomeFocused in interface UIFocusItem
      • childNodeWithName

        @Nullable
        public @Nullable SKNode childNodeWithName​(@NotNull
                                                  @NotNull java.lang.String name)
      • children

        @NotNull
        public @NotNull NSArray<? extends SKNode> children()
        The children of this node.
      • constraints

        @Nullable
        public @Nullable NSArray<? extends SKConstraint> constraints()
        Optional array of SKConstraints Constraints are evaluated each frame after actions and physics. The node's transform will be changed to satisfy the constraint.
      • containsPoint

        public boolean containsPoint​(CGPoint p)
      • convertPointFromNode

        public CGPoint convertPointFromNode​(CGPoint point,
                                            @NotNull
                                            @NotNull SKNode node)
      • convertPointToNode

        public CGPoint convertPointToNode​(CGPoint point,
                                          @NotNull
                                          @NotNull SKNode node)
      • copyWithZone

        @NotNull
        public @NotNull java.lang.Object copyWithZone​(@Nullable
                                                      @Nullable org.moe.natj.general.ptr.VoidPtr zone)
        Specified by:
        copyWithZone in interface NSCopying
      • entity

        @Nullable
        public @Nullable GKEntity entity()
        The GKEntity associated with the node via a GKSKNodeComponent.
        See Also:
        API-Since: 10.0
      • frame

        public CGRect frame()
        Description copied from interface: UIFocusItem
        The geometric frame of this item, represented in the `coordinateSpace` of the UIFocusItemContainer in which it is contained. API-Since: 12.0
        Specified by:
        frame in interface UIFocusItem
      • hasActions

        public boolean hasActions()
      • inParentHierarchy

        public boolean inParentHierarchy​(@NotNull
                                         @NotNull SKNode parent)
        Returns true if the specified parent is in this node's chain of parents
      • insertChildAtIndex

        public void insertChildAtIndex​(@NotNull
                                       @NotNull SKNode node,
                                       long index)
      • intersectsNode

        public boolean intersectsNode​(@NotNull
                                      @NotNull SKNode node)
        Returns true if the bounds of this node intersects with the transformed bounds of the other node, otherwise false
      • isEqualToNode

        public boolean isEqualToNode​(@NotNull
                                     @NotNull SKNode node)
        Returns true if this node has equivalent content to the other object, otherwise false
      • isHidden

        public boolean isHidden()
        Controls whether or not the node and its children are rendered.
      • setHidden

        public void setHidden​(boolean value)
        Controls whether or not the node and its children are rendered.
      • isPaused

        public boolean isPaused()
        Controls whether or not the node's actions is updated or paused.
      • setPaused

        public void setPaused​(boolean value)
        Controls whether or not the node's actions is updated or paused.
      • isUserInteractionEnabled

        public boolean isUserInteractionEnabled()
        Controls whether or not the node receives touch events
      • setUserInteractionEnabled

        public void setUserInteractionEnabled​(boolean value)
        Controls whether or not the node receives touch events
      • moveToParent

        public void moveToParent​(@NotNull
                                 @NotNull SKNode parent)
        API-Since: 9.0
      • name

        @Nullable
        public @Nullable java.lang.String name()
        The client assignable name. In general, this should be unique among peers in the scene graph.
      • nodeAtPoint

        @NotNull
        public @NotNull SKNode nodeAtPoint​(CGPoint p)
        Returns the node itself or a child node at the point given. If the receiver is returned there is no child node at the given point.
        Returns:
        a child node or self at the given location.
      • objectForKeyedSubscript

        @NotNull
        public @NotNull NSArray<? extends SKNode> objectForKeyedSubscript​(@NotNull
                                                                          @NotNull java.lang.String name)
        Simplified shorthand for enumerateChildNodesWithName that returns an array of the matching nodes. This allows subscripting of the form: NSArray *childrenMatchingName = node[@"name"] or even complex like: NSArray *siblingsBeginningWithA = node[@"../a*"]
        Parameters:
        name - An Xpath style path that can include simple regular expressions for matching node names.
      • parent

        @Nullable
        public @Nullable SKNode parent()
        The parent of the node. If this is nil the node has not been added to another group and is thus the root node of its own graph.
      • physicsBody

        @Nullable
        public @Nullable SKPhysicsBody physicsBody()
        Physics body attached to the node, with synchronized scale, rotation, and position
      • position

        public CGPoint position()
        The position of the node in the parent's coordinate system
      • preferredFocusEnvironments

        @NotNull
        public @NotNull NSArray<?> preferredFocusEnvironments()
        Description copied from interface: UIFocusEnvironment
        The preferred focus environments define where to search for the default focused item in an environment, such as when focus updates programmatically. Starting from the target environment, each preferred focus environment is recursively searched in the order of the array until an eligible, focusable item is found. Preferred focus environments can include focusable and non-focusable items, in addition to non-item environments. Returning an empty array is equivalent to returning an array containing only 'self'.
        Specified by:
        preferredFocusEnvironments in interface UIFocusEnvironment
      • reachConstraints

        @Nullable
        public @Nullable SKReachConstraints reachConstraints()
        Kinematic constraints, used in IK solving
      • removeActionForKey

        public void removeActionForKey​(@NotNull
                                       @NotNull java.lang.String key)
      • removeAllActions

        public void removeAllActions()
      • removeAllChildren

        public void removeAllChildren()
      • removeChildrenInArray

        public void removeChildrenInArray​(@NotNull
                                          @NotNull NSArray<? extends SKNode> nodes)
      • removeFromParent

        public void removeFromParent()
      • runAction

        public void runAction​(@NotNull
                              @NotNull SKAction action)
      • runActionWithKey

        public void runActionWithKey​(@NotNull
                                     @NotNull SKAction action,
                                     @NotNull
                                     @NotNull java.lang.String key)
      • scene

        @Nullable
        public @Nullable SKScene scene()
        The scene that the node is currently in.
      • setAlpha

        public void setAlpha​(double value)
        Alpha of this node (multiplied by the output color to give the final result)
      • setConstraints

        public void setConstraints​(@Nullable
                                   @Nullable NSArray<? extends SKConstraint> value)
        Optional array of SKConstraints Constraints are evaluated each frame after actions and physics. The node's transform will be changed to satisfy the constraint.
      • setEntity_unsafe

        public void setEntity_unsafe​(@Nullable
                                     @Nullable GKEntity value)
        The GKEntity associated with the node via a GKSKNodeComponent.
        See Also:
        API-Since: 10.0
      • setEntity

        public void setEntity​(@Nullable
                              @Nullable GKEntity value)
        The GKEntity associated with the node via a GKSKNodeComponent.
        See Also:
        API-Since: 10.0
      • setName

        public void setName​(@Nullable
                            @Nullable java.lang.String value)
        The client assignable name. In general, this should be unique among peers in the scene graph.
      • setNeedsFocusUpdate

        public void setNeedsFocusUpdate()
        Description copied from interface: UIFocusEnvironment
        Marks this environment as needing a focus update, which if accepted will attempt to reset focus to this environment, or one of its preferred focus environments, on the next update cycle. If this environment does not currently contain the focused item, then calling this method has no effect. If a parent of this environment is also requesting focus, then this environment's request is rejected in favor of the parent's. NOTE: If you provide your own implementation, it must call `[[UIFocusSystem focusSystemForEnvironment:self] requestFocusUpdateToEnvironment:self]`;
        Specified by:
        setNeedsFocusUpdate in interface UIFocusEnvironment
      • setPhysicsBody

        public void setPhysicsBody​(@Nullable
                                   @Nullable SKPhysicsBody value)
        Physics body attached to the node, with synchronized scale, rotation, and position
      • setPosition

        public void setPosition​(CGPoint value)
        The position of the node in the parent's coordinate system
      • setReachConstraints

        public void setReachConstraints​(@Nullable
                                        @Nullable SKReachConstraints value)
        Kinematic constraints, used in IK solving
      • setScale

        public void setScale​(double scale)
        Sets both the x & y scale
        Parameters:
        scale - the uniform scale to set.
      • setSpeed

        public void setSpeed​(double value)
        The speed multiplier applied to all actions run on this node. Inherited by its children.
      • setUserData

        public void setUserData​(@Nullable
                                @Nullable NSMutableDictionary<?,​?> value)
        An optional dictionary that can be used to store your own data in a node. Defaults to nil.
      • setXScale

        public void setXScale​(double value)
        The scaling in the X axis
      • setYScale

        public void setYScale​(double value)
        The scaling in the Y axis
      • setZPosition

        public void setZPosition​(double value)
        The z-order of the node (used for ordering). Negative z is "into" the screen, Positive z is "out" of the screen. A greater zPosition will sort in front of a lesser zPosition.
      • setZRotation

        public void setZRotation​(double value)
        The Euler rotation about the z axis (in radians)
      • speed

        public double speed()
        The speed multiplier applied to all actions run on this node. Inherited by its children.
      • updateFocusIfNeeded

        public void updateFocusIfNeeded()
        Description copied from interface: UIFocusEnvironment
        Forces focus to be updated immediately. If there is an environment that has requested a focus update via -setNeedsFocusUpdate, and the request was accepted, then focus will be updated to that environment or one of its preferred focus environments. NOTE: If you provide your own implementation, it must call `[[UIFocusSystem focusSystemForEnvironment:self] updateFocusIfNeeded];`.
        Specified by:
        updateFocusIfNeeded in interface UIFocusEnvironment
      • userData

        @Nullable
        public @Nullable NSMutableDictionary<?,​?> userData()
        An optional dictionary that can be used to store your own data in a node. Defaults to nil.
      • xScale

        public double xScale()
        The scaling in the X axis
      • yScale

        public double yScale()
        The scaling in the Y axis
      • zPosition

        public double zPosition()
        The z-order of the node (used for ordering). Negative z is "into" the screen, Positive z is "out" of the screen. A greater zPosition will sort in front of a lesser zPosition.
      • zRotation

        public double zRotation()
        The Euler rotation about the z axis (in radians)
      • attributeValues

        @NotNull
        @Deprecated
        public @NotNull NSDictionary<java.lang.String,​? extends SKAttributeValue> attributeValues()
        Deprecated.
        Optional dictionary of SKAttributeValues Attributes can be used with custom SKShaders. DEPRECATED: Attributes are only available for node classes supporting SKShader (see SKSpriteNode etc.). API-Since: 10.0 Deprecated-Since: 10.0
      • focusBehavior

        public long focusBehavior()
        Determines how this node participates in the focus system. The default is SKNodeFocusBehaviorNone. API-Since: 11.0
      • setAttributeValues

        @Deprecated
        public void setAttributeValues​(@NotNull
                                       @NotNull NSDictionary<java.lang.String,​? extends SKAttributeValue> value)
        Deprecated.
        Optional dictionary of SKAttributeValues Attributes can be used with custom SKShaders. DEPRECATED: Attributes are only available for node classes supporting SKShader (see SKSpriteNode etc.). API-Since: 10.0 Deprecated-Since: 10.0
      • setFocusBehavior

        public void setFocusBehavior​(long value)
        Determines how this node participates in the focus system. The default is SKNodeFocusBehaviorNone. API-Since: 11.0
      • setValueForAttributeNamed

        @Deprecated
        public void setValueForAttributeNamed​(@NotNull
                                              @NotNull SKAttributeValue value,
                                              @NotNull
                                              @NotNull java.lang.String key)
        Deprecated.
        API-Since: 10.0 Deprecated-Since: 10.0
      • valueForAttributeNamed

        @Nullable
        @Deprecated
        public @Nullable SKAttributeValue valueForAttributeNamed​(@NotNull
                                                                 @NotNull java.lang.String key)
        Deprecated.
        API-Since: 10.0 Deprecated-Since: 10.0
      • didHintFocusMovement

        public void didHintFocusMovement​(@NotNull
                                         @NotNull UIFocusMovementHint hint)
        Description copied from interface: UIFocusItem
        Called whenever this focus item is hinting to the user a focus movement might occur. The provided object is mutated by the focus engine whenever the user's finger moves. API-Since: 12.0
        Specified by:
        didHintFocusMovement in interface UIFocusItem
      • nodeWithFileNamedSecurelyWithClassesAndError

        public static SKNode nodeWithFileNamedSecurelyWithClassesAndError​(@NotNull
                                                                          @NotNull java.lang.String filename,
                                                                          @NotNull
                                                                          @NotNull NSSet<? extends org.moe.natj.objc.Class> classes,
                                                                          @Nullable
                                                                          @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        API-Since: 12.0
      • parentFocusEnvironment

        @Nullable
        public @Nullable UIFocusEnvironment parentFocusEnvironment()
        Description copied from interface: UIFocusEnvironment
        The parent focus environment of this environment, or nil if no parent exists. NOTE: If you implement this method, you must return a non-nil value for parent focus environment, otherwise your focus environment will not participate in focus interactions. API-Since: 12.0
        Specified by:
        parentFocusEnvironment in interface UIFocusEnvironment
      • supportsSecureCoding

        public static boolean supportsSecureCoding()
      • _supportsSecureCoding

        public boolean _supportsSecureCoding()
        Description copied from interface: NSSecureCoding
        This property must return YES on all classes that allow secure coding. Subclasses of classes that adopt NSSecureCoding and override initWithCoder: must also override this method and return YES. The Secure Coding Guide should be consulted when writing methods that decode data.
        Specified by:
        _supportsSecureCoding in interface NSSecureCoding
      • focusGroupIdentifier

        @Nullable
        public @Nullable java.lang.String focusGroupIdentifier()
        Description copied from interface: UIFocusEnvironment
        The identifier of the focus group that this view belongs to. If this is nil, subviews inherit their superview's focus group. API-Since: 14.0
        Specified by:
        focusGroupIdentifier in interface UIFocusEnvironment
      • focusEffect

        @Nullable
        public @Nullable UIFocusEffect focusEffect()
        Description copied from interface: UIFocusItem
        Describes a visual effect to apply when this item is focused. When not implemented, the system may create a default effect for this item. Returning nil indicates that the system should not apply any visual effects, and that the app will handle applying the appropriate visuals. API-Since: 15.0
        Specified by:
        focusEffect in interface UIFocusItem
      • focusGroupPriority

        public long focusGroupPriority()
        Description copied from interface: UIFocusItem
        The priority this item has in its focus group. The higher the priority, the more likely it is to get picked when focus moves into this group. Note: this method can only be used to increase an item's priority, not decrease it. For example if an item is currently selected, the actual priority of this item will be determined by MAX(focusGroupPriority, UIFocusGroupPrioritySelected). API-Since: 15.0
        Specified by:
        focusGroupPriority in interface UIFocusItem
      • isTransparentFocusItem

        public boolean isTransparentFocusItem()
        Description copied from interface: UIFocusItem
        If this returns YES, the focus item is considered transparent in terms of occlusion. Items that are behind it are focusable. This value is ignored when the item is focusable, in which case the item is never considered transparent. API-Since: 15.0
        Specified by:
        isTransparentFocusItem in interface UIFocusItem
      • useStoredAccessor

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.