def draw(self): # 本体のドーナツ部 pyxel.blt(self.x, self.y, 2, 64, 48, 80, 80, gcommon.TP_COLOR) # 中心の玉 for i in range(4): pyxel.blt( self.x + 39.5 + math.cos(self.rad + math.pi / 2 * i) * self.centerRadius - 7.5, self.y + 39.5 + math.sin(self.rad + math.pi / 2 * i) * self.centerRadius - 7.5, 2, 0, 32, 16, 16, gcommon.TP_COLOR) # Finに隠れた砲台 for i in range(8): if i & 1 == 0: pyxel.blt( self.x + 39.5 + math.cos(self.rad + math.pi / 4 * i) * 32 - 7.5, self.y + 39.5 + math.sin(self.rad + math.pi / 4 * i) * 32 - 7.5, 2, 16, 32, 16, 16, gcommon.TP_COLOR) else: pyxel.blt( self.x + 39.5 + math.cos(self.rad + math.pi / 4 * i) * 32 - 7.5, self.y + 39.5 + math.sin(self.rad + math.pi / 4 * i) * 32 - 7.5, 2, 32, 32, 16, 16, gcommon.TP_COLOR) for polygons in self.xpolygonsList: Drawing.drawPolygons(polygons)
def draw(self): if self.cnt & 2 == 0: self.xpolygonList1.polygons[0].clr = 9 self.xpolygonList2.polygons[0].clr = 10 self.xpolygonList3.polygons[0].clr = 7 else: self.xpolygonList1.polygons[0].clr = 8 self.xpolygonList2.polygons[0].clr = 9 self.xpolygonList3.polygons[0].clr = 10 Drawing.drawPolygons(self.xpolygonList1) Drawing.drawPolygons(self.xpolygonList2) Drawing.drawPolygons(self.xpolygonList3)
def draw(self): if self.state == 0: pyxel.line(self.sx, self.sy, self.ex, self.ey, pyxel.frame_count & 15) else: if self.xpolygonList1 == None: return if self.cnt & 2 == 0: self.xpolygonList1.polygons[0].clr = 9 self.xpolygonList2.polygons[0].clr = 10 self.xpolygonList3.polygons[0].clr = 7 else: self.xpolygonList1.polygons[0].clr = 8 self.xpolygonList2.polygons[0].clr = 9 self.xpolygonList3.polygons[0].clr = 10 Drawing.drawPolygons(self.xpolygonList1) Drawing.drawPolygons(self.xpolygonList2) Drawing.drawPolygons(self.xpolygonList3)
def draw(self): Drawing.drawPolygons(gcommon.getAnglePolygons([self.x, self.y], self.polygons, [0, 7], -self.dr))
def draw(self): Drawing.drawPolygons(gcommon.getAnglePolygons([self.x, self.y], self.polygons, [11, 3], gcommon.atan_table[self.dr]))