thiiiiings
This commit is contained in:
6
events/BonusTimeEvent.py
Normal file
6
events/BonusTimeEvent.py
Normal file
@@ -0,0 +1,6 @@
|
||||
class BonusTimeEvent:
|
||||
def __init__(self, playerState):
|
||||
self.playerState = playerState
|
||||
|
||||
def trigger(self):
|
||||
self.playerState().addBonusTimeSecond()
|
||||
6
events/EndGameEvent.py
Normal file
6
events/EndGameEvent.py
Normal file
@@ -0,0 +1,6 @@
|
||||
class EndGameEvent:
|
||||
def __init__(self, flipper):
|
||||
self.flipper = flipper
|
||||
|
||||
def trigger(self):
|
||||
self.flipper.deactivate()
|
||||
6
events/EndOfBallEvent.py
Normal file
6
events/EndOfBallEvent.py
Normal file
@@ -0,0 +1,6 @@
|
||||
class EndOfBallEvent:
|
||||
def __init__(self, playerState):
|
||||
self.playerState = playerState
|
||||
|
||||
def trigger(self):
|
||||
self.playerState().removeBall()
|
||||
8
events/EnterUpperPlayfieldEvent.py
Normal file
8
events/EnterUpperPlayfieldEvent.py
Normal file
@@ -0,0 +1,8 @@
|
||||
class EnterUpperPlayfieldEvent:
|
||||
def __init__(self, playerState, flipper):
|
||||
self.playerState = playerState
|
||||
self.flipper = flipper
|
||||
|
||||
def trigger(self):
|
||||
self.flipper.activate()
|
||||
self.playerState().startUpperPlayfieldTimer()
|
||||
6
events/FlapEvent.py
Normal file
6
events/FlapEvent.py
Normal file
@@ -0,0 +1,6 @@
|
||||
class FlapEvent:
|
||||
def __init__(self, flapSolenoid):
|
||||
self.flapSolenoid = flapSolenoid
|
||||
|
||||
def trigger(self):
|
||||
self.flapSolenoid.trigger()
|
||||
8
events/LeaveUpperPlayfieldEvent.py
Normal file
8
events/LeaveUpperPlayfieldEvent.py
Normal file
@@ -0,0 +1,8 @@
|
||||
class LeaveUpperPlayfieldEvent:
|
||||
def __init__(self, playerState, flipper):
|
||||
self.playerState = playerState
|
||||
self.flipper = flipper
|
||||
|
||||
def trigger(self):
|
||||
self.flipper.deactivate()
|
||||
self.playerState().stopUpperPlayfieldTimer()
|
||||
7
events/LeftFlapEvent.py
Normal file
7
events/LeftFlapEvent.py
Normal file
@@ -0,0 +1,7 @@
|
||||
from events.FlapEvent import FlapEvent
|
||||
from solenoids.LeftFlapSolenoid import LeftFlapSolenoid
|
||||
|
||||
|
||||
class LeftFlapEvent(FlapEvent):
|
||||
def __init__(self):
|
||||
super(LeftFlapSolenoid())
|
||||
6
events/PointEvent.py
Normal file
6
events/PointEvent.py
Normal file
@@ -0,0 +1,6 @@
|
||||
class PointEvent:
|
||||
def __init__(self, playerState):
|
||||
self.playerState = playerState
|
||||
|
||||
def trigger(self, target):
|
||||
self.playerState().addPoints(target.points)
|
||||
7
events/RightFlapEvent.py
Normal file
7
events/RightFlapEvent.py
Normal file
@@ -0,0 +1,7 @@
|
||||
from events.FlapEvent import FlapEvent
|
||||
from solenoids.RightFlapSolenoid import RightFlapSolenoid
|
||||
|
||||
|
||||
class RightFlapEvent(FlapEvent):
|
||||
def __init__(self):
|
||||
super(RightFlapSolenoid())
|
||||
9
events/RightKickerEvent.py
Normal file
9
events/RightKickerEvent.py
Normal file
@@ -0,0 +1,9 @@
|
||||
from solenoids.RightKickerSolenoid import RightKickerSolenoid
|
||||
|
||||
|
||||
class RightKickerEvent:
|
||||
def __init__(self):
|
||||
self.rightKickerSolenoid = RightKickerSolenoid()
|
||||
|
||||
def trigger(self):
|
||||
self.rightKickerSolenoid.trigger()
|
||||
10
events/StartGameEvent.py
Normal file
10
events/StartGameEvent.py
Normal file
@@ -0,0 +1,10 @@
|
||||
from solenoids.OutHoleSolenoid import OutHoleSolenoid
|
||||
|
||||
class StartGameEvent:
|
||||
def __init__(self, flipper):
|
||||
self.flipper = flipper
|
||||
self.outHoleSolenoid = OutHoleSolenoid()
|
||||
|
||||
def trigger(self):
|
||||
self.flipper.activate()
|
||||
self.outHoleSolenoid.trigger()
|
||||
6
events/UpperPlayfieldTimeEvent.py
Normal file
6
events/UpperPlayfieldTimeEvent.py
Normal file
@@ -0,0 +1,6 @@
|
||||
class UpperPlayfieldTimeEvent:
|
||||
def __init__(self, playerState):
|
||||
self.playerState = playerState
|
||||
|
||||
def trigger(self):
|
||||
self.playerState().addUpperPlayfieldTime(1)
|
||||
BIN
events/__pycache__/EndOfBallEvent.cpython-38.pyc
Normal file
BIN
events/__pycache__/EndOfBallEvent.cpython-38.pyc
Normal file
Binary file not shown.
BIN
events/__pycache__/EnterUpperPlayfieldEvent.cpython-38.pyc
Normal file
BIN
events/__pycache__/EnterUpperPlayfieldEvent.cpython-38.pyc
Normal file
Binary file not shown.
BIN
events/__pycache__/FlapEvent.cpython-38.pyc
Normal file
BIN
events/__pycache__/FlapEvent.cpython-38.pyc
Normal file
Binary file not shown.
BIN
events/__pycache__/LeftFlapEvent.cpython-38.pyc
Normal file
BIN
events/__pycache__/LeftFlapEvent.cpython-38.pyc
Normal file
Binary file not shown.
BIN
events/__pycache__/PointEvent.cpython-38.pyc
Normal file
BIN
events/__pycache__/PointEvent.cpython-38.pyc
Normal file
Binary file not shown.
BIN
events/__pycache__/RightFlapEvent.cpython-38.pyc
Normal file
BIN
events/__pycache__/RightFlapEvent.cpython-38.pyc
Normal file
Binary file not shown.
BIN
events/__pycache__/RightKickerEvent.cpython-38.pyc
Normal file
BIN
events/__pycache__/RightKickerEvent.cpython-38.pyc
Normal file
Binary file not shown.
BIN
events/__pycache__/StartGameEvent.cpython-38.pyc
Normal file
BIN
events/__pycache__/StartGameEvent.cpython-38.pyc
Normal file
Binary file not shown.
Reference in New Issue
Block a user