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 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()
      • clearTextInputContextIdentifier

        public static void clearTextInputContextIdentifier​(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

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

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

        public static SKNode node()
      • nodeWithFileNamed

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

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

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

        public static NSArray<? extends GKPolygonObstacle> obstaclesFromSpriteTexturesAccuracy​(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

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

        public void addChild​(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

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

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

        public 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)
      • copyWithZone

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

        public GKEntity entity()
        The GKEntity associated with the node via a GKSKNodeComponent.
        See Also:
        GKEntity
      • 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.
        Specified by:
        frame in interface UIFocusItem
      • hasActions

        public boolean hasActions()
      • inParentHierarchy

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

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

        public boolean intersectsNode​(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​(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​(SKNode parent)
      • name

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

        public 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

        public NSArray<? extends SKNode> objectForKeyedSubscript​(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

        public 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

        public 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

        public 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

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

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

        public void removeAllActions()
      • removeAllChildren

        public void removeAllChildren()
      • removeChildrenInArray

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

        public void removeFromParent()
      • runAction

        public void runAction​(SKAction action)
      • runActionWithKey

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

        public 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​(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​(GKEntity value)
        The GKEntity associated with the node via a GKSKNodeComponent.
        See Also:
        GKEntity
      • setEntity

        public void setEntity​(GKEntity value)
        The GKEntity associated with the node via a GKSKNodeComponent.
        See Also:
        GKEntity
      • setName

        public void setName​(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​(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​(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​(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

        public 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

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

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

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

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

        public void setValueForAttributeNamed​(SKAttributeValue value,
                                              java.lang.String key)
      • valueForAttributeNamed

        public SKAttributeValue valueForAttributeNamed​(java.lang.String key)
      • didHintFocusMovement

        public void didHintFocusMovement​(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.
        Specified by:
        didHintFocusMovement in interface UIFocusItem
      • nodeWithFileNamedSecurelyWithClassesAndError

        public static SKNode nodeWithFileNamedSecurelyWithClassesAndError​(java.lang.String filename,
                                                                          NSSet<? extends org.moe.natj.objc.Class> classes,
                                                                          org.moe.natj.general.ptr.Ptr<NSError> error)
      • parentFocusEnvironment

        public 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.
        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

        public 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.
        Specified by:
        focusGroupIdentifier in interface UIFocusEnvironment