删除冗余
This commit is contained in:
parent
5b7f00f9a2
commit
782a3a1a28
@ -22,9 +22,7 @@ class Car(pg.sprite.Sprite):
|
|||||||
|
|
||||||
def update(self, game_info):
|
def update(self, game_info):
|
||||||
self.current_time = game_info[c.CURRENT_TIME]
|
self.current_time = game_info[c.CURRENT_TIME]
|
||||||
if self.state == c.IDLE:
|
if self.state == c.WALK:
|
||||||
pass
|
|
||||||
elif 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:
|
||||||
self.dead = True
|
self.dead = True
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user