Skip to content
Snippets Groups Projects
Commit 1edbea33 authored by Jakob Kirsch's avatar Jakob Kirsch
Browse files

add laser

parent 0df1b022
Branches
No related tags found
No related merge requests found
......@@ -149,8 +149,8 @@ class Game(arcade.Window):
if key == CONTROLS["shoot"]:
shoot = arcade.Sprite("images/laser.png", 0.05)
shoot.change_y = SPEED * math.cos(math.radians(self.player_sprite.angle))
shoot.change_x = -SPEED * math.sin(math.radians(self.player_sprite.angle))
shoot.change_y = SPEED * math.cos(math.radians(self.player_sprite.angle)) * 1.5
shoot.change_x = -SPEED * math.sin(math.radians(self.player_sprite.angle)) * 1.5
shoot.angle = self.player_sprite.angle
shoot.center_x = self.player_sprite.center_x
shoot.center_y = self.player_sprite.center_y
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment