Skip to content

Commit 2e830c4

Browse files
author
YHC
committed
Work version
1 parent 222053c commit 2e830c4

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

.main.py.swp

-28 KB
Binary file not shown.

main.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ def showWelcomeAnimation():
214214
}
215215

216216
# adjust playery, playerIndex, basex
217-
if (loopIter + 1) % 2 == 0:
217+
if (loopIter + 1) % 5 == 0:
218218
playerIndex = next(playerIndexGen)
219219
loopIter = (loopIter + 1) % 30
220220
basex = -((-basex + 4) % baseShift)
@@ -269,14 +269,14 @@ def mainGame(movementInfo):
269269
pipeVelX = -4*3
270270

271271
# player velocity, max velocity, downward accleration, accleration on flap
272-
playerVelY = -9 # player's velocity along Y, default same as playerFlapped
273-
playerMaxVelY = 10 # max vel along Y, max descend speed
274-
playerMinVelY = -8 # min vel along Y, max ascend speed
275-
playerAccY = 1 # players downward accleration
272+
playerVelY = -9*3 # player's velocity along Y, default same as playerFlapped
273+
playerMaxVelY = 10*3 # max vel along Y, max descend speed
274+
playerMinVelY = -8*3 # min vel along Y, max ascend speed
275+
playerAccY = 1*3 # players downward accleration
276276
playerRot = 45 # player's rotation
277277
playerVelRot = 3 # angular speed
278-
playerRotThr = 20 # rotation threshold
279-
playerFlapAcc = -9 # players speed on flapping
278+
playerRotThr = 20*3 # rotation threshold
279+
playerFlapAcc = -9*3 # players speed on flapping
280280
playerFlapped = False # True when player flaps
281281

282282
while True:
@@ -299,7 +299,7 @@ def mainGame(movementInfo):
299299
playerMidPos = playerx + IMAGES['player'][0].get_width() / 2
300300
for pipe in upperPipes:
301301
pipeMidPos = pipe['x'] + IMAGES['pipe'][0].get_width() / 2
302-
if pipeMidPos <= playerMidPos < pipeMidPos + 4:
302+
if pipeMidPos <= playerMidPos < pipeMidPos + 4*3:
303303
score += 1
304304
SOUNDS['point'].play()
305305

0 commit comments

Comments
 (0)