Did the "LEGO Island fix"
This commit is contained in:
4
game.py
4
game.py
@ -67,7 +67,7 @@ class Game(gameUtils.Game):
|
|||||||
# How long (in seconds) it takes for the wheel to go back to stationary
|
# How long (in seconds) it takes for the wheel to go back to stationary
|
||||||
self.WHEEL_SPIN_FADE_OUT = 2.5
|
self.WHEEL_SPIN_FADE_OUT = 2.5
|
||||||
# The minimum and maximum speeds of the wheel
|
# The minimum and maximum speeds of the wheel
|
||||||
self.WHEEL_SPEED_RANGE = [5, 15]
|
self.WHEEL_SPEED_RANGE = [360, 550]
|
||||||
# Holds the decided speed of the wheel
|
# Holds the decided speed of the wheel
|
||||||
self.wheelSpinSpeed = 0
|
self.wheelSpinSpeed = 0
|
||||||
# When the wheel started its spin animation
|
# When the wheel started its spin animation
|
||||||
@ -138,7 +138,7 @@ class Game(gameUtils.Game):
|
|||||||
else:
|
else:
|
||||||
speed = translate(animTime, self.WHEEL_SPIN_FADE_IN, self.WHEEL_SPIN_FADE_IN+self.WHEEL_SPIN_FADE_OUT, self.wheelSpinSpeed, 0)
|
speed = translate(animTime, self.WHEEL_SPIN_FADE_IN, self.WHEEL_SPIN_FADE_IN+self.WHEEL_SPIN_FADE_OUT, self.wheelSpinSpeed, 0)
|
||||||
|
|
||||||
self.wheelRotation += speed
|
self.wheelRotation += speed * self.timeDelta
|
||||||
self.wheelRotation %= 360
|
self.wheelRotation %= 360
|
||||||
print(self.wheelRotation)
|
print(self.wheelRotation)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user