added shooting
This commit is contained in:
parent
7b27ac29e8
commit
cf21f5ff0a
4 changed files with 38 additions and 1 deletions
16
shot.py
Normal file
16
shot.py
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import circleshape
|
||||
import pygame
|
||||
import constants
|
||||
|
||||
class Shot(circleshape.CircleShape):
|
||||
|
||||
containers = []
|
||||
|
||||
def __init__(self, x, y):
|
||||
super().__init__(x,y,constants.SHOT_RADIUS)
|
||||
|
||||
def draw(self,screen):
|
||||
pygame.draw.circle(screen,(255,255,255),self.position,self.radius,2)
|
||||
|
||||
def update(self, dt):
|
||||
self.position += self.velocity * dt
|
||||
Loading…
Add table
Add a link
Reference in a new issue