Skip to content
Snippets Groups Projects
Commit f99c428f authored by Philipp Stahl's avatar Philipp Stahl
Browse files

Reset game on death

parent e3b7eace
No related branches found
No related tags found
No related merge requests found
...@@ -66,6 +66,13 @@ class Game(arcade.Window): ...@@ -66,6 +66,13 @@ class Game(arcade.Window):
def setup(self): def setup(self):
self.running = 0
self.view_left = 0
self.view_bottom = 0
self.slide = False
arcade.set_viewport(0, SCREEN_WIDTH, 0, SCREEN_HEIGHT)
self.low_x = 0 self.low_x = 0
self.low_y = 0 self.low_y = 0
self.slide = False self.slide = False
...@@ -164,8 +171,8 @@ class Game(arcade.Window): ...@@ -164,8 +171,8 @@ class Game(arcade.Window):
# Collision checking # Collision checking
if arcade.check_for_collision_with_list(self.player_sprite, self.asteroid_list): if arcade.check_for_collision_with_list(self.player_sprite, self.asteroid_list):
self.player_list = arcade.SpriteList() self.setup()
for shoot in self.shoot_list: for shoot in self.shoot_list:
for asteroid in self.asteroid_list: for asteroid in self.asteroid_list:
if arcade.check_for_collision(asteroid, shoot): if arcade.check_for_collision(asteroid, shoot):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment