Exemplo n.º 1
0
    def draw(self, canvas, zero=np.array([0, 0])):

        self.animate += 1 + 3 * (any(self.vel != 0))
        self.animate %= len(self.shift_path)

        for s in self.switchers:  # switch eyes, wings, feet, etc depending on direction
            s[0].visible = self.direction == -1
            s[1].visible = self.direction == 1

        for a in self.animators:
            a.shift(self.shift_path[self.animate])

        Body.draw(self, canvas, zero)

        for a in self.animators:
            a.shift(-self.shift_path[self.animate])
Exemplo n.º 2
0
 def draw(self,canvas,zero = np.array([0,0])):
     if self.destruct_counter == self.destruct_length: # remove box
         self.shapes[0].color = None
         self.shapes[0].line_color = None
     Body.draw(self,canvas,zero)
Exemplo n.º 3
0
 def draw(self, canvas, zero, direction):
     self.shapes[-1].visible = direction == -1
     self.shapes[-2].visible = direction == 1
     Body.draw(self, canvas, zero)