예제 #1
0
 def draw(self):
     theta = self.getAngle()
     for distance, item in self.Objects:
         x, y = self.position
         dx = math.cos(theta) * distance
         dy = math.sin(theta) * distance
         item.position = (x+dx, y-dy)
         item.draw()
     self.Base.draw()
     BaseItem.draw(self)
예제 #2
0
 def __init__(self):
     BaseItem.__init__(self)
     self.Objects = []
     self.angularVelocity = 0
     self.image.anchor_x = self.width/2
     self.image.anchor_y = self.height
     self.position = (constants.RESOLUTION[0]/2, 100)
     
     self.Base = TeeterBase()
     self.Base.image.anchor_x = self.Base.width/2
     self.Base.image.anchor_y = self.Base.height
     self.Base.position = self.position
예제 #3
0
 def __init__(self):
     BaseItem.__init__(self)
     self.Gravity = 10
     self.Speed = self.Gravity * self.WEIGHT
     self.IsFalling = True
     self.LastYDelta = 0
예제 #4
0
 def __init__(self):
     BaseItem.__init__(self)
     self.image.anchor_x = self.width/2
     self.image.anchor_y = self.height/2
     self.position = (constants.RESOLUTION[0]/2, constants.RESOLUTION[1]-self.height/2)
     self.counter = 0