SKNode(SKUModifications)

Extends Class:
SKNode
Declared In:

Introduction

Category on SKNode augmenting a LOT of functionality to scenes and nodes (Scenes are a subclass of SKNode). First and foremost is the ability to consolidate input between the different platforms. Instead of having a different -(void)touchesBegan for iOS and tvOS and -(void)mouseDown on OS X, you can instead use inputBeganSKU in both situation. It also allows for getting mouse movement (non clicking) on OS X, and a simple way to distinguish the separate movement types between iOS, tvOS, and Mac OS.



Groups

Navigational

Group members:

 

Input

Group members:


Methods

-absoluteInputBeganSKU:withEventDictionary:
-absoluteInputEndedSKU:withDelta:withEventDictionary:
-absoluteInputMovedSKU:withDelta:withEventDictionary:
-addNodeToNavNodesSKU:
-currentFocusedNodeUpdatedSKU:
-inputBeganSKU:withEventDictionary:
-inputEndedSKU:withDelta:withEventDictionary:
-inputMovedSKU:withDelta:withEventDictionary:
-mouseMovedSKU:withDelta:withEventDictionary:
-navNodes
-nodeIsMemberOfNavNodesSKU:
-nodePressedDownSKU:
-nodePressedUpSKU:
-relativeInputBeganSKU:withEventDictionary:
-relativeInputEndedSKU:withDelta:withEventDictionary:
-relativeInputMovedSKU:withDelta:withEventDictionary:
-removeNodeFromNavNodesSKU:
-setCurrentFocusedNodeSKU:

absoluteInputBeganSKU:withEventDictionary:


-(void)absoluteInputBeganSKU:(CGPoint)location 
        withEventDictionary:(NSDictionary*)eventDict; 
Discussion

Called when absolute type input begins (Currently iOS touches and Mac mouse clicks). Harmless to include on other platforms.


absoluteInputEndedSKU:withDelta:withEventDictionary:


-(void)absoluteInputEndedSKU:(CGPoint)location withDelta:(CGPoint)delta 
        withEventDictionary:(NSDictionary*)eventDict; 
Discussion

Called when absolute type input ends (Currently iOS touches and Mac mouse clicks). Harmless to include on other platforms.


absoluteInputMovedSKU:withDelta:withEventDictionary:


-(void)absoluteInputMovedSKU:(CGPoint)location withDelta:(CGPoint)delta 
        withEventDictionary:(NSDictionary*)eventDict; 
Discussion

Called when absolute type input moves (Currently iOS touches and Mac mouse clicks). Harmless to include on other platforms.


addNodeToNavNodesSKU:


-(void)addNodeToNavNodesSKU:(SKNode*)node; 
Discussion

Call this method to add a node to the list of navigation nodes paired with this node.


currentFocusedNodeUpdatedSKU:


-(void)currentFocusedNodeUpdatedSKU:(SKNode *)node; 
Discussion

Override this method to update visuals. It is called automatically when the focus changes.


inputBeganSKU:withEventDictionary:


-(void)inputBeganSKU:(CGPoint)location withEventDictionary:(NSDictionary*)eventDict; 
Discussion

Called when any input location based input begins (Currently iOS touches, Mac mouse clicks, and AppleTV Siri Remote touches).


inputEndedSKU:withDelta:withEventDictionary:


-(void)inputEndedSKU:(CGPoint)location withDelta:(CGPoint)delta 
        withEventDictionary:(NSDictionary*)eventDict; 
Discussion

Called when any input location based input ends (Currently iOS touches, Mac mouse clicks, and AppleTV Siri Remote touches).


inputMovedSKU:withDelta:withEventDictionary:


-(void)inputMovedSKU:(CGPoint)location withDelta:(CGPoint)delta 
        withEventDictionary:(NSDictionary*)eventDict; 
Discussion

Called when any input location based input moves (Currently iOS touches, Mac mouse clicks, and AppleTV Siri Remote touches).


mouseMovedSKU:withDelta:withEventDictionary:


-(void)mouseMovedSKU:(CGPoint)location withDelta:(CGPoint)delta 
        withEventDictionary:(NSDictionary*)eventDict; 
Discussion

Called only on OSX when the mouse moves around the screen unclicked. Harmless to include on other platforms.


navNodes


-(NSSet*)navNodes; 
Discussion

Returns an NSSet of the current collection of navNodes. Returns nil if it doesn't exist.


nodeIsMemberOfNavNodesSKU:


-(BOOL)nodeIsMemberOfNavNodesSKU:(SKNode*)node; 
Discussion

Call this method to get a boolean returned answering whether a specified node is part of the nav nodes set.


nodePressedDownSKU:


-(void)nodePressedDownSKU:(SKNode*)node; 
Discussion

Override this method to perform logic with non SKUButton nodes when pressed on a controller or remote button.


nodePressedUpSKU:


-(void)nodePressedUpSKU:(SKNode*)node; 
Discussion

Override this method to perform logic with non SKUButton nodes when released on a controller or remote button.


relativeInputBeganSKU:withEventDictionary:


-(void)relativeInputBeganSKU:(CGPoint)location 
        withEventDictionary:(NSDictionary*)eventDict; 
Discussion

Called when relative type input begins (Currently only AppleTV's Siri Remote touches). Harmless to include on other platforms.


relativeInputEndedSKU:withDelta:withEventDictionary:


-(void)relativeInputEndedSKU:(CGPoint)location withDelta:(CGPoint)delta 
        withEventDictionary:(NSDictionary*)eventDict; 
Discussion

Called when relative type input ends (Currently only AppleTV's Siri Remote touches). Harmless to include on other platforms.


relativeInputMovedSKU:withDelta:withEventDictionary:


-(void)relativeInputMovedSKU:(CGPoint)location withDelta:(CGPoint)delta 
        withEventDictionary:(NSDictionary*)eventDict; 
Discussion

Called when relative type input moves (Currently only AppleTV's Siri Remote touches). Harmless to include on other platforms.


removeNodeFromNavNodesSKU:


-(void)removeNodeFromNavNodesSKU:(SKNode*)node; 
Discussion

Call this method to remove a node from the list of navigation nodes paired with this node.


setCurrentFocusedNodeSKU:


-(void)setCurrentFocusedNodeSKU:(SKNode*)node; 
Discussion

Call this method to set the currently focused node within the navNodes set.