Skip to content

Commit 4570383

Browse files
committed
存档数据读写接口,让游戏提示更加明显
1 parent 5148e2d commit 4570383

23 files changed

Lines changed: 161 additions & 155 deletions

Editor/VGEditorFramework/Source/Setting/BuildSettingsPanel.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ namespace VisionGal::Editor
131131

132132
bool BuildSettingsPanel::BuildOutputDirectoryUI()
133133
{
134-
ImVec4 invalidTextColor = ImVec4(0.7f, 0.7f, 0.7f, 1.0f);
134+
ImVec4 invalidTextColor = ImVec4(1.0f, 0.1f, 0.1f, 1.0f);
135135

136136
// 生成目录
137137
ImGui::Text(EditorText{ "Build output directory" }.c_str());
@@ -180,7 +180,7 @@ namespace VisionGal::Editor
180180

181181
// 构建平台
182182
ImGui::Text(EditorText{ "Target Platform" }.c_str());
183-
if (ImGui::BeginCombo("##Editor Theme", "Windows", ImGuiComboFlags_PopupAlignLeft))
183+
if (ImGui::BeginCombo("##Target Platform", "Windows", ImGuiComboFlags_PopupAlignLeft))
184184
{
185185
for (int i = 0; i < m_TargetPlatforms.size(); i++)
186186
{

Project/示例项目/Assets/剧情脚本/剧情选择.lua

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ local 梦旅 = VG:创建人物('梦旅')
33
return function()
44
梦旅:说('这是一个Galgame游戏脚本初始化模版')
55
梦旅:说('你可以在这里添加剧情内容1')
6-
当前选择 = VG:剧情选择('分支1',{'选择1','选择2'})
6+
当前选择 = VG:剧情选择('分支1',{'选择1','选择2','选择3'})
77
if 当前选择 == '选择1' then
88
梦旅:说('选择1')
99
梦旅:说('选择11')
@@ -16,6 +16,12 @@ return function()
1616
梦旅:说('选择222')
1717
梦旅:说('选择2222')
1818
梦旅:说('选择22222')
19+
elseif 当前选择 == '选择3' then
20+
梦旅:说('选择3')
21+
梦旅:说('选择33')
22+
梦旅:说('选择333')
23+
梦旅:说('选择3333')
24+
梦旅:说('选择33333')
1925
end
2026
return
2127
end
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
local 梦旅 = GalGame.引擎:创建人物('梦旅')
2+
3+
return function()
4+
梦旅:说('这是脚本数据传递1')
5+
梦旅:说('脚本数据传递1你可以在这里添加剧情内容')
6+
VG.存档数据.命名空间1.变量1 = 'VG.存档数据.命名空间1.变量1的值'
7+
VG:加载剧情脚本('/assets/剧情脚本/存档数据读写/脚本数据传递2.lua')
8+
return
9+
end
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[VGASSET];944921556481458559;GalGameStoryScript
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
local 梦旅 = GalGame.引擎:创建人物('梦旅')
2+
3+
return function()
4+
梦旅:说('这是脚本数据传递2.lua')
5+
梦旅:说(VG.存档数据.命名空间1.变量1)
6+
7+
return
8+
end
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[VGASSET];4455776632857604561;GalGameStoryScript
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
local 梦旅 = VG:创建人物('梦旅')
2+
3+
return function()
4+
梦旅:说('这是一个Galgame游戏脚本初始化模版')
5+
梦旅:说('你可以在这里添加剧情内容1')
6+
VG:剧情选择('分支1',{'选择1','选择2'})
7+
8+
-- 通过 VG.存档数据. + 剧情选择这个命名空间 + 剧情选择名称 可以跨脚本读取剧情选择结果
9+
梦旅:说(VG.存档数据.剧情选择.分支1)
10+
return
11+
end
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[VGASSET];10527504955218957230;GalGameStoryScript
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
local 梦旅 = VG:创建人物('梦旅')
2+
3+
return function()
4+
梦旅:说('这是一个Galgame游戏脚本初始化模版')
5+
梦旅:说('你可以在这里添加剧情内容')
6+
VG:文本输入('输入1',"输入标题",'按钮文本')
7+
梦旅:说('你输入的内容是:' .. VG.存档数据.文本输入.输入1)
8+
return
9+
end
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[VGASSET];14270045416834375330;GalGameStoryScript

0 commit comments

Comments
 (0)