fix rotated shift movement
This commit is contained in:
parent
d62f8876e5
commit
9068830c41
2
config
2
config
|
@ -18,7 +18,7 @@ title-font-path = font/Oxygen.ttf
|
|||
scoreboard-font-path = font/terminus/Terminus.ttf
|
||||
initials-font = font/terminus/Terminus-Bold.ttf
|
||||
show-framerate = yes
|
||||
rotate = no
|
||||
rotate = yes
|
||||
|
||||
[mouse]
|
||||
visible = no
|
||||
|
|
|
@ -94,10 +94,8 @@ class ElectricSieve(Game):
|
|||
"""
|
||||
cancel = not (GPIO.input(pin) == GPIO.LOW)
|
||||
if pin == ElectricSieve.PIN_BUTTON_LEFT:
|
||||
print("left")
|
||||
self.input.post_command("left", cancel=cancel)
|
||||
elif pin == ElectricSieve.PIN_BUTTON_RIGHT:
|
||||
print("right")
|
||||
self.input.post_command("right", cancel=cancel)
|
||||
self.input.post_any_command(id=pin, cancel=cancel)
|
||||
|
||||
|
@ -298,7 +296,7 @@ class Shift(GameChild):
|
|||
self.time = max(self.time - self.timer.get_last_frame_duration(), least)
|
||||
|
||||
def get_change(self):
|
||||
return self.nodeset.get_y(self.time) * self.direction
|
||||
return self.nodeset.get_y(self.time) * (self.direction if not self.get_game().rotated() else -self.direction)
|
||||
|
||||
|
||||
class Scoreboard(GameChild):
|
||||
|
|
Loading…
Reference in New Issue