Package org.robovm.apple.spritekit
Class SKNode
- java.lang.Object
-
- org.robovm.rt.bro.NativeObject
-
- org.robovm.objc.ObjCObject
-
- org.robovm.apple.foundation.NSObject
-
- org.robovm.apple.uikit.UIResponder
-
- org.robovm.apple.spritekit.SKNode
-
- All Implemented Interfaces:
NSCoding
,NSObjectProtocol
,NSSecureCoding
,UIAccessibility
,UIFocusEnvironment
,UIFocusItem
,org.robovm.objc.ObjCProtocol
- Direct Known Subclasses:
SK3DNode
,SKAudioNode
,SKCameraNode
,SKCropNode
,SKEffectNode
,SKEmitterNode
,SKFieldNode
,SKLabelNode
,SKLightNode
,SKReferenceNode
,SKShapeNode
,SKSpriteNode
,SKTileMapNode
,SKTransformNode
,SKVideoNode
public class SKNode extends UIResponder implements NSSecureCoding, UIFocusItem
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SKNode.SKNodePtr
-
Nested classes/interfaces inherited from class org.robovm.apple.uikit.UIResponder
UIResponder.UIResponderPtr
-
Nested classes/interfaces inherited from class org.robovm.apple.foundation.NSObject
NSObject.Handle, NSObject.Marshaler, NSObject.NoRetainMarshaler, NSObject.NSKeyValueObserver, NSObject.NSObjectPtr, NSObject.SkipInit
-
Nested classes/interfaces inherited from class org.robovm.objc.ObjCObject
org.robovm.objc.ObjCObject.ObjCObjectPtr, org.robovm.objc.ObjCObject.Super
-
Nested classes/interfaces inherited from interface org.robovm.apple.uikit.UIAccessibility
UIAccessibility.Notifications
-
-
Field Summary
-
Fields inherited from class org.robovm.apple.foundation.NSObject
FLAG_NO_RETAIN
-
-
Constructor Summary
Constructors Modifier Constructor Description SKNode()
protected
SKNode(long handle)
Deprecated.SKNode(java.io.File file)
SKNode(java.lang.String filename)
SKNode(java.lang.String filename, NSSet<?> classes)
SKNode(NSCoder decoder)
protected
SKNode(NSObject.Handle h, long handle)
protected
SKNode(NSObject.SkipInit skipInit)
-
Method Summary
-
Methods inherited from class org.robovm.apple.uikit.UIResponder
areAccessibilityElementsHidden, becomeFirstResponder, canBecomeFirstResponder, canPerformAction, canResignFirstResponder, clearTextInputContextIdentifier, getAccessibilityActivationPoint, getAccessibilityAttributedHint, getAccessibilityAttributedLabel, getAccessibilityAttributedValue, getAccessibilityFrame, getAccessibilityHint, getAccessibilityLabel, getAccessibilityLanguage, getAccessibilityNavigationStyle, getAccessibilityPath, getAccessibilityTraits, getAccessibilityValue, getActionTarget, getInputAccessoryView, getInputAccessoryViewController, getInputAssistantItem, getInputView, getInputViewController, getKeyCommands, getNextResponder, getTextInputContextIdentifier, getTextInputMode, getUndoManager, getUserActivity, isAccessibilityElement, isAccessibilityViewModal, isFirstResponder, motionBegan, motionCancelled, motionEnded, pressesBegan, pressesCancelled, pressesChanged, pressesEnded, reloadInputViews, remoteControlReceived, resignFirstResponder, restoreUserActivityState, setAccessibilityActivationPoint, setAccessibilityAttributedHint, setAccessibilityAttributedLabel, setAccessibilityAttributedValue, setAccessibilityElement, setAccessibilityElementsHidden, setAccessibilityFrame, setAccessibilityHint, setAccessibilityLabel, setAccessibilityLanguage, setAccessibilityNavigationStyle, setAccessibilityPath, setAccessibilityTraits, setAccessibilityValue, setAccessibilityViewModal, setShouldGroupAccessibilityChildren, setUserActivity, shouldGroupAccessibilityChildren, touchesBegan, touchesCancelled, touchesEnded, touchesEstimatedPropertiesUpdated, touchesMoved, updateUserActivityState
-
Methods inherited from class org.robovm.apple.foundation.NSObject
addKeyValueObserver, addKeyValueObserver, afterMarshaled, alloc, autorelease, autorelease, awakeFromNib, conformsToProtocol, copy, description, didChangeValue, didChangeValue, didChangeValues, doDispose, equals, forceSkipInit, getAutoContentAccessingProxy, getClassForCoder, getClassForKeyedArchiver, getKeyValueCoder, getObservationInfo, hash, hashCode, init, isEqual, isKindOfClass, isMemberOfClass, mutableCopy, performSelector, performSelector, performSelector, performSelector, performSelector, performSelector, performSelector, performSelectorInBackground, performSelectorOnMainThread, performSelectorOnMainThread, performSelectorV, performSelectorV, performSelectorV, release, release, removeKeyValueObserver, removeKeyValueObservers, respondsToSelector, retain, retain, retainCount, setObservationInfo, toString, willChangeValue, willChangeValue, willChangeValues
-
-
-
-
Constructor Detail
-
SKNode
public SKNode()
-
SKNode
@Deprecated protected SKNode(long handle)
Deprecated.
-
SKNode
protected SKNode(NSObject.Handle h, long handle)
-
SKNode
protected SKNode(NSObject.SkipInit skipInit)
-
SKNode
public SKNode(NSCoder decoder)
-
SKNode
public SKNode(java.lang.String filename)
-
SKNode
public SKNode(java.lang.String filename, NSSet<?> classes) throws NSErrorException
- Throws:
NSErrorException
- Since:
- Available in iOS 12.0 and later.
-
SKNode
public SKNode(java.io.File file)
-
-
Method Detail
-
getFrame
public CGRect getFrame()
- Specified by:
getFrame
in interfaceUIFocusItem
-
getPosition
public CGPoint getPosition()
-
setPosition
public void setPosition(CGPoint v)
-
getZPosition
public double getZPosition()
-
setZPosition
public void setZPosition(double v)
-
getZRotation
public double getZRotation()
-
setZRotation
public void setZRotation(double v)
-
getXScale
public double getXScale()
-
setXScale
public void setXScale(double v)
-
getYScale
public double getYScale()
-
setYScale
public void setYScale(double v)
-
getSpeed
public double getSpeed()
-
setSpeed
public void setSpeed(double v)
-
getAlpha
public double getAlpha()
-
setAlpha
public void setAlpha(double v)
-
isPaused
public boolean isPaused()
-
setPaused
public void setPaused(boolean v)
-
isHidden
public boolean isHidden()
-
setHidden
public void setHidden(boolean v)
-
isUserInteractionEnabled
public boolean isUserInteractionEnabled()
-
setUserInteractionEnabled
public void setUserInteractionEnabled(boolean v)
-
getFocusBehavior
public SKNodeFocusBehavior getFocusBehavior()
- Since:
- Available in iOS 11.0 and later.
-
setFocusBehavior
public void setFocusBehavior(SKNodeFocusBehavior v)
- Since:
- Available in iOS 11.0 and later.
-
getParent
public SKNode getParent()
-
getName
public java.lang.String getName()
-
setName
public void setName(java.lang.String v)
-
getScene
public SKScene getScene()
-
getPhysicsBody
public SKPhysicsBody getPhysicsBody()
-
setPhysicsBody
public void setPhysicsBody(SKPhysicsBody v)
-
getUserData
public NSMutableDictionary<?,?> getUserData()
-
setUserData
public void setUserData(NSMutableDictionary<?,?> v)
-
getReachConstraints
public SKReachConstraints getReachConstraints()
-
setReachConstraints
public void setReachConstraints(SKReachConstraints v)
-
getConstraints
public NSArray<SKConstraint> getConstraints()
-
setConstraints
public void setConstraints(NSArray<SKConstraint> v)
-
getAttributeValues
@Deprecated public NSDictionary<NSString,SKAttributeValue> getAttributeValues()
Deprecated.Deprecated in iOS 10.0.- Since:
- Available in iOS 10.0 and later.
-
setAttributeValues
@Deprecated public void setAttributeValues(NSDictionary<NSString,SKAttributeValue> v)
Deprecated.Deprecated in iOS 10.0.- Since:
- Available in iOS 10.0 and later.
-
supportsSecureCoding
public static boolean supportsSecureCoding()
-
canBecomeFocused
public boolean canBecomeFocused()
- Specified by:
canBecomeFocused
in interfaceUIFocusItem
-
getPreferredFocusEnvironments
public java.util.List<UIFocusEnvironment> getPreferredFocusEnvironments()
- Specified by:
getPreferredFocusEnvironments
in interfaceUIFocusEnvironment
-
getParentFocusEnvironment
public UIFocusEnvironment getParentFocusEnvironment()
- Specified by:
getParentFocusEnvironment
in interfaceUIFocusEnvironment
- Since:
- Available in iOS 12.0 and later.
-
getFocusItemContainer
public UIFocusItemContainer getFocusItemContainer()
- Specified by:
getFocusItemContainer
in interfaceUIFocusEnvironment
- Since:
- Available in iOS 12.0 and later.
-
getPreferredFocusedView
@Deprecated public UIView getPreferredFocusedView()
Deprecated.Deprecated in iOS 10.0. Use -preferredFocusEnvironments instead.- Specified by:
getPreferredFocusedView
in interfaceUIFocusEnvironment
- Since:
- Available in iOS 9.0 and later.
-
init
protected long init(NSCoder decoder)
-
calculateAccumulatedFrame
public CGRect calculateAccumulatedFrame()
-
valueForAttributeNamed
@Deprecated public SKAttributeValue valueForAttributeNamed(java.lang.String key)
Deprecated.Deprecated in iOS 10.0.- Since:
- Available in iOS 10.0 and later.
-
setValue
@Deprecated public void setValue(SKAttributeValue value, java.lang.String key)
Deprecated.Deprecated in iOS 10.0.- Since:
- Available in iOS 10.0 and later.
-
setScale
public void setScale(double scale)
-
addChild
public void addChild(SKNode node)
-
insertChild
public void insertChild(SKNode node, long index)
-
removeAllChildren
public void removeAllChildren()
-
removeFromParent
public void removeFromParent()
-
moveToParent
public void moveToParent(SKNode parent)
- Since:
- Available in iOS 9.0 and later.
-
getChild
public SKNode getChild(java.lang.String name)
-
enumerateChildNodes
public void enumerateChildNodes(java.lang.String name, org.robovm.objc.block.VoidBlock2<SKNode,org.robovm.rt.bro.ptr.BooleanPtr> block)
-
findNodesByName
public NSArray<SKNode> findNodesByName(java.lang.String name)
- Since:
- Available in iOS 8.0 and later.
-
isInParentHierarchy
public boolean isInParentHierarchy(SKNode parent)
-
runAction
public void runAction(SKAction action)
-
runAction
public void runAction(SKAction action, java.lang.Runnable block)
-
runAction
public void runAction(SKAction action, java.lang.String key)
-
hasActions
public boolean hasActions()
-
getAction
public SKAction getAction(java.lang.String key)
-
removeAction
public void removeAction(java.lang.String key)
-
removeAllActions
public void removeAllActions()
-
containsPoint
public boolean containsPoint(CGPoint p)
-
intersectsNode
public boolean intersectsNode(SKNode node)
-
equalsTo
public boolean equalsTo(SKNode node)
-
create
protected static long create(java.lang.String filename)
-
create
protected static long create(java.lang.String filename, NSSet<?> classes, NSError.NSErrorPtr error)
- Since:
- Available in iOS 12.0 and later.
-
didHintFocusMovement
public void didHintFocusMovement(UIFocusMovementHint hint)
- Specified by:
didHintFocusMovement
in interfaceUIFocusItem
-
setNeedsFocusUpdate
public void setNeedsFocusUpdate()
- Specified by:
setNeedsFocusUpdate
in interfaceUIFocusEnvironment
-
updateFocusIfNeeded
public void updateFocusIfNeeded()
- Specified by:
updateFocusIfNeeded
in interfaceUIFocusEnvironment
-
shouldUpdateFocus
public boolean shouldUpdateFocus(UIFocusUpdateContext context)
- Specified by:
shouldUpdateFocus
in interfaceUIFocusEnvironment
-
didUpdateFocus
public void didUpdateFocus(UIFocusUpdateContext context, UIFocusAnimationCoordinator coordinator)
- Specified by:
didUpdateFocus
in interfaceUIFocusEnvironment
-
-