Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Q
qwgame
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵国君
qwgame
Commits
1d6c0138
Commit
1d6c0138
authored
Mar 29, 2019
by
hxw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
上次剧情生成基本逻辑,稍有改动
parent
03aaeb43
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
69 additions
and
0 deletions
+69
-0
生成剧情的处理逻辑_v3.txt
生成剧情的处理逻辑_v3.txt
+69
-0
No files found.
生成剧情的处理逻辑_v3.txt
0 → 100644
View file @
1d6c0138
队列 剧情
队列 剧情
取出第一个结点
基本变量赋值
for 分支结点:
# 在这里从结点中取出需要的变量,后面就不能对结点中的数据做修改了,否则如果多个结点指向同一个剧情时会存在影响
如果下一步剧情为空
则设置id = 当前剧情id+'_end' #估计要改成当前id
新建剧情end结点
从当前分支取出下一步剧情id、回答、unknown文本
取出下一步condition、发生地点
额外前置条件:地点任务线、地点、当前剧情已激活
if 下一步剧情以_end结尾:
game_step = 当前剧情id
else
game_step = 下一部剧情id
额外更新答案:地点任务线=game_step、任务最后一个condition、任务最后一个回答、当前剧情计数器加一、激活下一步剧情
if 主角随剧情移动
额外更新答案 += 地点、game_step
else
if 当前地点 != 跳转前剧情地点
回答 = 是否有unknwon? 取unknwon:说请到某某地点
#到那里时做什么
添加配置文件A:
当前条件:去xx(跳转前剧情地点)
历史条件:game_step、当前剧情和下一步剧情已被激活
更新答案:game_step、unknown文本、地点、跟随者地点 -> 自动跳转后的地点
在更新答案中删掉unknown文本
#去那之前做什么
添加配置文件B:
当前条件:用户设置条件
历史条件:用户设置条件+额外前置条件
更新答案:用户设置更新+额外更新
if 是 无条件剧情:
条件无条件剧情的操作
if 下一步剧情是自动跳转
if 下一步剧情结点未被访问
if 下一步剧情 != null
在下一部剧情设置父剧情id
设置下一步剧情的unknown文本
队列.add(下一步剧情结点)
else
只设置下一部剧情的变量,不加入队列
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment