def __init__(self, ID, path): Room.__init__(self, ID, path) self.set_description( 'terrifying dark cave mouth', 'This is one of the most scary caves you have ever been in. You are anxiously looking around to see if there are any monsters.' ) self.add_adjectives('scary', 'dark', 'terrifying') self.in_entry_user = 0 self.last_cons = None
def __init__(self, default_name, pref_id): Room.__init__(self, default_name, pref_id=pref_id) self.set_description( 'crude pit', 'This is a crude pit. It is about 1/10 filled with water.') self.indoor = True self.has_player = False self.water_level_den = 10 Thing.game.register_heartbeat(self) self.player_done = False
def __init__(self): self.bvertices = Bullet.grid self.bedges = Bullet.edges self.thetax = 0 self.thetay = 0 self.bvel = 80 self.pos = [0, 0, 0] Room.__init__(self)
def __init__(self): Room.__init__(self) # make the walls (x_pos, y_pos, width, height) # This is a list of walls. Each is in the form [x, y, width, height] walls = [[0, 0, 20, 250, WHT], [0, 350, 20, 250, WHT], [780, 0, 20, 250, WHT], [780, 350, 20, 250, WHT], [20, 0, 760, 20, WHT], [20, 580, 760, 20, WHT], [390, 50, 20, 500, BLU] ] # loop through walls list for item in walls: wall = Wall(item[0], item[1], item[2], item[3], item[4]) self.wall_list.add(wall)
def __init__(self, game): """ Initialize the room. Args: game (class<game>): Game class """ pygame.sprite.Sprite.__init__(self) Room.__init__(self, "Titlescreen") self.game = game # Text self.createFont("Title", "dejavusansmono", 50, (400, 300), "Titlescreen", (0, 255, 255)) height = self.fonts["Title"]["object"].get_height() self.createFont("N", "dejavusansmono", 40, (400, 300 + height), "Press N to go to next level.", (255, 255, 255)) # Keybinds self.createKeybind(pygame.K_n, self.go_to_level) self.createTimer("N Press1", 900)
def __init__(self): Room.__init__(self) self.pvertices = [[Room.x, 0, Room.z], [Room.x, 0, -Room.z], [-Room.x, 0, -Room.z], [-Room.x, 0, Room.z], [0, Room.y, 0]] self.pedges = ((0, 1), (1, 2), (2, 3), (3, 0), (0, 4), (1, 4), (2, 4), (3, 4)) self.psurfaces = ((1, 0, 4), (2, 1, 4), (3, 2, 4), (3, 0, 4)) self.square = 2 self.pvertices = np.array( np.multiply(np.array(self.pvertices), self.mul)) self.pvertices = np.array( np.multiply(np.array(self.pvertices), (self.square, 1, self.square))) Pyramid.randtransform(self) self.positionp = [ -self.pvertices[4][0], self.pvertices[4][1], -self.pvertices[4][2] ]
def __init__(self): Room.__init__(self) walls = [[0, 0, 20, 250, PUR], [0, 350, 20, 250, PUR], [780, 0, 20, 250, PUR], [780, 350, 20, 250, PUR], [20, 0, 760, 20, PUR], [20, 580, 760, 20, PUR] ] # loop through walls list for item in walls: wall = Wall(item[0], item[1], item[2], item[3], item[4]) self.wall_list.add(wall) for x in xrange(100, 800, 100): for y in xrange(50, 451, 300): wall = Wall(x, y, 20, 200, RED) self.wall_list.add(wall) for x in xrange(150, 700, 100): wall = Wall(x, 200, 20, 200, WHT) self.wall_list.add(wall)
def __init__(self, ID, path, monster_storage): Room.__init__(self, ID, path, light=0) self.monster_storage = monster_storage self.released_monster = False self.create_cave_moss() self.create_gold()
def __init__(self, room_type, name): Room.__init__(self, room_type, name) self.maximum_number_of_occupants = 6
def __init__(self, name, postion, dinner_price): Room.__init__(self, name, postion) self._dinner_price = dinner_price