SKNode(SKUModifications)
IntroductionCategory 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. GroupsNavigationalGroup members:
InputGroup members:
Methods
absoluteInputBeganSKU:withEventDictionary:-(void)absoluteInputBeganSKU:(CGPoint)location withEventDictionary:(NSDictionary*)eventDict; DiscussionCalled 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; DiscussionCalled 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; DiscussionCalled when absolute type input moves (Currently iOS touches and Mac mouse clicks). Harmless to include on other platforms. addNodeToNavNodesSKU:-(void)addNodeToNavNodesSKU:(SKNode*)node; DiscussionCall this method to add a node to the list of navigation nodes paired with this node. currentFocusedNodeUpdatedSKU:-(void)currentFocusedNodeUpdatedSKU:(SKNode *)node; DiscussionOverride this method to update visuals. It is called automatically when the focus changes. inputBeganSKU:withEventDictionary:-(void)inputBeganSKU:(CGPoint)location withEventDictionary:(NSDictionary*)eventDict; DiscussionCalled 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; DiscussionCalled 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; DiscussionCalled 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; DiscussionCalled only on OSX when the mouse moves around the screen unclicked. Harmless to include on other platforms. navNodes-(NSSet*)navNodes; DiscussionReturns an NSSet of the current collection of navNodes. Returns nil if it doesn't exist. nodeIsMemberOfNavNodesSKU:-(BOOL)nodeIsMemberOfNavNodesSKU:(SKNode*)node; DiscussionCall this method to get a boolean returned answering whether a specified node is part of the nav nodes set. nodePressedDownSKU:-(void)nodePressedDownSKU:(SKNode*)node; DiscussionOverride this method to perform logic with non SKUButton nodes when pressed on a controller or remote button. nodePressedUpSKU:-(void)nodePressedUpSKU:(SKNode*)node; DiscussionOverride 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; DiscussionCalled 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; DiscussionCalled 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; DiscussionCalled when relative type input moves (Currently only AppleTV's Siri Remote touches). Harmless to include on other platforms. removeNodeFromNavNodesSKU:-(void)removeNodeFromNavNodesSKU:(SKNode*)node; DiscussionCall this method to remove a node from the list of navigation nodes paired with this node. setCurrentFocusedNodeSKU:-(void)setCurrentFocusedNodeSKU:(SKNode*)node; DiscussionCall this method to set the currently focused node within the navNodes set. |