def __init__(self, rectPos, bodyPos, orientation, friendlyFire, seconds, identifier, collisionType): pygame.sprite.Sprite.__init__(self) Physical.__init__(self, bodyPos, orientation, velocity=70, mass=10, elasticity=0.9, shape={"circle": 10}, maxVel=200, collisionType=collisionType) self.identifier = identifier imgPath = os.path.dirname(os.path.dirname( os.path.realpath( __file__ ) ) ) + "/images/arrow.png" self.image = pygame.image.load(imgPath) self.rect = self.image.get_rect() self.rect.center = rectPos self.lastPos = bodyPos self.distTraveled = 0 self.friendlyFire = friendlyFire self.seconds = seconds #self.rotate(orientation) self.applyImpulse()
def __init__(self, recPos, worldPos, resolution, collisionType): pygame.sprite.Sprite.__init__(self) Physical.__init__(self, worldPos, orientation=0, velocity=50, mass=10, elasticity=0.65, shape={"circle": 20}, maxVel=200, angularVel=0.087, collisionType = collisionType) imgPath = os.path.dirname(os.path.dirname( os.path.realpath( __file__ ) ) ) + "/images/ship.gif" self.origImg = pygame.image.load(imgPath) self.image = pygame.image.load(imgPath) self.rect = self.image.get_rect() self.rect.center = recPos self.resolution = resolution self.direction= Vec2d(0,0) self.observers = [] self.coolDowns = [False] self.alive = True self.hp = 100
def __init__(self, rectPos, bodyPos, orientation, friendlyFire, seconds, identifier, collisionType): pygame.sprite.Sprite.__init__(self) Physical.__init__(self, bodyPos, orientation, velocity=70, mass=10, elasticity=0.9, shape={"circle": 10}, maxVel=200, collisionType=collisionType) self.identifier = identifier imgPath = os.path.dirname(os.path.dirname( os.path.realpath(__file__))) + "/images/arrow.png" self.image = pygame.image.load(imgPath) self.rect = self.image.get_rect() self.rect.center = rectPos self.lastPos = bodyPos self.distTraveled = 0 self.friendlyFire = friendlyFire self.seconds = seconds #self.rotate(orientation) self.applyImpulse()
def __init__(self, x, y): Physical.__init__(self, x, y, 0) return
def __init__( self, x, y ): Point2D.__init__( self, x, y ) Physical.__init__( self ) Drawable.__init__( self )
def __init__(self, x, y, r): Physical.__init__(self, x, y, r) return