更改小推车存活范围
This commit is contained in:
parent
cc70ff46f7
commit
700ebaa7c4
@ -24,7 +24,7 @@ class Car(pg.sprite.Sprite):
|
|||||||
self.current_time = game_info[c.CURRENT_TIME]
|
self.current_time = game_info[c.CURRENT_TIME]
|
||||||
if self.state == c.WALK:
|
if self.state == c.WALK:
|
||||||
self.rect.x += 4
|
self.rect.x += 4
|
||||||
if self.rect.x > c.SCREEN_WIDTH:
|
if self.rect.x > c.SCREEN_WIDTH + 40:
|
||||||
self.dead = True
|
self.dead = True
|
||||||
|
|
||||||
def setWalk(self):
|
def setWalk(self):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user