예제 #1
0
 def add_decor(self, entity:Entity):
     if entity.blocking:
         self.map.block(entity.x, entity.y, entity.transparent)
     entity.add_map(self.map)
     entity.add_level(self)
     self.map.decor_console.put_char(entity.x, entity.y, entity.char)
     self.map.decor_console.fg[entity.x][entity.y] = entity.fg
     self.map.decor_console.bg[entity.x][entity.y] = entity.bg
예제 #2
0
 def add_entity(self, entity:Entity):
     if entity.blocking:
         self.map.block(entity.x, entity.y, entity.transparent)
     entity.add_map(self.map)
     entity.add_level(self)
     self.entities.append(entity)
     self.__buffer[entity.x][entity.y][1] = entity
     entity.target_console.put_char(entity.x, entity.y, entity.char)
     entity.target_console.fg[entity.x][entity.y] = entity.fg
     entity.target_console.bg[entity.x][entity.y] = entity.bg