コード例 #1
0
ファイル: Ship.py プロジェクト: zdgeier/CSC-101
    def __init__(self, canvas):
        self.x = 100
        self.y = 100
        self.r = 180
        self.center = self.x, self.y
        self.canvas = canvas
        self.thrust = True
        self.start = 0
        self.shapes = []
        self.scale = 5

        self.shipShape = ShipShape(self.x, self.y, self.scale, self.canvas)
コード例 #2
0
ファイル: Ship.py プロジェクト: zdgeier/CSC-101
class Ship:
    def __init__(self, canvas):
        self.x = 100
        self.y = 100
        self.r = 180
        self.center = self.x, self.y
        self.canvas = canvas
        self.thrust = True
        self.start = 0
        self.shapes = []
        self.scale = 5

        self.shipShape = ShipShape(self.x, self.y, self.scale, self.canvas)

    def update(self):
        self.shipShape = ShipShape(self.x, self.y, self.scale, self.canvas)

    def press(self, x, y):
        self.shipShape.press(x, y)

    def motion(self, x, y):
        self.shipShape.motion(x, y)

    def delete(self):
        self.shipShape.delete()
コード例 #3
0
ファイル: Ship.py プロジェクト: zdgeier/CSC-101
 def update(self):
     self.shipShape = ShipShape(self.x, self.y, self.scale, self.canvas)