def checkDead() : # 检测小鸟是否死亡 """获取上下管道矩形""" upRect = pygame.Rect(Pipelime.wallx, -300, Pipelime.pineUp.get_width(), Pipelime.pineUp.get_height()) downRect = pygame.Rect(Pipelime.wallx, 500, Pipelime.pineDown.get_width(), Pipelime.pineDown.get_height()) # 检测矩形碰撞 if upRect.colliderect(Bird.birdRect) or downRect.colliderect((Bird.birdRect): Bird.dead = True
-------------------------------------------------------------------------------------------------------------------------------------------------------
File "D:/PYTHON/pythonProject/pygame开始/开放FlappyBird游戏.py", line 80
if upRect.colliderect(Bird.birdRect) or downRect.colliderect((Bird.birdRect):
^
SyntaxError: invalid syntax
按视频操作的啊,眼睛都花了。。。初学啊