Package apple.spritekit
Class SKNode
- java.lang.Object
-
- org.moe.natj.general.NativeObject
-
- org.moe.natj.objc.ObjCObject
-
- apple.NSObject
-
- apple.uikit.UIResponder
-
- apple.spritekit.SKNode
-
- All Implemented Interfaces:
NSCoding,NSCopying,NSSecureCoding,NSObject,UIFocusEnvironment,UIFocusItem,UIPasteConfigurationSupporting,UIResponderStandardEditActions,UIUserActivityRestoring
- Direct Known Subclasses:
SK3DNode,SKAudioNode,SKCameraNode,SKCropNode,SKEffectNode,SKEmitterNode,SKFieldNode,SKLabelNode,SKLightNode,SKReferenceNode,SKShapeNode,SKSpriteNode,SKTileMapNode,SKTransformNode,SKVideoNode
public class SKNode extends UIResponder implements NSCopying, NSSecureCoding, UIFocusItem
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceSKNode.Block_enumerateChildNodesWithNameUsingBlockstatic interfaceSKNode.Block_runActionCompletion-
Nested classes/interfaces inherited from class apple.NSObject
NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret
-
Nested classes/interfaces inherited from interface apple.uikit.protocol.UIResponderStandardEditActions
UIResponderStandardEditActions.Block_updateTextAttributesWithConversionHandler
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSKNode(org.moe.natj.general.Pointer peer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean_supportsSecureCoding()This property must return YES on all classes that allow secure coding.static booleanaccessInstanceVariablesDirectly()SKActionactionForKey(java.lang.String key)voidaddChild(SKNode node)Adds a node as a child node of this node The added node must not have a parent.static SKNodealloc()static java.lang.ObjectallocWithZone(org.moe.natj.general.ptr.VoidPtr zone)doublealpha()Alpha of this node (multiplied by the output color to give the final result)NSDictionary<java.lang.String,? extends SKAttributeValue>attributeValues()Optional dictionary of SKAttributeValues Attributes can be used with custom SKShaders.static booleanautomaticallyNotifiesObserversForKey(java.lang.String key)CGRectcalculateAccumulatedFrame()Calculates the bounding box including all child nodes in parents coordinate system.booleancanBecomeFocused()Indicates whether or not this item is currently allowed to become focused.static voidcancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)static voidcancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget, org.moe.natj.objc.SEL aSelector, java.lang.Object anArgument)SKNodechildNodeWithName(java.lang.String name)NSArray<? extends SKNode>children()The children of this node.static NSArray<java.lang.String>classFallbacksForKeyedArchiver()static org.moe.natj.objc.ClassclassForKeyedUnarchiver()static voidclearTextInputContextIdentifier(java.lang.String identifier)NSArray<? extends SKConstraint>constraints()Optional array of SKConstraints Constraints are evaluated each frame after actions and physics.booleancontainsPoint(CGPoint p)CGPointconvertPointFromNode(CGPoint point, SKNode node)CGPointconvertPointToNode(CGPoint point, SKNode node)java.lang.ObjectcopyWithZone(org.moe.natj.general.ptr.VoidPtr zone)static java.lang.StringdebugDescription_static()static java.lang.Stringdescription_static()voiddidHintFocusMovement(UIFocusMovementHint hint)Called whenever this focus item is hinting to the user a focus movement might occur.voiddidUpdateFocusInContextWithAnimationCoordinator(UIFocusUpdateContext context, UIFocusAnimationCoordinator coordinator)Called when the screen’s focused item has been updated to a new item.voidencodeWithCoder(NSCoder coder)GKEntityentity()The GKEntity associated with the node via a GKSKNodeComponent.voidenumerateChildNodesWithNameUsingBlock(java.lang.String name, SKNode.Block_enumerateChildNodesWithNameUsingBlock block)longfocusBehavior()Determines how this node participates in the focus system.java.lang.StringfocusGroupIdentifier()The identifier of the focus group that this view belongs to.UIFocusItemContainerfocusItemContainer()The container of any child focus items in this focus environment, or nil if no container exists.CGRectframe()The geometric frame of this item, represented in the `coordinateSpace` of the UIFocusItemContainer in which it is contained.booleanhasActions()static longhash_static()SKNodeinit()SKNodeinitWithCoder(NSCoder aDecoder)NS_DESIGNATED_INITIALIZERbooleaninParentHierarchy(SKNode parent)Returns true if the specified parent is in this node's chain of parentsvoidinsertChildAtIndex(SKNode node, long index)static NSObject.Function_instanceMethodForSelector_retinstanceMethodForSelector(org.moe.natj.objc.SEL aSelector)static NSMethodSignatureinstanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)static booleaninstancesRespondToSelector(org.moe.natj.objc.SEL aSelector)booleanintersectsNode(SKNode node)Returns true if the bounds of this node intersects with the transformed bounds of the other node, otherwise falsebooleanisEqualToNode(SKNode node)Returns true if this node has equivalent content to the other object, otherwise falsebooleanisHidden()Controls whether or not the node and its children are rendered.booleanisPaused()Controls whether or not the node's actions is updated or paused.static booleanisSubclassOfClass(org.moe.natj.objc.Class aClass)booleanisUserInteractionEnabled()Controls whether or not the node receives touch eventsstatic NSSet<java.lang.String>keyPathsForValuesAffectingValueForKey(java.lang.String key)voidmoveToParent(SKNode parent)java.lang.Stringname()The client assignable name.static java.lang.Objectnew_objc()static SKNodenode()SKNodenodeAtPoint(CGPoint p)Returns the node itself or a child node at the point given.NSArray<? extends SKNode>nodesAtPoint(CGPoint p)static SKNodenodeWithFileNamed(java.lang.String filename)static SKNodenodeWithFileNamedSecurelyWithClassesAndError(java.lang.String filename, NSSet<? extends org.moe.natj.objc.Class> classes, org.moe.natj.general.ptr.Ptr<NSError> error)NSArray<? extends SKNode>objectForKeyedSubscript(java.lang.String name)Simplified shorthand for enumerateChildNodesWithName that returns an array of the matching nodes.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.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.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.SKNodeparent()The parent of the node.UIFocusEnvironmentparentFocusEnvironment()The parent focus environment of this environment, or nil if no parent exists.SKPhysicsBodyphysicsBody()Physics body attached to the node, with synchronized scale, rotation, and positionCGPointposition()The position of the node in the parent's coordinate systemUIViewpreferredFocusedView()NSArray<?>preferredFocusEnvironments()The preferred focus environments define where to search for the default focused item in an environment, such as when focus updates programmatically.SKReachConstraintsreachConstraints()Kinematic constraints, used in IK solvingvoidremoveActionForKey(java.lang.String key)voidremoveAllActions()voidremoveAllChildren()voidremoveChildrenInArray(NSArray<? extends SKNode> nodes)voidremoveFromParent()static booleanresolveClassMethod(org.moe.natj.objc.SEL sel)static booleanresolveInstanceMethod(org.moe.natj.objc.SEL sel)voidrunAction(SKAction action)voidrunActionCompletion(SKAction action, SKNode.Block_runActionCompletion block)voidrunActionWithKey(SKAction action, java.lang.String key)SKScenescene()The scene that the node is currently in.voidsetAlpha(double value)Alpha of this node (multiplied by the output color to give the final result)voidsetAttributeValues(NSDictionary<java.lang.String,? extends SKAttributeValue> value)Optional dictionary of SKAttributeValues Attributes can be used with custom SKShaders.voidsetConstraints(NSArray<? extends SKConstraint> value)Optional array of SKConstraints Constraints are evaluated each frame after actions and physics.voidsetEntity(GKEntity value)The GKEntity associated with the node via a GKSKNodeComponent.voidsetEntity_unsafe(GKEntity value)The GKEntity associated with the node via a GKSKNodeComponent.voidsetFocusBehavior(long value)Determines how this node participates in the focus system.voidsetHidden(boolean value)Controls whether or not the node and its children are rendered.voidsetName(java.lang.String value)The client assignable name.voidsetNeedsFocusUpdate()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.voidsetPaused(boolean value)Controls whether or not the node's actions is updated or paused.voidsetPhysicsBody(SKPhysicsBody value)Physics body attached to the node, with synchronized scale, rotation, and positionvoidsetPosition(CGPoint value)The position of the node in the parent's coordinate systemvoidsetReachConstraints(SKReachConstraints value)Kinematic constraints, used in IK solvingvoidsetScale(double scale)Sets both the x & y scalevoidsetSpeed(double value)The speed multiplier applied to all actions run on this node.voidsetUserData(NSMutableDictionary<?,?> value)An optional dictionary that can be used to store your own data in a node.voidsetUserInteractionEnabled(boolean value)Controls whether or not the node receives touch eventsvoidsetValueForAttributeNamed(SKAttributeValue value, java.lang.String key)static voidsetVersion_static(long aVersion)voidsetXScale(double value)The scaling in the X axisvoidsetYScale(double value)The scaling in the Y axisvoidsetZPosition(double value)The z-order of the node (used for ordering).voidsetZRotation(double value)The Euler rotation about the z axis (in radians)booleanshouldUpdateFocusInContext(UIFocusUpdateContext context)Asks whether the system should allow a focus update to occur.doublespeed()The speed multiplier applied to all actions run on this node.static org.moe.natj.objc.Classsuperclass_static()static booleansupportsSecureCoding()voidupdateFocusIfNeeded()Forces focus to be updated immediately.NSMutableDictionary<?,?>userData()An optional dictionary that can be used to store your own data in a node.SKAttributeValuevalueForAttributeNamed(java.lang.String key)static longversion_static()doublexScale()The scaling in the X axisdoubleyScale()The scaling in the Y axisdoublezPosition()The z-order of the node (used for ordering).doublezRotation()The Euler rotation about the z axis (in radians)-
Methods inherited from class apple.uikit.UIResponder
activityItemsConfiguration, becomeFirstResponder, buildMenuWithBuilder, canBecomeFirstResponder, canPasteItemProviders, canPerformActionWithSender, canResignFirstResponder, copy, cut, decreaseSize, delete, editingInteractionConfiguration, increaseSize, inputAccessoryView, inputAccessoryViewController, inputAssistantItem, inputView, inputViewController, isFirstResponder, keyCommands, makeTextWritingDirectionLeftToRight, makeTextWritingDirectionRightToLeft, motionBeganWithEvent, motionCancelledWithEvent, motionEndedWithEvent, nextResponder, paste, pasteConfiguration, pasteItemProviders, pressesBeganWithEvent, pressesCancelledWithEvent, pressesChangedWithEvent, pressesEndedWithEvent, reloadInputViews, remoteControlReceivedWithEvent, resignFirstResponder, restoreUserActivityState, select, selectAll, setActivityItemsConfiguration, setPasteConfiguration, setUserActivity, targetForActionWithSender, textInputContextIdentifier, textInputMode, toggleBoldface, toggleItalics, toggleUnderline, touchesBeganWithEvent, touchesCancelledWithEvent, touchesEndedWithEvent, touchesEstimatedPropertiesUpdated, touchesMovedWithEvent, undoManager, updateTextAttributesWithConversionHandler, updateUserActivityState, userActivity, validateCommand
-
Methods inherited from class apple.NSObject
accessibilityActivate, accessibilityActivationPoint, accessibilityAssistiveTechnologyFocusedIdentifiers, accessibilityAttributedHint, accessibilityAttributedLabel, accessibilityAttributedUserInputLabels, accessibilityAttributedValue, accessibilityContainerType, accessibilityCustomActions, accessibilityCustomRotors, accessibilityDecrement, accessibilityDragSourceDescriptors, accessibilityDropPointDescriptors, accessibilityElementAtIndex, accessibilityElementCount, accessibilityElementDidBecomeFocused, accessibilityElementDidLoseFocus, accessibilityElementIsFocused, accessibilityElements, accessibilityElementsHidden, accessibilityFrame, accessibilityHint, accessibilityIncrement, accessibilityLabel, accessibilityLanguage, accessibilityNavigationStyle, accessibilityPath, accessibilityPerformEscape, accessibilityPerformMagicTap, accessibilityRespondsToUserInteraction, accessibilityScroll, accessibilityTextualContext, accessibilityTraits, accessibilityUserInputLabels, accessibilityValue, accessibilityViewIsModal, addObserverForKeyPathOptionsContext, attemptRecoveryFromErrorOptionIndex, attemptRecoveryFromErrorOptionIndexDelegateDidRecoverSelectorContextInfo, autoContentAccessingProxy, awakeAfterUsingCoder, awakeFromNib, class_objc, classForCoder, classForKeyedArchiver, copy, dealloc, debugDescription, description, dictionaryWithValuesForKeys, didChangeValueForKey, didChangeValueForKeyWithSetMutationUsingObjects, didChangeValuesAtIndexesForKey, doesNotRecognizeSelector, fileManagerShouldProceedAfterError, fileManagerWillProcessPath, finalize_objc, forwardingTargetForSelector, forwardInvocation, hash, indexOfAccessibilityElement, isAccessibilityElement, isEqual, isKindOfClass, isMemberOfClass, isProxy, methodForSelector, methodSignatureForSelector, mutableArrayValueForKey, mutableArrayValueForKeyPath, mutableCopy, mutableOrderedSetValueForKey, mutableOrderedSetValueForKeyPath, mutableSetValueForKey, mutableSetValueForKeyPath, observationInfo, observeValueForKeyPathOfObjectChangeContext, performSelector, performSelectorInBackgroundWithObject, performSelectorOnMainThreadWithObjectWaitUntilDone, performSelectorOnMainThreadWithObjectWaitUntilDoneModes, performSelectorOnThreadWithObjectWaitUntilDone, performSelectorOnThreadWithObjectWaitUntilDoneModes, performSelectorWithObject, performSelectorWithObjectAfterDelay, performSelectorWithObjectAfterDelayInModes, performSelectorWithObjectWithObject, prepareForInterfaceBuilder, provideImageDataBytesPerRowOrigin_Size_UserInfo, removeObserverForKeyPath, removeObserverForKeyPathContext, replacementObjectForCoder, replacementObjectForKeyedArchiver, respondsToSelector, self, setAccessibilityActivationPoint, setAccessibilityAttributedHint, setAccessibilityAttributedLabel, setAccessibilityAttributedUserInputLabels, setAccessibilityAttributedValue, setAccessibilityContainerType, setAccessibilityCustomActions, setAccessibilityCustomRotors, setAccessibilityDragSourceDescriptors, setAccessibilityDropPointDescriptors, setAccessibilityElements, setAccessibilityElementsHidden, setAccessibilityFrame, setAccessibilityHint, setAccessibilityLabel, setAccessibilityLanguage, setAccessibilityNavigationStyle, setAccessibilityPath, setAccessibilityRespondsToUserInteraction, setAccessibilityTextualContext, setAccessibilityTraits, setAccessibilityUserInputLabels, setAccessibilityValue, setAccessibilityViewIsModal, setIsAccessibilityElement, setNilValueForKey, setObservationInfo, setShouldGroupAccessibilityChildren, setValueForKey, setValueForKeyPath, setValueForUndefinedKey, setValuesForKeysWithDictionary, shouldGroupAccessibilityChildren, superclass, validateValueForKeyError, validateValueForKeyPathError, valueForKey, valueForKeyPath, valueForUndefinedKey, willChangeValueForKey, willChangeValueForKeyWithSetMutationUsingObjects, willChangeValuesAtIndexesForKey
-
-
-
-
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()
-
instanceMethodForSelector
public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
-
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:UIFocusItemIndicates 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:
canBecomeFocusedin interfaceUIFocusItem
-
childNodeWithName
public SKNode childNodeWithName(java.lang.String name)
-
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:
copyWithZonein interfaceNSCopying
-
didUpdateFocusInContextWithAnimationCoordinator
public void didUpdateFocusInContextWithAnimationCoordinator(UIFocusUpdateContext context, UIFocusAnimationCoordinator coordinator)
Description copied from interface:UIFocusEnvironmentCalled when the screen’s focused item has been updated to a new item. Use the animation coordinator to schedule focus-related animations in response to the update.- Specified by:
didUpdateFocusInContextWithAnimationCoordinatorin interfaceUIFocusEnvironment
-
encodeWithCoder
public void encodeWithCoder(NSCoder coder)
- Specified by:
encodeWithCoderin interfaceNSCoding
-
entity
public GKEntity entity()
The GKEntity associated with the node via a GKSKNodeComponent.- See Also:
GKEntity
-
enumerateChildNodesWithNameUsingBlock
public void enumerateChildNodesWithNameUsingBlock(java.lang.String name, SKNode.Block_enumerateChildNodesWithNameUsingBlock block)
-
frame
public CGRect frame()
Description copied from interface:UIFocusItemThe geometric frame of this item, represented in the `coordinateSpace` of the UIFocusItemContainer in which it is contained.- Specified by:
framein interfaceUIFocusItem
-
hasActions
public boolean hasActions()
-
inParentHierarchy
public boolean inParentHierarchy(SKNode parent)
Returns true if the specified parent is in this node's chain of parents
-
init
public SKNode init()
- Overrides:
initin classUIResponder
-
initWithCoder
public SKNode initWithCoder(NSCoder aDecoder)
Description copied from interface:NSCodingNS_DESIGNATED_INITIALIZER- Specified by:
initWithCoderin interfaceNSCoding
-
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:UIFocusEnvironmentThe 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:
preferredFocusEnvironmentsin interfaceUIFocusEnvironment
-
preferredFocusedView
public UIView preferredFocusedView()
- Specified by:
preferredFocusedViewin interfaceUIFocusEnvironment
-
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()
-
removeFromParent
public void removeFromParent()
-
runAction
public void runAction(SKAction action)
-
runActionCompletion
public void runActionCompletion(SKAction action, SKNode.Block_runActionCompletion block)
-
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:UIFocusEnvironmentMarks 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:
setNeedsFocusUpdatein interfaceUIFocusEnvironment
-
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)
-
shouldUpdateFocusInContext
public boolean shouldUpdateFocusInContext(UIFocusUpdateContext context)
Description copied from interface:UIFocusEnvironmentAsks whether the system should allow a focus update to occur.- Specified by:
shouldUpdateFocusInContextin interfaceUIFocusEnvironment
-
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:UIFocusEnvironmentForces 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:
updateFocusIfNeededin interfaceUIFocusEnvironment
-
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:UIFocusItemCalled 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:
didHintFocusMovementin interfaceUIFocusItem
-
focusItemContainer
public UIFocusItemContainer focusItemContainer()
Description copied from interface:UIFocusEnvironmentThe container of any child focus items in this focus environment, or nil if no container exists.- Specified by:
focusItemContainerin interfaceUIFocusEnvironment
-
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:UIFocusEnvironmentThe 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:
parentFocusEnvironmentin interfaceUIFocusEnvironment
-
supportsSecureCoding
public static boolean supportsSecureCoding()
-
_supportsSecureCoding
public boolean _supportsSecureCoding()
Description copied from interface:NSSecureCodingThis 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:
_supportsSecureCodingin interfaceNSSecureCoding
-
focusGroupIdentifier
public java.lang.String focusGroupIdentifier()
Description copied from interface:UIFocusEnvironmentThe identifier of the focus group that this view belongs to. If this is nil, subviews inherit their superview's focus group.- Specified by:
focusGroupIdentifierin interfaceUIFocusEnvironment
-
-