Code: Select all
default pieces = 6
default full_size = (1128, 1317)
default piece_coordinates = [(1040, 882), (1285, 894), (1064, 390), (912, 563), (1395, 563), (1060, 63)]
default initial_piece_coordinates = [ ]
default finished_pieces = 0
init python:
dragged_piece = None
dropped_on = None
pieces = dragged_piece
finished_pieces = 0
def piece_drop(dropped_on, dragged_piece):
global finished_pieces
dragged_piece = dragged_piece[0]
if dropped_on is not None:
if dragged_piece[0].drag_name == dropped_on.drag_name:
dragged_piece[0].snap(dropped_on.x, dropped_on.y, 0.5)
if finished_pieces == pieces:
renpy.jump(complete)
screen jun:
draggroup:
drag:
drag_name "yback2"
child "yback2.png"
draggable False
droppable True
drag:
drag_name "yleg1"
child "yleg1.png"
draggable True
droppable False
drag:
drag_name "yleg2"
child "yleg2.png"
draggable True
droppable False
drag:
drag_name "ytorso2"
child "ytorso2.png"
draggable False
droppable True
xpos 1064 ypos 390
drag:
drag_name "yarm1"
child "yarm1.png"
draggable True
droppable False
drag:
drag_name "yarm2"
child "yarm2.png"
draggable True
droppable False
drag:
drag_name "yhead"
child "yhead.png"
draggable True
droppable False