Пример #1
0
 def on_touch_down(self, touch):
     if self.collide_point(touch.x, touch.y):
         if self.left_block is not None:
             self.left_block.right_block = None
             self.left_block.unbind()
             self.left_block = None
         if self.up_block is not None:
             self.up_block.command = self.up_block.type + str(self.up_block.id) + "1"
             self.up_block.bottom_block = None
             self.up_block.unbind()
         self.up_block = None
         self.left_block = None
         self.selected = True
         click_sound.play()
     return RelativeLayout.on_touch_down(self, touch)