[RenPy] 纯文本查看 复制代码 default how = " "
default detective = False
default city = " "
default c0_drop_1 = False
default c = True
############### 拖动交互,无触碰交互,则返回原位置 ####################
init python:
## 1号
def detective_dragged(drags, drop):
if not drop:
drags[0].snap(500,20, 0.1)
if drop:
store.detective = drags[0].drag_name
store.city = drop.drag_name
store.how = store.detective
store.detective = True
drags[0].snap(50,50, 0.1)
store.c = False # 不再允许拖动。
renpy.restart_interaction() ## 重新开始当前的交互。
###############################################################
screen c0:
add "bathroom.png" # 背景。
draggroup:
drag:
drag_name "c0"
child "ivy.png"
droppable False
dragged detective_dragged # 有触碰,就执行函数
if c == True :
draggable True
if c == False :
draggable False
xpos 500 ypos 20
if detective == False:
drag:
drag_name "1"
draggable False
child "alice_headb.png"
xpos 50 ypos 50
##################################################
label start:
call screen c0
现在会实现上面的要求了,不过请问诸位大佬有办法让它在拖拽松手的时刻播放sound嘛?
|