def draw(unit): cx, cy = unit_functions.get_cx_cy(unit.x, unit.y) unit.image.opacify(unit.opacity) unit.image.clip_draw( int(unit.frame) * unit.IMAGE_SIZE, unit.IMAGE_SIZE * 0, unit.IMAGE_SIZE, unit.IMAGE_SIZE, cx, cy)
def draw(self): cx, cy = unit_functions.get_cx_cy(self.x, self.true_y) self.image.draw(cx, cy, self.IMAGE_SIZE, self.IMAGE_SIZE) if self.is_collied is False: self.green_cell.draw(cx, cy, self.IMAGE_SIZE, self.IMAGE_SIZE) else: self.red_cell.draw(cx, cy, self.IMAGE_SIZE, self.IMAGE_SIZE)
def draw(unit): cx, cy = unit_functions.get_cx_cy(unit.x, unit.y) if math.cos(unit.dir) > 0: unit.image.clip_draw( int(unit.frame) * unit.IMAGE_SIZE, unit.IMAGE_SIZE * 4, unit.IMAGE_SIZE, unit.IMAGE_SIZE, cx, cy) else: unit.image.clip_draw( int(unit.frame) * unit.IMAGE_SIZE, unit.IMAGE_SIZE * 5, unit.IMAGE_SIZE, unit.IMAGE_SIZE, cx, cy)
def draw(unit): cx, cy = unit_functions.get_cx_cy(unit.x, unit.y) if unit.dir == 1: unit.image.clip_draw( int(unit.frame) * unit.IMAGE_SIZE, unit.IMAGE_SIZE * 0, unit.IMAGE_SIZE, unit.IMAGE_SIZE, cx, cy) else: unit.image.clip_draw( int(unit.frame) * unit.IMAGE_SIZE, unit.IMAGE_SIZE * 1, unit.IMAGE_SIZE, unit.IMAGE_SIZE, cx, cy)
def draw(unit): cx, cy = unit_functions.get_cx_cy(unit.x, unit.y) if unit.is_attacked: if unit.dir == 1: unit.image.clip_draw( int(unit.frame) * unit.IMAGE_SIZE, unit.IMAGE_SIZE * 2, unit.IMAGE_SIZE, unit.IMAGE_SIZE, cx, cy) else: unit.image.clip_draw( int(unit.frame) * unit.IMAGE_SIZE, unit.IMAGE_SIZE * 3, unit.IMAGE_SIZE, unit.IMAGE_SIZE, cx, cy) else: if unit.dir == 1: unit.image.clip_draw( int(unit.frame) * unit.IMAGE_SIZE, unit.IMAGE_SIZE * 4, unit.IMAGE_SIZE, unit.IMAGE_SIZE, cx, cy) else: unit.image.clip_draw( int(unit.frame) * unit.IMAGE_SIZE, unit.IMAGE_SIZE * 5, unit.IMAGE_SIZE, unit.IMAGE_SIZE, cx, cy)
def draw(unit): cx, cy = unit_functions.get_cx_cy(unit.x, unit.y) unit.image.composite_draw( unit.dir, '', cx, cy, unit.IMAGE_SIZE, unit.IMAGE_SIZE)
def draw(unit): cx, cy = unit_functions.get_cx_cy(unit.x, unit.y) if unit.is_foe: if (unit.hp / unit.max_hp) * 10 > 9: unit.image.clip_draw(50, 5 * 9, 50, 5, cx, cy) elif (unit.hp / unit.max_hp) * 10 > 8: unit.image.clip_draw(50, 5 * 8, 50, 5, cx, cy) elif (unit.hp / unit.max_hp) * 10 > 7: unit.image.clip_draw(50, 5 * 7, 50, 5, cx, cy) elif (unit.hp / unit.max_hp) * 10 > 6: unit.image.clip_draw(50, 5 * 6, 50, 5, cx, cy) elif (unit.hp / unit.max_hp) * 10 > 5: unit.image.clip_draw(50, 5 * 5, 50, 5, cx, cy) elif (unit.hp / unit.max_hp) * 10 > 4: unit.image.clip_draw(50, 5 * 4, 50, 5, cx, cy) elif (unit.hp / unit.max_hp) * 10 > 3: unit.image.clip_draw(50, 5 * 3, 50, 5, cx, cy) elif (unit.hp / unit.max_hp) * 10 > 2: unit.image.clip_draw(50, 5 * 2, 50, 5, cx, cy) elif (unit.hp / unit.max_hp) * 10 > 1: unit.image.clip_draw(50, 5 * 1, 50, 5, cx, cy) else: unit.image.clip_draw(50, 5 * 0, 50, 5, cx, cy) else: if (unit.hp / unit.max_hp) * 10 > 9: unit.image.clip_draw(0, 5 * 9, 50, 5, cx, cy) elif (unit.hp / unit.max_hp) * 10 > 8: unit.image.clip_draw(0, 5 * 8, 50, 5, cx, cy) elif (unit.hp / unit.max_hp) * 10 > 7: unit.image.clip_draw(0, 5 * 7, 50, 5, cx, cy) elif (unit.hp / unit.max_hp) * 10 > 6: unit.image.clip_draw(0, 5 * 6, 50, 5, cx, cy) elif (unit.hp / unit.max_hp) * 10 > 5: unit.image.clip_draw(0, 5 * 5, 50, 5, cx, cy) elif (unit.hp / unit.max_hp) * 10 > 4: unit.image.clip_draw(0, 5 * 4, 50, 5, cx, cy) elif (unit.hp / unit.max_hp) * 10 > 3: unit.image.clip_draw(0, 5 * 3, 50, 5, cx, cy) elif (unit.hp / unit.max_hp) * 10 > 2: unit.image.clip_draw(0, 5 * 2, 50, 5, cx, cy) elif (unit.hp / unit.max_hp) * 10 > 1: unit.image.clip_draw(0, 5 * 1, 50, 5, cx, cy) else: unit.image.clip_draw(0, 5 * 0, 50, 5, cx, cy)