马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
我在测试任务系统的时候发现,Shift+R 了就全部重置回初始值了,这是怎么回事呢?
[RenPy] 纯文本查看 复制代码 init python:
import renpy.store as store
import renpy.exports as renpy
class Event(object):
def __init__(self, name, description, tips, available = False, completed = False, goal = 1, count = 0):
self.name = name
self.description = description
self.tips = tips
self.available = available
self.completed = completed
self.goal = goal
self.count = count
EVENTS = []
t = 0
while t < 50:
EVENTS.append(Event("none","none","none",available = False, completed = False, goal = 1))
t += 1
[RenPy] 纯文本查看 复制代码 $ EVENTS[1] = Event("主线", "主线1的说明", "主线1的提示",available = True, completed = False, goal = 1, count=123)
label start:
menu:
"[EVENTS[1].count]"
"做任务 第三个完成!":
$ EVENTS[3].count+=1
jump start
点数确实会一直增加,但一旦重新加载游戏后,又会变成123
|