SKJoystickWrapper
- class SKJoystick.SKJoystickWrapper(object: Object)
Bases:
Object- property AxisX: float
Joystick value along the horizontal axis
Example:
value = instance.AxisX
- property AxisY: float
Joystick value along the vertical axis
Example:
value = instance.AxisY
- RedButtonPressed() bool
Red button pressed
Example:
value = instance.RedButtonPressed()
- GreenButtonPressed() bool
Green button pressed
Example:
value = instance.GreenButtonPressed()
- BlueButtonPressed() bool
Blue button pressed:
Example:
value = instance.BlueButtonPressed()
- YellowButtonPressed() bool
Yellow button pressed
Example:
value = instance.YellowButtonPressed()
- AddRedButtonWasPressedHandler(handler: Callable[[Object], CoroutineType]) None
Red button was pressed
- Parameters:
handler –
Asynchronous handler function with signature:
sender (Object): the object that triggered the event
Example:
async def OnRedButtonWasPressed(sender): pass instance.AddRedButtonWasPressedHandler(OnRedButtonWasPressed)
- AddGreenButtonWasPressedHandler(handler: Callable[[Object], CoroutineType]) None
Green button was pressed
- Parameters:
handler –
Asynchronous handler function with signature:
sender (Object): the object that triggered the event
Example:
async def OnGreenButtonWasPressed(sender): pass instance.AddGreenButtonWasPressedHandler(OnGreenButtonWasPressed)
- AddBlueButtonWasPressedHandler(handler: Callable[[Object], CoroutineType]) None
Blue button was pressed
- Parameters:
handler –
Asynchronous handler function with signature:
sender (Object): the object that triggered the event
Example:
async def OnBlueButtonWasPressed(sender): pass instance.AddBlueButtonWasPressedHandler(OnBlueButtonWasPressed)
- AddYellowButtonWasPressedHandler(handler: Callable[[Object], CoroutineType]) None
Yellow button was pressed
- Parameters:
handler –
Asynchronous handler function with signature:
sender (Object): the object that triggered the event
Example:
async def OnYellowButtonWasPressed(sender): pass instance.AddYellowButtonWasPressedHandler(OnYellowButtonWasPressed)
- AddRedButtonWasReleasedHandler(handler: Callable[[Object], CoroutineType]) None
Red button was unpressed
- Parameters:
handler –
Asynchronous handler function with signature:
sender (Object): the object that triggered the event
Example:
async def OnRedButtonWasReleased(sender): pass instance.AddRedButtonWasReleasedHandler(OnRedButtonWasReleased)
- AddGreenButtonWasReleasedHandler(handler: Callable[[Object], CoroutineType]) None
Green button was unpressed
- Parameters:
handler –
Asynchronous handler function with signature:
sender (Object): the object that triggered the event
Example:
async def OnGreenButtonWasReleased(sender): pass instance.AddGreenButtonWasReleasedHandler(OnGreenButtonWasReleased)
- AddBlueButtonWasReleasedHandler(handler: Callable[[Object], CoroutineType]) None
Blue button was unpressed
- Parameters:
handler –
Asynchronous handler function with signature:
sender (Object): the object that triggered the event
Example:
async def OnBlueButtonWasReleased(sender): pass instance.AddBlueButtonWasReleasedHandler(OnBlueButtonWasReleased)
- AddYellowButtonWasReleasedHandler(handler: Callable[[Object], CoroutineType]) None
Yellow button was unpressed
- Parameters:
handler –
Asynchronous handler function with signature:
sender (Object): the object that triggered the event
Example:
async def OnYellowButtonWasReleased(sender): pass instance.AddYellowButtonWasReleasedHandler(OnYellowButtonWasReleased)