马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
[RenPy] 纯文本查看 复制代码 #当前天数
define day = 1
#当前时间段
define nowTime = 1
#时间字典
define timeLibrary = ((0,"早上"),(1,"下午"),(2,"晚上"),)
#时间描述
define timeDes = "第一天早上"
define sleepChoiceArray = (("睡到下午",1),("睡到晚上",2),("睡到第二天",0),("取消",nowTime),)
init python:
global day
global nowTime
global timeLibrary
global timeDes
global sleepChoiceArray
#刷新获取时间描述
def GetTimeDes():
timeDes="第"+str(day)+"天"+timeLibrary[nowTime][1]
return timeDes
#获取时间描述
def GetTimeChoose():
return timeLibrary[nowTime:]
#获取天数
def GetDay():
return day
def ShowSleepChoose():
return times
#调用逻辑,顺便实现一下头像的问题
[RenPy] 纯文本查看 复制代码 define a = Character("测试",image="eileen")
image eileen happy = "times/am.png"
label lblShowSleepChoose():
show eileen happy
a happy "hello"
call screen sn_title
python:
chooseTime=renpy.display_menu(sleepChoiceArray[nowTime:],interact=True)#核心调用
if chooseTime == 0 and nowTime != 0:
day+=1
if nowTime != chooseTime:
nowTime = chooseTime
renpy.say("",GetTimeDes())
pause
#顶部时间显示
screen sn_title(area="undefine"):
imagebutton:
action None
pos(0.5,0.5)
idle "times/am.png"
#xysize(16,16)
foreground Text(_("时间"))
|