public class SKSpriteNode extends SKNode implements SKWarpable
Sprites are used to define quad primitives with color and/or textures applied to them. See wiki for a definition of a Sprite.
SKNode.Block_enumerateChildNodesWithNameUsingBlock, SKNode.Block_runActionCompletionNSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_retUIResponderStandardEditActions.Block_updateTextAttributesWithConversionHandler| Modifier | Constructor and Description |
|---|---|
protected |
SKSpriteNode(org.moe.natj.general.Pointer peer) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
_supportsSecureCoding()
This property must return YES on all classes that allow secure coding.
|
static boolean |
accessInstanceVariablesDirectly() |
static SKSpriteNode |
alloc() |
static SKSpriteNode |
allocWithZone(org.moe.natj.general.ptr.VoidPtr zone) |
CGPoint |
anchorPoint()
Used to choose the location in the sprite that maps to its 'position' in the parent's coordinate space.
|
NSDictionary<java.lang.String,? extends SKAttributeValue> |
attributeValues()
Optional dictionary of SKAttributeValues
Attributes can be used with custom SKShaders.
|
static boolean |
automaticallyNotifiesObserversForKey(java.lang.String key) |
long |
blendMode()
Sets the blend mode to use when composing the sprite with the final framebuffer.
|
static void |
cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget) |
static void |
cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget,
org.moe.natj.objc.SEL aSelector,
java.lang.Object anArgument) |
CGRect |
centerRect()
Controls how the texture is stretched to fill the SKSpriteNode.
|
static NSArray<java.lang.String> |
classFallbacksForKeyedArchiver() |
static org.moe.natj.objc.Class |
classForKeyedUnarchiver() |
static void |
clearTextInputContextIdentifier(java.lang.String identifier) |
UIColor |
color()
Base color for the sprite (If no texture is present, the color still is drawn)
|
double |
colorBlendFactor()
Controls the blending between the texture and the sprite's color.
|
static java.lang.String |
debugDescription_static() |
static java.lang.String |
description_static() |
static long |
hash_static() |
SKSpriteNode |
init() |
SKSpriteNode |
initWithCoder(NSCoder aDecoder)
Support coding and decoding via NSKeyedArchiver.
|
SKSpriteNode |
initWithColorSize(UIColor color,
CGSize size)
Initialize a sprite with a color and the specified bounds.
|
SKSpriteNode |
initWithImageNamed(java.lang.String name)
Initialize a sprite with an image from your app bundle (An SKTexture is created for the image and set on the sprite.
|
SKSpriteNode |
initWithTexture(SKTexture texture)
Initialize a sprite with an SKTexture and set its size to the SKTexture's width/height.
|
SKSpriteNode |
initWithTextureColorSize(SKTexture texture,
UIColor color,
CGSize size)
Designated Initializer
Initialize a sprite with a color and the specified bounds.
|
static NSObject.Function_instanceMethodForSelector_ret |
instanceMethodForSelector(org.moe.natj.objc.SEL aSelector) |
static NSMethodSignature |
instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector) |
static boolean |
instancesRespondToSelector(org.moe.natj.objc.SEL aSelector) |
static boolean |
isSubclassOfClass(org.moe.natj.objc.Class aClass) |
static NSSet<java.lang.String> |
keyPathsForValuesAffectingValueForKey(java.lang.String key) |
int |
lightingBitMask()
Bitmask to indicate being lit by a set of lights using overlapping lighting categories.
|
static SKSpriteNode |
new_objc() |
static SKSpriteNode |
node() |
static SKSpriteNode |
nodeWithFileNamed(java.lang.String filename) |
static SKSpriteNode |
nodeWithFileNamedSecurelyWithClassesAndError(java.lang.String filename,
NSSet<? extends org.moe.natj.objc.Class> classes,
org.moe.natj.general.ptr.Ptr<NSError> error) |
SKTexture |
normalTexture()
Texture to use for generating normals that lights use to light this sprite.
|
static NSArray<? extends GKPolygonObstacle> |
obstaclesFromNodeBounds(NSArray<? extends SKNode> nodes) |
static NSArray<? extends GKPolygonObstacle> |
obstaclesFromNodePhysicsBodies(NSArray<? extends SKNode> nodes) |
static NSArray<? extends GKPolygonObstacle> |
obstaclesFromSpriteTexturesAccuracy(NSArray<? extends SKNode> sprites,
float accuracy) |
static boolean |
resolveClassMethod(org.moe.natj.objc.SEL sel) |
static boolean |
resolveInstanceMethod(org.moe.natj.objc.SEL sel) |
void |
scaleToSize(CGSize size)
Adjust the sprite's xScale & yScale to achieve the desired size (in parent's coordinate space)
|
void |
setAnchorPoint(CGPoint value)
Used to choose the location in the sprite that maps to its 'position' in the parent's coordinate space.
|
void |
setAttributeValues(NSDictionary<java.lang.String,? extends SKAttributeValue> value)
Optional dictionary of SKAttributeValues
Attributes can be used with custom SKShaders.
|
void |
setBlendMode(long value)
Sets the blend mode to use when composing the sprite with the final framebuffer.
|
void |
setCenterRect(CGRect value)
Controls how the texture is stretched to fill the SKSpriteNode.
|
void |
setColor(UIColor value)
Base color for the sprite (If no texture is present, the color still is drawn)
|
void |
setColorBlendFactor(double value)
Controls the blending between the texture and the sprite's color.
|
void |
setLightingBitMask(int value)
Bitmask to indicate being lit by a set of lights using overlapping lighting categories.
|
void |
setNormalTexture(SKTexture value)
Texture to use for generating normals that lights use to light this sprite.
|
void |
setShader(SKShader value) |
void |
setShadowCastBitMask(int value) |
void |
setShadowedBitMask(int value) |
void |
setSize(CGSize value)
Set the size of the sprite (in parent's coordinate space)
|
void |
setSubdivisionLevels(long value)
maximum number of subdivision iterations used to generate the final vertices
|
void |
setTexture(SKTexture value)
Texture to be drawn (is stretched to fill the sprite)
|
void |
setValueForAttributeNamed(SKAttributeValue value,
java.lang.String key) |
static void |
setVersion_static(long aVersion) |
void |
setWarpGeometry(SKWarpGeometry value)
Warp geometry used to define the distortion
|
SKShader |
shader() |
int |
shadowCastBitMask() |
int |
shadowedBitMask() |
CGSize |
size()
Set the size of the sprite (in parent's coordinate space)
|
static SKSpriteNode |
spriteNodeWithColorSize(UIColor color,
CGSize size)
Create a sprite with a color and the specified bounds.
|
static SKSpriteNode |
spriteNodeWithImageNamed(java.lang.String name)
Create a sprite with an image from your app bundle (An SKTexture is created for the image and set on the sprite.
|
static SKSpriteNode |
spriteNodeWithImageNamedNormalMapped(java.lang.String name,
boolean generateNormalMap) |
static SKSpriteNode |
spriteNodeWithTexture(SKTexture texture)
Create a sprite with an SKTexture and set its size to the SKTexture's pixel width/height.
|
static SKSpriteNode |
spriteNodeWithTextureNormalMap(SKTexture texture,
SKTexture normalMap) |
static SKSpriteNode |
spriteNodeWithTextureSize(SKTexture texture,
CGSize size)
Create a sprite with an SKTexture and the specified size.
|
long |
subdivisionLevels()
maximum number of subdivision iterations used to generate the final vertices
|
static org.moe.natj.objc.Class |
superclass_static() |
static boolean |
supportsSecureCoding() |
SKTexture |
texture()
Texture to be drawn (is stretched to fill the sprite)
|
SKAttributeValue |
valueForAttributeNamed(java.lang.String key) |
static long |
version_static() |
SKWarpGeometry |
warpGeometry()
Warp geometry used to define the distortion
|
actionForKey, addChild, alpha, calculateAccumulatedFrame, canBecomeFocused, childNodeWithName, children, constraints, containsPoint, convertPointFromNode, convertPointToNode, copyWithZone, didHintFocusMovement, didUpdateFocusInContextWithAnimationCoordinator, encodeWithCoder, entity, enumerateChildNodesWithNameUsingBlock, focusBehavior, focusEffect, focusGroupIdentifier, focusGroupPriority, focusItemContainer, frame, hasActions, inParentHierarchy, insertChildAtIndex, intersectsNode, isEqualToNode, isHidden, isPaused, isTransparentFocusItem, isUserInteractionEnabled, moveToParent, name, nodeAtPoint, nodesAtPoint, objectForKeyedSubscript, parent, parentFocusEnvironment, physicsBody, position, preferredFocusedView, preferredFocusEnvironments, reachConstraints, removeActionForKey, removeAllActions, removeAllChildren, removeChildrenInArray, removeFromParent, runAction, runActionCompletion, runActionWithKey, scene, setAlpha, setConstraints, setEntity_unsafe, setEntity, setFocusBehavior, setHidden, setName, setNeedsFocusUpdate, setPaused, setPhysicsBody, setPosition, setReachConstraints, setScale, setSpeed, setUserData, setUserInteractionEnabled, setXScale, setYScale, setZPosition, setZRotation, shouldUpdateFocusInContext, speed, updateFocusIfNeeded, userData, xScale, yScale, zPosition, zRotationactivityItemsConfiguration, becomeFirstResponder, buildMenuWithBuilder, canBecomeFirstResponder, canPasteItemProviders, canPerformActionWithSender, canResignFirstResponder, captureTextFromCamera, copy, cut, decreaseSize, delete, editingInteractionConfiguration, increaseSize, inputAccessoryView, inputAccessoryViewController, inputAssistantItem, inputView, inputViewController, isFirstResponder, keyCommands, makeTextWritingDirectionLeftToRight, makeTextWritingDirectionRightToLeft, motionBeganWithEvent, motionCancelledWithEvent, motionEndedWithEvent, nextResponder, paste, pasteAndGo, pasteAndMatchStyle, pasteAndSearch, pasteConfiguration, pasteItemProviders, pressesBeganWithEvent, pressesCancelledWithEvent, pressesChangedWithEvent, pressesEndedWithEvent, print, reloadInputViews, remoteControlReceivedWithEvent, resignFirstResponder, restoreUserActivityState, select, selectAll, setActivityItemsConfiguration, setPasteConfiguration, setUserActivity, targetForActionWithSender, textInputContextIdentifier, textInputMode, toggleBoldface, toggleItalics, toggleUnderline, touchesBeganWithEvent, touchesCancelledWithEvent, touchesEndedWithEvent, touchesEstimatedPropertiesUpdated, touchesMovedWithEvent, undoManager, updateTextAttributesWithConversionHandler, updateUserActivityState, userActivity, validateCommandaccessibilityActivate, 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, willChangeValuesAtIndexesForKeypublic static boolean accessInstanceVariablesDirectly()
public static SKSpriteNode alloc()
public static SKSpriteNode allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
public static boolean automaticallyNotifiesObserversForKey(java.lang.String key)
public static void cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget,
org.moe.natj.objc.SEL aSelector,
java.lang.Object anArgument)
public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
public static org.moe.natj.objc.Class classForKeyedUnarchiver()
public static void clearTextInputContextIdentifier(java.lang.String identifier)
public static java.lang.String debugDescription_static()
public static java.lang.String description_static()
public static long hash_static()
public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
public static NSMethodSignature instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)
public static boolean instancesRespondToSelector(org.moe.natj.objc.SEL aSelector)
public static boolean isSubclassOfClass(org.moe.natj.objc.Class aClass)
public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(java.lang.String key)
public static SKSpriteNode new_objc()
public static SKSpriteNode node()
public static SKSpriteNode nodeWithFileNamed(java.lang.String filename)
public static NSArray<? extends GKPolygonObstacle> obstaclesFromNodeBounds(NSArray<? extends SKNode> nodes)
public static NSArray<? extends GKPolygonObstacle> obstaclesFromNodePhysicsBodies(NSArray<? extends SKNode> nodes)
public static NSArray<? extends GKPolygonObstacle> obstaclesFromSpriteTexturesAccuracy(NSArray<? extends SKNode> sprites, float accuracy)
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
public static void setVersion_static(long aVersion)
public static SKSpriteNode spriteNodeWithColorSize(UIColor color, CGSize size)
color - the color to use for tinting the sprite.size - the size of the sprite in pointspublic static SKSpriteNode spriteNodeWithImageNamed(java.lang.String name)
name - is the name of an image file stored in the app bundle.public static SKSpriteNode spriteNodeWithImageNamedNormalMapped(java.lang.String name, boolean generateNormalMap)
public static SKSpriteNode spriteNodeWithTexture(SKTexture texture)
texture - the texture to reference for size and contentpublic static SKSpriteNode spriteNodeWithTextureNormalMap(SKTexture texture, SKTexture normalMap)
public static SKSpriteNode spriteNodeWithTextureSize(SKTexture texture, CGSize size)
texture - the texture to reference for size and contentsize - the size of the sprite in pointspublic static org.moe.natj.objc.Class superclass_static()
public static long version_static()
public CGPoint anchorPoint()
public NSDictionary<java.lang.String,? extends SKAttributeValue> attributeValues()
attributeValues in class SKNodepublic long blendMode()
SKNode.SKBlendModepublic CGRect centerRect()
public UIColor color()
public double colorBlendFactor()
public SKSpriteNode init()
public SKSpriteNode initWithCoder(NSCoder aDecoder)
initWithCoder in interface NSCodinginitWithCoder in class SKNodepublic SKSpriteNode initWithColorSize(UIColor color, CGSize size)
color - the color to use for tinting the sprite.size - the size of the sprite in pointspublic SKSpriteNode initWithImageNamed(java.lang.String name)
name - the name or path of the image to load.public SKSpriteNode initWithTexture(SKTexture texture)
texture - the texture to reference for size and contentpublic SKSpriteNode initWithTextureColorSize(SKTexture texture, UIColor color, CGSize size)
texture - the texture to use (can be nil for colored sprite)color - the color to use for tinting the sprite.size - the size of the sprite in pointspublic int lightingBitMask()
A light whose category is set to a value that masks to non-zero using this mask will apply light to this sprite.
When used together with a normal texture, complex lighting effects can be used.
public SKTexture normalTexture()
This will only be used if the sprite is lit by at least one light.
SKLightNode,
lightingBitMaskpublic void scaleToSize(CGSize size)
public void setAnchorPoint(CGPoint value)
public void setAttributeValues(NSDictionary<java.lang.String,? extends SKAttributeValue> value)
setAttributeValues in class SKNodepublic void setBlendMode(long value)
SKNode.SKBlendModepublic void setCenterRect(CGRect value)
public void setColor(UIColor value)
public void setColorBlendFactor(double value)
public void setLightingBitMask(int value)
A light whose category is set to a value that masks to non-zero using this mask will apply light to this sprite.
When used together with a normal texture, complex lighting effects can be used.
public void setNormalTexture(SKTexture value)
This will only be used if the sprite is lit by at least one light.
SKLightNode,
lightingBitMaskpublic void setShader(SKShader value)
public void setShadowCastBitMask(int value)
public void setShadowedBitMask(int value)
public void setSize(CGSize value)
public void setSubdivisionLevels(long value)
SKWarpablesetSubdivisionLevels in interface SKWarpablepublic void setTexture(SKTexture value)
public void setValueForAttributeNamed(SKAttributeValue value, java.lang.String key)
setValueForAttributeNamed in class SKNodepublic void setWarpGeometry(SKWarpGeometry value)
SKWarpablesetWarpGeometry in interface SKWarpablepublic SKShader shader()
public int shadowCastBitMask()
public int shadowedBitMask()
public CGSize size()
public long subdivisionLevels()
SKWarpablesubdivisionLevels in interface SKWarpablepublic SKTexture texture()
public SKAttributeValue valueForAttributeNamed(java.lang.String key)
valueForAttributeNamed in class SKNodepublic SKWarpGeometry warpGeometry()
SKWarpablewarpGeometry in interface SKWarpablepublic static SKSpriteNode nodeWithFileNamedSecurelyWithClassesAndError(java.lang.String filename, NSSet<? extends org.moe.natj.objc.Class> classes, org.moe.natj.general.ptr.Ptr<NSError> error)
public static boolean supportsSecureCoding()
public boolean _supportsSecureCoding()
NSSecureCoding_supportsSecureCoding in interface NSSecureCoding_supportsSecureCoding in class SKNode