SKView(SKUModifications)

Extends Class:
SKView
Declared In:

Introduction

Category on SKView to allow for additional mouse buttons on OS X and some button support for AppleTV. Also adds controller support for all platforms.



Methods

-gamepadInputChangedForPlayer:withInput:andXValue:andYValue:pressedState:andEventDictionary:
-gamepadMotionInputChangedForPlayer:withAcceleration:andEventDictionary:

gamepadInputChangedForPlayer:withInput:andXValue:andYValue:pressedState:andEventDictionary:


-(void)gamepadInputChangedForPlayer:(GCControllerPlayerIndex)player 
        withInput:(kSKUGamePadInputs)input andXValue:(float)xValue 
        andYValue:(float)yValue pressedState:(kSKUGamepadButtonStates)pressedState 
        andEventDictionary:(NSDictionary*)eventDictionary; 
Parameters
player

GCControllerPlayerIndex determining which player caused the input.

input

kSKUGamePadInputs enumeration determining which input was pressed

xValue

Used for both button and directional inputs. Directional inputs will show x direction vector of the input while button inputs will show the pressure it was pressed with.

yValue

Used only for directional inputs. Shows the y direction vector of the input.

pressedState

kSKUGamepadButtonStates representing the state of the button press.

eventDictionary

NSDictionary object with objects originating the events.

Discussion

Called when gamepad input changes. Automatically passes onto scene if the scene is a subclass of SKUScene.


gamepadMotionInputChangedForPlayer:withAcceleration:andEventDictionary:


-(void)gamepadMotionInputChangedForPlayer:(GCControllerPlayerIndex)player 
        withAcceleration:(SKUAcceleration)acceleration 
        andEventDictionary:(NSDictionary*)eventDictionary; 
Parameters
player

GCControllerPlayerIndex determining which player caused the input.

acceleration

SKUAcceleration struct to determine which direction the controller is facing.

eventDictionary

NSDictionary object with objects originating the events.

Discussion

Called when gamepad motion input changes. Automatically passes onto scene if the scene is a subclass of SKUScene.