def main(): globs.init_globals() w = NodeWindow() w.fps = 60 w.node, _ = deserialize_node(""" HintedLayoutNode [960,320] """) globs.next_level() init_draw(w) init_physics(w) w.launch_listener(record_key_presses) globs.background_music_player.play() pyglet.app.run()
def init_game(self, player1, player2, asteroids, planets): init_labels(self) init_physics() if player1 == True: init_ship(self, "ship.png") if player2 == True: init_ship(self, "ship2.png", player2=True) if planets == 1: init_planet(self, pos=(2,2)) if asteroids == 1: asteroids = 10 else: asteroids = 0 # init_planet(self, pos=(2,2)) # init_planet(self, pos=(-2,-2)) # init_planet(self, pos=(12,8)) # init_planet(self, pos=(-12,-8)) spawnAsteroids(self, asteroids)
def init_physics(self): self.space = init_physics()