def move(self):
     if not self.live:
         self.vx = x_resistance(self.vx)
         self.vy = gravity(self.vy, False)
     else:
         if not self.push_on_platform:
             self.vy = gravity(self.vy, self.on_platform)
     self.x += self.vx
     self.y += self.vy
Example #2
0
 def move(self):
     if self.on_platform:
         self.on_place = True
     if not self.on_platform and self.on_place:
         self.vx = -self.vx
     if not self.on_place:
         self.vy = gravity(self.vy, self.on_platform)
     self.x += self.vx
     self.y += self.vy
Example #3
0
 def move(self):
     if self.on_platform:
         self.on_place = True
         self.counter += 1
     if not self.on_place and (self.counter % 2 == 0):
         self.vy = gravity(self.vy, self.on_platform)
     elif not self.on_platform and (self.counter % 2 != 0):
         self.vy = -10
         self.on_place = False
         self.counter += 1
     self.x += self.vx
     self.y += self.vy
     self.live -= 1
Example #4
0
 def move(self):
     if self.on_platform:
         self.on_place = True
         if self.dist >= self.max:
             self.vx = -self.vx
             self.dist = 0
             self.max = 500
     if not self.on_place:
         self.vy = gravity(self.vy, self.on_platform)
     elif not self.on_platform and self.on_place:
         self.vy = -10
         self.on_place = False
     self.x += self.vx
     self.y += self.vy
     self.dist += 1
 def move(self):
     if self.on_platform:
         self.on_place = True
         self.counter += 1
         if self.dist >= self.max:
             self.vx = -self.vx
             self.dist = 0
             self.max = 500
     if not self.on_place and (self.counter % 2 == 0):
         self.vy = gravity(self.vy, self.on_platform)
     elif not self.on_platform and (self.counter % 2 !=
                                    0) and self.on_place:
         self.vy = -10
         self.on_place = False
         self.counter += 1
     self.x += self.vx
     self.y += self.vy
     self.dist += 1