Update pygameControls/sony_playstation3_controller.py
This commit is contained in:
@@ -1,10 +1,11 @@
|
|||||||
from pygameControls.controlsbase import ControlsBase
|
from pygameControls.controlsbase import ControlsBase
|
||||||
|
|
||||||
class SonyPlayStation3Controller(ControlsBase):
|
class SonyPlayStation3Controller(ControlsBase):
|
||||||
def __init__(self, joy):
|
def __init__(self, joy, connection_type):
|
||||||
self.device = joy
|
self.device = joy
|
||||||
self.instance_id: int = self.device.get_instance_id()
|
self.instance_id: int = self.device.get_instance_id()
|
||||||
self.name = self.device.get_name()
|
self.name = self.device.get_name()
|
||||||
|
self.connection_type = connection_type
|
||||||
self.guid = self.device.get_guid()
|
self.guid = self.device.get_guid()
|
||||||
self.numaxis: int = self.device.get_numaxes()
|
self.numaxis: int = self.device.get_numaxes()
|
||||||
self.axis: list = [self.device.get_axis(a) for a in range(self.numaxis)]
|
self.axis: list = [self.device.get_axis(a) for a in range(self.numaxis)]
|
||||||
|
Reference in New Issue
Block a user