Exemplo n.º 1
0
    def draw_in_buffer_need_camera(self, camera: Camera):
        will_x = int(self.x) - int(camera.look_x) + int(
            console.get_max_width() / 2)
        will_y = int(self.y) - int(camera.look_y) + int(
            console.get_max_height() / 2)

        if will_x >= 0 and will_y >= 0 and will_x < console.get_max_width(
        ) and will_y < console.get_max_height() - 1:
            console.move_buffer_cursor(int(will_x), int(will_y))
            console.add_str(self.style, self.forecolor, self.backcolor)
Exemplo n.º 2
0
    def draw_need_camera(self, camera: Camera):
        will_x = int(self.x) - int(camera.look_x) + int(
            console.get_max_width() / 2)
        will_y = int(self.y) - int(camera.look_y) + int(
            console.get_max_height() / 2)

        if will_x >= 0 and will_y >= 0 and will_x < console.get_max_width(
        ) and will_y < console.get_max_height() - 1:
            console.move_cursor(int(will_x), int(will_y))
            print(self.style)
Exemplo n.º 3
0
    def draw_in_buffer(self):
        #console.move_cursor(self.x,self.y);
        #print(self.style);

        if self.x >= 0 and self.y >= 0 and self.x < console.get_max_width(
        ) and self.y < console.get_max_height() - 1:
            console.move_buffer_cursor(int(self.x), int(self.y))
            console.add_str(self.style, self.forecolor, self.backcolor)
Exemplo n.º 4
0
    def draw_in_buffer_need_camera(self, camera: Camera):
        will_x = int(self.x) - int(camera.look_x) + int(
            console.get_max_width() / 2)
        will_y = int(self.y) - int(camera.look_y) + int(
            console.get_max_height() / 2)

        console.move_buffer_cursor(int(will_x), int(will_y))
        console.add_str(self._style)
Exemplo n.º 5
0
def game_clear():
    console.move_cursor(0, 0)

    i = 0
    while i < console.get_max_height():
        print(
            "                                                                            "
        )
        i += 1
Exemplo n.º 6
0
 def draw(self):
     if int(self.x) >= 0 and int(self.y) >= 0 and int(
             self.x) < console.get_max_width() and int(
                 self.y) < console.get_max_height() - 1:
         console.move_cursor(int(self.x), int(self.y))
         print(self.style)