Ejemplo n.º 1
0
    def on_touch_up(self, touch):
        v = Vector(touch.pos) - Vector(touch.opos)
        if v.length < 20:
            return
        if abs(v.x) > abs(v.y):
            v.y = 0
        else:
            v.x = 0

        self.move(*v.normalize())
Ejemplo n.º 2
0
    def on_touch_up(self, touch):
        v = Vector(touch.pos) - Vector(touch.opos)
        if v.length() < 20:
            return

        if abs(v.x) > abs(v.y):
            v.y = 0
        else:
            v.x = 0

        self.move(*v.normalize())
Ejemplo n.º 3
0
    def on_touch_up(self, touch):
        v = Vector(touch.pos) - Vector(touch.opos)
        if v.length() < self.columns:
            return

        if abs(v.x) > abs(v.y):
            v.y = 0
        else:
            v.x = 0
        if not self.game_over:
            self.move(*v.normalize())