added astroids and astroid field
This commit is contained in:
parent
9365e50c64
commit
f0d7ef7cce
4 changed files with 89 additions and 0 deletions
16
asteroid.py
Normal file
16
asteroid.py
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import circleshape
|
||||
import pygame
|
||||
import constants
|
||||
|
||||
class Asteroid(circleshape.CircleShape):
|
||||
|
||||
containers = []
|
||||
|
||||
def __init__(self, x, y, radius):
|
||||
super().__init__(x,y,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