def __init__(self, location, velocity): WorldObject.__init__(self, 5.9736 * 10 ** 24, location, velocity) self.radius = 6371 self.rotationPeriod = 3600 * 24 self.rotation = 0 self.texture = LoadTexture("envisat-earth.jpg") self.name = "Earth"
def __init__ (self, position, collision, imglist, animated, world, frameDuration = 1, currentImg = None, imgAdjustV = 0, imgAdjustH = 0, visible=True, hsize=1, vsize=1, canHover=False, speed=[0,0], maxSpeed=0): WorldObject.__init__(self, position = position, collision = collision, imglist = imglist, animated = animated, world = world, frameDuration = frameDuration, currentImg = currentImg, imgAdjustV = imgAdjustV, imgAdjustH = imgAdjustH, hsize=hsize, vsize=vsize, visible = visible) self.speed = speed self.maxSpeed = maxSpeed self.updateCollisionBox()
def __init__(self, location, velocity): WorldObject.__init__(self, 1000000, location, velocity) self.thrust = 0 glPushMatrix() glLoadIdentity() glRotatef(180, 0, 1, 0) self.rotationMatrix = glGetFloatv(GL_MODELVIEW_MATRIX) glPopMatrix()
def __init__(self, file=False): #calling parent method WorldObject.__init__(self) self.originalFilename = file self.placeholder = False self.locking = False if file != False: self.loadModel(file)
def __init__(self,file = False): #calling parent method WorldObject.__init__(self) self.originalFilename = file self.placeholder = False self.locking = False if file != False: self.loadModel(file)
def __init__(self, position, color, obj_type="block"): """ @type position: 3-tuple (x, y, z) @param position: Specifying the object's position @type color: 3-tuple (R, G, B) @param color: Specifying the color values @type obj_type: String @param obj_type: This WorldObject's type @return: Block """ WorldObject.__init__(self, position, color, obj_type) # format from ibiblio website # super(Block, self).__init__(self, position, color) #format from lecture self.width = 1.2
def __init__(self, position, points = 100, color = (255,255,0), obj_type = "chest"): ''' @type position: 3-tuple (x, y, z) @param position: Specifying the object's position @type color: 3-tuple (R, G, B) @param color: Specifying the color values @type obj_type: String @param obj_type: This WorldObject's type @return: A Chest object that inherits from WorldObject ''' WorldObject.__init__(self, position, color, obj_type) #format from ibiblio website #super(Block, self).__init__(self, position, color) #format from lecture self.points = 100 self.width=1.5 self.has = False
def __init__(self, position, collision, imglist, animated, world, frameDuration=1, currentImg=None, visible=True): WorldObject.__init__(self, position=position, collision = collision, imglist = imglist, animated = animated, world = None, frameDuration = frameDuration, currentImg = currentImg, visible = visible)
def __init__(self, position, color, door_id, rotation = 0, door_open = False, obj_type = "door"): '''Initialize door @type position: 3-tuple (x, y, z) @param position: Specifying the object's position @type color: 3-tuple (R, G, B) @param color: Specifying the color values @type door_id: Integer @param door_id: The door's id @type door_open: Boolean @param door_open: Specifies if the door is open (unlocked) or not @type obj_type: String @param obj_type: This WorldObject's type ''' #super(Key, self).__init__(self, position, color) WorldObject.__init__(self, position, color, obj_type) #format from ibiblio website self.id = door_id self.rotation = rotation self.opened = door_open self.width = 1.3 self.key = None
def __init__(self, location, velocity): WorldObject.__init__(self, 1000000000, location, velocity) self.name = "Space Station" self.rotationPeriod = 5 * 60 self.rotation = 0
def __init__(self, location, velocity): WorldObject.__init__(self, 1.9891 * 10**30, location, velocity) self.radius = 1392000 self.color = (1., 1., 0.5) self.lightNum = GL_LIGHT0 self.name = "The Sun"
def __init__(self, sublocale, effectType, duration): WorldObject.__init__(self, sublocale, effectType) self.duration = duration
def __init__(self, posX, posY, nameImage, width, height): WorldObject.__init__(self, posX, posY, nameImage, width, height)
def __init__(self): ''' Constructor ''' WorldObject.__init__(CODE_VALID)
def __init__(self, sublocale): WorldObject.__init__(self, sublocale, 'Structure') self.ID = '' self.produces = [] self.consumes = []