Example #1
0
    def draw(self):
        x = self.PosX + self.PosAdjX
        y = self.PosY + self.PosAdjY

        pyxel.blt(x, y, 0, 0, 72, 16, 16, 0)

        # ミサイル
        if self.St0 == 0:
            # ミサイル発射までは表示
            x = self.PosX - 10 - 4
            y = self.PosY - 8
            pyxel.blt(x, y, 0, 16, 72, 8, 16, 0)

            x = self.PosX + 10 - 4
            y = self.PosY - 8
            pyxel.blt(x, y, 0, 16, 72, 8, 16, 0)
        elif self.St0 == 2:
            # 発射後の炎
            if self.TmpCtr > 0:
                if pyxel.frame_count & 0x04:
                    pyxel.blt(self.PosX + 6, self.PosY + 4, 0, 32, 72, 8, 8, 0)

                    pyxel.blt(self.PosX - 14, self.PosY + 4, 0, 32, 72, -8, 8,
                              0)
                else:
                    pyxel.blt(self.PosX + 6, self.PosY + 4, 0, 32, 80, 8, 8, 0)

                    pyxel.blt(self.PosX - 14, self.PosY + 4, 0, 32, 80, -8, 8,
                              0)

        # 中心の表示
        shooting_sub.DebugDrawPosHitRect(self)
Example #2
0
    def draw(self):
        x = self.PosX + self.PosAdjX
        y = self.PosY + self.PosAdjY

        if self.Id0 == 0:
            if self.St1 == 0:
                pyxel.blt(x, y, 0, 0, 56, 12, 12, 0)
            else:
                self.PtnTime -= 1
                if self.PtnTime <= 0:
                    self.PtnTime = 7

                    if self.St1 == 1:
                        self.PtnNo += 1
                        if self.PtnNo >= 7:
                            self.PtnNo = 0
                    else:
                        self.PtnNo -= 1
                        if self.PtnNo < 0:
                            self.PtnNo = 7

                pyxel.blt(x, y, 0, 16 * self.PtnNo, 56, 12, 12, 0)

        elif self.Id0 == 1:
            if pyxel.frame_count & 0x08:
                pyxel.blt(x, y, 0, 40, 72, 12, 12, 0)
            else:
                pyxel.blt(x, y, 0, 56, 72, 12, 12, 0)

        # 中心の表示
        shooting_sub.DebugDrawPosHitRect(self)
Example #3
0
    def draw(self):
        x = self.PosX + self.PosAdjX
        y = self.PosY + self.PosAdjY
        pyxel.blt(x, y, 0, 0, 16, 6, 6, 0)

        # 中心の表示
        shooting_sub.DebugDrawPosHitRect(self)
Example #4
0
    def draw(self):
        x = self.PosX + self.PosAdjX
        y = self.PosY + self.PosAdjY

        if self.PlDir == 0:
            pyxel.blt(x, y, 0, 16, 0, 16, 16, 0)  # 前

            if pyxel.frame_count & 0x04:
                pyxel.blt(self.PosX + 0, self.PosY + 8, 0, 8, 16, 6, 6, 0)
                pyxel.blt(self.PosX - 6, self.PosY + 8, 0, 8, 16, -6, 6, 0)
            else:
                pyxel.blt(self.PosX + 0, self.PosY + 8, 0, 8, 24, 6, 6, 0)
                pyxel.blt(self.PosX - 6, self.PosY + 8, 0, 8, 24, -6, 6, 0)
        else:
            if self.PlDir == 1:
                pyxel.blt(x, y, 0, 0, 0, 16, 16, 0)  # 左
            else:
                pyxel.blt(x, y, 0, 32, 0, 16, 16, 0)  # 右

            if pyxel.frame_count & 0x04:
                pyxel.blt(self.PosX - 1, self.PosY + 8, 0, 8, 16, 6, 6, 0)
                pyxel.blt(self.PosX - 5, self.PosY + 8, 0, 8, 16, -6, 6, 0)
            else:
                pyxel.blt(self.PosX - 1, self.PosY + 8, 0, 8, 24, 6, 6, 0)
                pyxel.blt(self.PosX - 5, self.PosY + 8, 0, 8, 24, -6, 6, 0)

        # 中心の表示
        shooting_sub.DebugDrawPosHitRect(self)
Example #5
0
    def draw(self):
        x = self.PosX + self.PosAdjX
        y = self.PosY + self.PosAdjY

        if self.TmpCtr == 0:
            pyxel.blt(x, y, 0, 72, 72, 16, 16, 0)
        else:
            pyxel.blt(x, y, 0, 88, 72, 16, 16, 0)
            self.TmpCtr -= 1

        # 中心の表示
        shooting_sub.DebugDrawPosHitRect(self)
Example #6
0
    def draw(self):
        x = self.PosX + self.PosAdjX
        y = self.PosY + self.PosAdjY

        if self.Id1 != 3:
            if self.St0 <= 1:
                pyxel.blt(x, y, 0, 0, 40, 32, 10, 0)
            else:
                pyxel.blt(x, y, 0, 0, 40, 32, -10, 0)
        else:
            pyxel.blt(x, y, 0, 0, 40, 32, 10, 0)

        # 中心の表示
        shooting_sub.DebugDrawPosHitRect(self)
Example #7
0
    def draw(self):
        x = self.PosX + self.PosAdjX
        y = self.PosY + self.PosAdjY

        if self.Display != 0:
            pyxel.blt(x, y, 0, 0, 8 * 11, 8 * 3, 8 * 4, 0)
            pyxel.blt(x + (8 * 3), y, 0, 0, 8 * 11, -8 * 3, 8 * 4, 0)

            # デバッグ用MovePos
            if imp._DEBUG_ == True and self.St0 == 2:
                pyxel.rectb(self.MvTargetPosX - 4, self.MvTargetPosY - 4, 8, 8,
                            10)

        # 中心の表示
        shooting_sub.DebugDrawPosHitRect(self)
Example #8
0
    def draw(self):
        x = self.PosX + self.PosAdjX
        y = self.PosY + self.PosAdjY
        if self.Id0 == 0:
            if pyxel.frame_count & 0x08:
                pyxel.blt(x, y, 0, 16, 16, 6, 6, 0)
            else:
                pyxel.blt(x, y, 0, 24, 16, 6, 6, 0)

        elif self.Id0 == 1:
            if self.Id1 == 0:
                pyxel.blt(x, y, 0, 8 * 0, 8 * 4, 8, 8, 0)
            elif self.Id1 == 1:
                pyxel.blt(x, y, 0, 8 * 1, 8 * 4, 8, 8, 0)
            elif self.Id1 == 2:
                pyxel.blt(x, y, 0, 8 * 2, 8 * 4, 8, 8, 0)
            elif self.Id1 == 3:
                pyxel.blt(x, y, 0, 8 * 3, 8 * 4, 8, 8, 0)
            elif self.Id1 == 4:
                pyxel.blt(x, y, 0, 8 * 4, 8 * 4, 8, 8, 0)
            elif self.Id1 == 5:
                pyxel.blt(x, y, 0, 8 * 5, 8 * 4, 8, 8, 0)
            elif self.Id1 == 6:
                pyxel.blt(x, y, 0, 8 * 6, 8 * 4, 8, 8, 0)
            elif self.Id1 == 7:
                pyxel.blt(x, y, 0, 8 * 7, 8 * 4, 8, 8, 0)
            elif self.Id1 == 8:
                pyxel.blt(x, y, 0, 8 * 8, 8 * 4, 8, 8, 0)
            elif self.Id1 == 9:
                pyxel.blt(x, y, 0, 8 * 7, 8 * 4, -8, 8, 0)
            elif self.Id1 == 10:
                pyxel.blt(x, y, 0, 8 * 6, 8 * 4, -8, 8, 0)
            elif self.Id1 == 11:
                pyxel.blt(x, y, 0, 8 * 5, 8 * 4, -8, 8, 0)
            elif self.Id1 == 12:
                pyxel.blt(x, y, 0, 8 * 4, 8 * 4, -8, 8, 0)
            elif self.Id1 == 13:
                pyxel.blt(x, y, 0, 8 * 3, 8 * 4, -8, 8, 0)
            elif self.Id1 == 14:
                pyxel.blt(x, y, 0, 8 * 2, 8 * 4, -8, 8, 0)
            elif self.Id1 == 15:
                pyxel.blt(x, y, 0, 8 * 1, 8 * 4, -8, 8, 0)
            elif self.Id1 == 16:
                pyxel.blt(x, y, 0, 8 * 0, 8 * 4, -8, -8, 0)
            elif self.Id1 == 17:
                pyxel.blt(x, y, 0, 8 * 1, 8 * 4, -8, -8, 0)
            elif self.Id1 == 18:
                pyxel.blt(x, y, 0, 8 * 2, 8 * 4, -8, -8, 0)
            elif self.Id1 == 19:
                pyxel.blt(x, y, 0, 8 * 3, 8 * 4, -8, -8, 0)
            elif self.Id1 == 20:
                pyxel.blt(x, y, 0, 8 * 4, 8 * 4, -8, -8, 0)
            elif self.Id1 == 21:
                pyxel.blt(x, y, 0, 8 * 5, 8 * 4, -8, -8, 0)
            elif self.Id1 == 22:
                pyxel.blt(x, y, 0, 8 * 6, 8 * 4, -8, -8, 0)
            elif self.Id1 == 23:
                pyxel.blt(x, y, 0, 8 * 7, 8 * 4, -8, -8, 0)
            elif self.Id1 == 24:
                pyxel.blt(x, y, 0, 8 * 8, 8 * 4, 8, -8, 0)
            elif self.Id1 == 25:
                pyxel.blt(x, y, 0, 8 * 7, 8 * 4, 8, -8, 0)
            elif self.Id1 == 26:
                pyxel.blt(x, y, 0, 8 * 6, 8 * 4, 8, -8, 0)
            elif self.Id1 == 27:
                pyxel.blt(x, y, 0, 8 * 5, 8 * 4, 8, -8, 0)
            elif self.Id1 == 28:
                pyxel.blt(x, y, 0, 8 * 4, 8 * 4, 8, -8, 0)
            elif self.Id1 == 29:
                pyxel.blt(x, y, 0, 8 * 3, 8 * 4, 8, -8, 0)
            elif self.Id1 == 30:
                pyxel.blt(x, y, 0, 8 * 2, 8 * 4, 8, -8, 0)
            elif self.Id1 == 31:
                pyxel.blt(x, y, 0, 8 * 1, 8 * 4, 8, -8, 0)
        elif self.Id0 == 2:
            if pyxel.frame_count & 0x08:
                pyxel.blt(x, y, 0, 16, 16, 6, 6, 0)
            else:
                pyxel.blt(x, y, 0, 24, 16, 6, 6, 0)
        elif self.Id0 == 3:
            if pyxel.frame_count & 0x04:
                pyxel.blt(x, y, 0, 0, 8 * 15, 8, 16, 0)
            else:
                pyxel.blt(x, y, 0, 8, 8 * 15, 8, 16, 0)

        elif self.Id0 == 4:  # ミサイル
            pyxel.blt(x, y, 0, 16, 72, 8, 16, 0)
            if pyxel.frame_count & 0x04:
                pyxel.blt(x, y - 8, 0, 24, 72, 8, 8, 0)
            else:
                pyxel.blt(x, y - 8, 0, 24, 80, 8, 8, 0)

        # 中心の表示
        shooting_sub.DebugDrawPosHitRect(self)