增加BodyModule切换功能
This commit is contained in:
@@ -62,6 +62,11 @@ MonoBehaviour:
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 8782be70636ad314b8f60a637f3d1917
|
||||
m_Address: StandardFixScene
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
m_ReadOnly: 0
|
||||
m_Settings: {fileID: 11400000, guid: 77169ce22e430f64fb36c771815a4a7b, type: 2}
|
||||
m_SchemaSet:
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
using AibisDream.FixSystem;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace AibisDream.SystemEditor
|
||||
{
|
||||
[CustomEditor(typeof(BodyModuleSystem))]
|
||||
public class BodyModuleSystemEditor : SystemHasDataEditor
|
||||
{
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
var example = (BodyModuleSystem)target;
|
||||
|
||||
base.OnInspectorGUI();
|
||||
GUILayout.Label("修改");
|
||||
|
||||
if (GUILayout.Button("添加一个新模块"))
|
||||
{
|
||||
example.AddBodyModule();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2bfe60c0be744740a6df2bee152c5dc0
|
||||
timeCreated: 1732921141
|
||||
@@ -513,15 +513,19 @@ MonoBehaviour:
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
_filter:
|
||||
- 0.007228916
|
||||
- 0.043749984
|
||||
- 0.12409639
|
||||
- 0.20444278
|
||||
- 0.24096388
|
||||
- 0.20444278
|
||||
- 0.12409639
|
||||
- 0.043749984
|
||||
- 0.007228916
|
||||
- 0.0048309183
|
||||
- 0.016401261
|
||||
- 0.04532712
|
||||
- 0.08293076
|
||||
- 0.12053438
|
||||
- 0.14946026
|
||||
- 0.1610306
|
||||
- 0.14946026
|
||||
- 0.12053438
|
||||
- 0.08293076
|
||||
- 0.04532712
|
||||
- 0.016401261
|
||||
- 0.0048309183
|
||||
--- !u!114 &-6086986437317696584
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 3
|
||||
|
||||
@@ -12,7 +12,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 157431981b8a721458e6706c374a3867, type: 3}
|
||||
m_Name: StoneDay2
|
||||
m_EditorClassIdentifier:
|
||||
nextScene: {fileID: 11400000, guid: 7bf300be492f2634580f0eaabcca2b2e, type: 2}
|
||||
nextScene: {fileID: 11400000, guid: 8d8b11f0c2fbc4d4cb8c2857d98383c9, type: 2}
|
||||
yarnProject: {fileID: 7545569452688597077, guid: fa8082420f7bb5b4a8ab33a59c70bcc9, type: 3}
|
||||
firstSceneName: ExpressFixScene
|
||||
isEndOfDay: 0
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 157431981b8a721458e6706c374a3867, type: 3}
|
||||
m_Name: StoneDay2_2
|
||||
m_EditorClassIdentifier:
|
||||
nextScene: {fileID: 11400000, guid: 8d8b11f0c2fbc4d4cb8c2857d98383c9, type: 2}
|
||||
yarnProject: {fileID: 7545569452688597077, guid: b254008a450f4c242b25311130c2592a, type: 3}
|
||||
firstSceneName: ExpressFixScene
|
||||
isEndOfDay: 0
|
||||
nameToPlayer: "\u7B2C\u4E8C\u5929\u4E0A\u5348\u77F3\u5934\u7ED3\u675F\u90E8\u5206"
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 088974ca6c9487041b695af86b6c93a1
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,19 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 157431981b8a721458e6706c374a3867, type: 3}
|
||||
m_Name: StoneDay2_head
|
||||
m_EditorClassIdentifier:
|
||||
nextScene: {fileID: 11400000, guid: 088974ca6c9487041b695af86b6c93a1, type: 2}
|
||||
yarnProject: {fileID: 7545569452688597077, guid: b7787a998da53b74c854f2e09dccec52, type: 3}
|
||||
firstSceneName: ShitouHeadiFixScene
|
||||
isEndOfDay: 0
|
||||
nameToPlayer: "\u7B2C\u4E8C\u5929\u4E0A\u5348\u77F3\u5934\u5934\u90E8\u7EF4\u4FEE"
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7bf300be492f2634580f0eaabcca2b2e
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -79,14 +79,7 @@ position: 248,-1739
|
||||
//如果视觉深入过再UF,就是true
|
||||
<<declare $eyeDeepThenUf = false>>
|
||||
|
||||
|
||||
|
||||
<<jump Center>>
|
||||
|
||||
///一些状态初始化
|
||||
|
||||
//没有色彩晶圆
|
||||
<<Temp_RemoveChip>>
|
||||
===
|
||||
|
||||
title: Center
|
||||
|
||||
@@ -3,7 +3,6 @@ tags:
|
||||
color: 888888
|
||||
position: 0,0
|
||||
---
|
||||
<<Temp_RemoveChip>>
|
||||
<<jump 电视>>
|
||||
===
|
||||
|
||||
|
||||
@@ -5,7 +5,8 @@ position: -427,-2903
|
||||
---
|
||||
<<play_clinic_cut>>
|
||||
<<fade_in 1>>
|
||||
<<switch_fix_system_to "BodyModule">>
|
||||
<<switch_fix_system_to "BodyModule" "Head">>
|
||||
<<Temp_RemoveChip>>
|
||||
<<fade_out 1>>
|
||||
<<add_task TaskManager "找到佩佩的UF模块">>
|
||||
<<task_moveIn TaskManager>>
|
||||
@@ -35,22 +36,6 @@ position: -427,-2903
|
||||
===
|
||||
|
||||
|
||||
// title: 主维修界面_头部
|
||||
// tags:
|
||||
// color: 888888
|
||||
// position: 10,-2168
|
||||
// ---
|
||||
// <<if $gameStage == "UF检查">>
|
||||
// <<jump UF检查状态>>
|
||||
// <<elseif $gameStage == "视觉检查">>
|
||||
// <<jump 视觉检查状态>>
|
||||
// <<elseif $gameStage == "记忆检查">>
|
||||
// <<jump 记忆检查状态>>
|
||||
// <<endif>>
|
||||
// ===
|
||||
|
||||
|
||||
|
||||
|
||||
title: UF深入检查
|
||||
tags: 待编辑
|
||||
|
||||
@@ -134,7 +134,7 @@ peipei: 好的,医生。
|
||||
|
||||
|
||||
title: 视觉检查状态
|
||||
position: -538,-2339
|
||||
position: -539,-2339
|
||||
---
|
||||
<<if $isFinishedEyeCheck==true>>
|
||||
<<task_moveOut TaskManager>>
|
||||
|
||||
@@ -3,7 +3,6 @@ tags:
|
||||
colorID: 8
|
||||
position: 272,-1156
|
||||
---
|
||||
<<Temp_RemoveChip>>
|
||||
<<init_character "佩佩最新">>
|
||||
<<switch_character_state 背手黑线张嘴闭眼>>
|
||||
<<hide_character>>
|
||||
|
||||
@@ -5,7 +5,8 @@ position: 322,-1030
|
||||
---
|
||||
<<play_clinic_cut>>
|
||||
<<fade_in 1>>
|
||||
<<switch_fix_system_to "BodyModule">>
|
||||
<<switch_fix_system_to "BodyModule" "Head">>
|
||||
<<Temp_RemoveChip>>
|
||||
<<SetHeat 1>>
|
||||
<<add_task TaskManager "检查UF模块">>
|
||||
<<fade_out 1>>
|
||||
|
||||
@@ -6,12 +6,11 @@ position: -449,-3574
|
||||
<<hide_dialog>>
|
||||
<<play_clinic_cut>>
|
||||
<<fade_in 1>>
|
||||
<<switch_fix_system_to "BodyModule">>
|
||||
<<switch_fix_system_to "BodyModule" "Head">>
|
||||
<<delete_line LineManager MemoryEye>>
|
||||
<<Temp_RemoveUFCover>>
|
||||
<<Temp_RemoveUFColor>>
|
||||
<<Temp_RemoveUF>>
|
||||
<<switch_fix_system_to "BodyModule">>
|
||||
<<fade_out 1>>
|
||||
<<task_moveIn TaskManager>>
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ shitou: 哈哈~!毕竟~音乐就是我的~生命~
|
||||
shitou: 啊!~自由的小机体,在大大的城市里~<br>跑呀~跑呀~再多烦恼~统统忘掉~
|
||||
me: 好多灰尘啊,真难开……
|
||||
|
||||
<<switch_fix_system_to "BodyModule">>
|
||||
<<switch_fix_system_to "BodyModule" "Body">>
|
||||
|
||||
me: 嘿!
|
||||
|
||||
|
||||
@@ -127,3 +127,17 @@ position: -1092,115
|
||||
<<endif>>
|
||||
===
|
||||
|
||||
title: 朋友
|
||||
---
|
||||
<<if $gameStage == 2>>
|
||||
<<jump 记忆_朋友>>
|
||||
<<endif>>
|
||||
===
|
||||
|
||||
|
||||
title: MemoryDeepIn
|
||||
tags:
|
||||
---
|
||||
<<close_screen>>
|
||||
<<jump 记忆深入>>
|
||||
===
|
||||
@@ -19,11 +19,10 @@ CenterText: 新的一天
|
||||
title: 引入对话
|
||||
tags:
|
||||
colorID: 8
|
||||
position: 250,-1874
|
||||
position: 251,478
|
||||
---
|
||||
//分支剧情的初始化
|
||||
<<set $gameStage = 1>>
|
||||
// <<indoor_new 1>>
|
||||
<<init_character "石头">>
|
||||
<<switch_character_state 摸头低眉走神闭眼>>
|
||||
<<hide_character>>
|
||||
@@ -111,9 +110,8 @@ me: …快来……你需要立刻做个检查。
|
||||
|
||||
title: toStage2
|
||||
group: 出口
|
||||
position: 248,443
|
||||
position: 251,953
|
||||
---
|
||||
<<NextYarn>>
|
||||
<<set $gameStage = 2>>
|
||||
<<jump Center>>
|
||||
===
|
||||
+8
-9
@@ -15,7 +15,7 @@ title: 检查初始化_头部
|
||||
position: 380,-239
|
||||
---
|
||||
<<hide_dialog>>
|
||||
<<switch_fix_system_to "BodyModule">>
|
||||
<<switch_fix_system_to "BodyModule" "Head">>
|
||||
|
||||
me: 你是怎么撞的?
|
||||
shitou: 不是我撞它啦~是它撞的我……
|
||||
@@ -88,7 +88,7 @@ title: 检查情绪
|
||||
tags:
|
||||
colorID: 8
|
||||
group:插线检查
|
||||
position: -47,-3242
|
||||
position: 906,-585
|
||||
---
|
||||
<<wait 0.1>>
|
||||
<<open_screen Emo>>
|
||||
@@ -127,7 +127,7 @@ title: 检查语言
|
||||
tags:
|
||||
colorID: 8
|
||||
group:插线检查
|
||||
position: 194,-2880
|
||||
position: 1147,-223
|
||||
---
|
||||
<<wait 0.1>>
|
||||
<<open_screen Speak>>
|
||||
@@ -165,7 +165,7 @@ title: 检查逻辑
|
||||
tags:
|
||||
colorID: 8
|
||||
group:插线检查
|
||||
position: 428,-3246
|
||||
position: 1381,-589
|
||||
---
|
||||
<<wait 0.1>>
|
||||
<<open_screen Logic>>
|
||||
@@ -212,7 +212,7 @@ title: 检查记忆
|
||||
tags: 待编辑
|
||||
colorID: 8
|
||||
group:插线检查
|
||||
position: 195,-3243
|
||||
position: 1148,-586
|
||||
---
|
||||
<<wait 0.1>>
|
||||
<<open_screen Memory>>
|
||||
@@ -291,7 +291,7 @@ title: 检查视觉
|
||||
tags: 待编辑
|
||||
colorID: 8
|
||||
group:插线检查
|
||||
position: 435,-3043
|
||||
position: 1388,-386
|
||||
---
|
||||
<<wait 0.1>>
|
||||
<<open_screen Eye>>
|
||||
@@ -344,7 +344,7 @@ position: 48,-156
|
||||
|
||||
|
||||
|
||||
title: 朋友
|
||||
title: 记忆_朋友
|
||||
position: 80,48
|
||||
---
|
||||
<<play_music event:/Music/mem_shitou_0>>
|
||||
@@ -464,9 +464,8 @@ me: 音频数据已经被完全覆盖了……
|
||||
|
||||
|
||||
title: toStage3
|
||||
position: 213,321
|
||||
position: 212,321
|
||||
---
|
||||
<<NextYarn>>
|
||||
<<set $gameStage = 3>>
|
||||
<<jump Center>>
|
||||
===
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fe0bce32b122d1145ac4074a514977f4
|
||||
guid: cdd37df7223e48b42aefada648e12d4f
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
@@ -1,361 +0,0 @@
|
||||
title: Stage2disposed
|
||||
group: 入口
|
||||
tags:
|
||||
position: 378,-540
|
||||
---
|
||||
<<jump 检查初始化>>
|
||||
===
|
||||
|
||||
|
||||
|
||||
|
||||
title: 检查初始化
|
||||
position: 380,-239
|
||||
---
|
||||
<<play_clinic_cut>>
|
||||
<<fade_in 0.5>>
|
||||
|
||||
<<wait 1>>
|
||||
|
||||
//shitou: 医生~不好意思~每次拆面板我都很害怕!你介意我~放声高歌吗?
|
||||
|
||||
//me: 没关系,其实你一直在唱歌。
|
||||
|
||||
//shitou: 啊!富足的生活~靠勤奋的双脚~美好的未来~在等我们~♫
|
||||
|
||||
|
||||
<<hide_dialog>>
|
||||
<<switch_fix_system_to "BodyModule">>
|
||||
<<fade_out 1>>
|
||||
|
||||
<<add_task TaskManager 更换动力模块的调速齿轮>>
|
||||
<<task_moveIn TaskManager>>
|
||||
|
||||
me: 只要做一个齿轮置换,就完成了。
|
||||
|
||||
<<MessageBoxSetNull>>
|
||||
<<MessageBoxSetText 等待信号输入……>>
|
||||
|
||||
<<jump 检查状态>>
|
||||
===
|
||||
|
||||
|
||||
|
||||
|
||||
title: 检查状态
|
||||
position: 384,81
|
||||
---
|
||||
<<if $engineDone ==true>>
|
||||
// 全部插入后进入下一阶段
|
||||
<<wait 0.5>>
|
||||
<<task_moveOut TaskManager>>
|
||||
me: 所有的模块都检查过了。
|
||||
<<hide_dialog>>
|
||||
<<jump 进入阶段3>>
|
||||
<<endif>>
|
||||
// 未全部插入就进入等待插入事件状态
|
||||
===
|
||||
|
||||
|
||||
|
||||
|
||||
title: 进入阶段3
|
||||
group: 出口
|
||||
position: 385,938
|
||||
---
|
||||
<<set $gameStage = 3>>
|
||||
<<jump Center>>
|
||||
===
|
||||
|
||||
|
||||
|
||||
|
||||
// 事件节点
|
||||
|
||||
title: 检查_肺
|
||||
tags:
|
||||
group: 插入触发
|
||||
colorID: 8
|
||||
position: -161,-190
|
||||
---
|
||||
<<MessageBoxSetText 正在建立连接…>>
|
||||
<<wait 0.5>>
|
||||
<<MessageBoxSetNull>>
|
||||
<<MessageBoxSetText 换气模块>>
|
||||
<<wait 0.1>>
|
||||
<<MessageBoxSetText 进行内外部气体与热量交换,影响呼吸和散热相关的工作。>>
|
||||
->检查
|
||||
<<hide_dialog>>
|
||||
<<MessageBoxSetNull>>
|
||||
<<MessageBoxSetChecking>>
|
||||
<<if $lungProblemKnown == false>>
|
||||
<<wait 1>>
|
||||
<<endif>>
|
||||
<<wait 0.5>>
|
||||
<<MessageBoxSetNormal>>
|
||||
<<MessageBoxSetText 检查完成!没有发现错误>>
|
||||
<<wait 0.1>>
|
||||
<<MessageBoxSetText 检测到0个错误,0个警告,2个异常。38295个节点已扫描。>>
|
||||
<<if $lungProblemKnown == false>>
|
||||
->分析
|
||||
<<hide_dialog>>
|
||||
<<wait 0.5>>
|
||||
<<MessageBoxSetText " ">>
|
||||
<<MessageBoxSetText 报告传输完毕。>>
|
||||
<<wait 1.5>>
|
||||
me: 嗯。你的运动非常充足…应该说有点过于频繁了。
|
||||
<<set $lungProblemKnown=true>>
|
||||
<<else>>
|
||||
me: 换气系统的滤板积碳很严重。
|
||||
<<endif>>
|
||||
->结束
|
||||
<<jump 检查状态>>
|
||||
===
|
||||
|
||||
|
||||
|
||||
|
||||
title: 检查_心
|
||||
tags:
|
||||
group: 插入触发
|
||||
colorID: 8
|
||||
position: -158,-3
|
||||
---
|
||||
<<MessageBoxSetText 正在建立连接…>>
|
||||
<<wait 0.5>>
|
||||
<<MessageBoxSetText 动力模块>>
|
||||
<<wait 0.1>>
|
||||
<<MessageBoxSetText 将机体的燃料转化为电能/机械能,驱动机体和内部模块运转。>>
|
||||
->检查
|
||||
<<hide_dialog>>
|
||||
<<MessageBoxSetNull>>
|
||||
<<MessageBoxSetChecking>>
|
||||
<<if $engineProblemKnown == false>>
|
||||
<<wait 1>>
|
||||
<<endif>>
|
||||
<<wait 0.5>>
|
||||
<<MessageBoxSetWarning>>
|
||||
<<MessageBoxSetText 检查完成!没有发现错误>>
|
||||
<<wait 0.1>>
|
||||
<<MessageBoxSetText 检测到0个错误,0个警告,103个异常。122596个节点已扫描。>>
|
||||
<<if $engineProblemKnown == false>>
|
||||
->分析
|
||||
<<hide_dialog>>
|
||||
<<wait 0.5>>
|
||||
<<MessageBoxSetText " ">>
|
||||
<<MessageBoxSetText 报告传输完毕。>>
|
||||
<<wait 1.5>>
|
||||
me: 嗯…看起来一切正常。
|
||||
<<set $engineProblemKnown = true>>
|
||||
->进行齿轮置换
|
||||
<<jump 齿轮置换>>
|
||||
<<else>>
|
||||
me: 这套动力系统很高级,而且一切正常。
|
||||
->进行齿轮置换
|
||||
<<jump 齿轮置换>>
|
||||
<<endif>>
|
||||
->进行齿轮置换
|
||||
<<jump 齿轮置换>>
|
||||
->结束
|
||||
<<jump 检查状态>>
|
||||
===
|
||||
|
||||
|
||||
|
||||
|
||||
title: 检查_胃
|
||||
tags:
|
||||
colorID: 8
|
||||
group: 插入触发
|
||||
position: -160,191
|
||||
---
|
||||
<<MessageBoxSetText 正在建立连接…>>
|
||||
<<wait 0.5>>
|
||||
<<MessageBoxSetText 物质模块>>
|
||||
<<wait 0.1>>
|
||||
<<MessageBoxSetText 负责机体的物质和燃料摄入、处理和储存。>>
|
||||
->检查
|
||||
<<hide_dialog>>
|
||||
<<MessageBoxSetNull>>
|
||||
<<MessageBoxSetChecking>>
|
||||
<<if $fuelProblemKnown == false>>
|
||||
<<wait 1>>
|
||||
<<endif>>
|
||||
<<wait 0.5>>
|
||||
<<MessageBoxSetNormal>>
|
||||
<<MessageBoxSetText 检查完成!发现1个警告>>
|
||||
<<wait 0.1>>
|
||||
<<MessageBoxSetText 检测到0个错误,1个警告,7个异常。83423个节点已扫描。>>
|
||||
<<MessageBoxSetText "检查到油耗值偏高!">>
|
||||
<<wait 0.5>>
|
||||
me: 油耗…偏高?
|
||||
shitou: 对!医生,我就说嘛!<br>我跑起来怎么都不对劲。
|
||||
<<if $fuelProblemKnown == false>>
|
||||
->分析
|
||||
<<hide_dialog>>
|
||||
<<wait 0.5>>
|
||||
<<MessageBoxSetText "检查到油耗值偏高!">>
|
||||
<<wait 0.5>>
|
||||
<<MessageBoxSetText " ">>
|
||||
<<MessageBoxSetText 报告传输完毕。>>
|
||||
<<wait 1.5>>
|
||||
me: 确实,从今天开始的油耗都比往常高5%左右…
|
||||
me: 不过看起来…这个模块本身没有什么问题。<br>虽然还是不知道为什么油耗高。
|
||||
me: 嗯…你最近都吃了些啥?
|
||||
shitou: 当然是幸福牌~罐头!医生。
|
||||
me: 只有罐头?
|
||||
shitou: 罐头还不够好嘛!医生,推销员说这一罐罐头就能满足所有需要,不用换食!
|
||||
me: 怪不得…内容物这么单一。
|
||||
me: 不过这里确实没有和齿轮相关的信息。
|
||||
<<set $fuelProblemKnown = true>>
|
||||
<<else>>
|
||||
me: 石头最近摄入的食物十分单一,都是最基础款的罐头。
|
||||
me: 另外…它的油耗不过这里确实没有和齿轮相关的信息。
|
||||
<<endif>>
|
||||
->结束
|
||||
<<jump 检查状态>>
|
||||
===
|
||||
|
||||
|
||||
|
||||
|
||||
title: 检查_肝
|
||||
tags:
|
||||
colorID: 8
|
||||
group: 插入触发
|
||||
position: -158,370
|
||||
---
|
||||
<<MessageBoxSetNull>>
|
||||
<<MessageBoxSetText 正在建立连接…>>
|
||||
<<wait 0.2>>
|
||||
<<MessageBoxSetText 循环模块>>
|
||||
<<wait 0.1>>
|
||||
<<MessageBoxSetText 负责机体的冷却液净化处理,保证各模块的运行状态。>>
|
||||
->检查
|
||||
<<hide_dialog>>
|
||||
<<MessageBoxSetNull>>
|
||||
<<MessageBoxSetChecking>>
|
||||
<<if $bloodProblemKnown == false>>
|
||||
<<wait 1>>
|
||||
<<endif>>
|
||||
<<wait 0.5>>
|
||||
<<MessageBoxSetWarning>>
|
||||
<<MessageBoxSetText 检查完成!没有发现错误。 >>
|
||||
<<wait 0.1>>
|
||||
<<MessageBoxSetText 检测到0个错误,0个警告,4个异常。4286个节点已扫描。>>
|
||||
<<if $bloodProblemKnown == false>>
|
||||
->分析
|
||||
<<hide_dialog>>
|
||||
<<wait 0.5>>
|
||||
<<MessageBoxSetText " ">>
|
||||
<<MessageBoxSetText 报告传输完毕。>>
|
||||
<<wait 1.5>>
|
||||
me: 看起来这个模块没有什么太大的问题…算是个好消息。
|
||||
<<set $bloodProblemKnown = true>>
|
||||
<<else>>
|
||||
me: 看起来这个模块没有什么太大的问题。
|
||||
<<endif>>
|
||||
->结束
|
||||
<<jump 检查状态>>
|
||||
===
|
||||
|
||||
|
||||
|
||||
|
||||
title: 齿轮置换
|
||||
position: -861,940
|
||||
---
|
||||
|
||||
<<hide_dialog>>
|
||||
<<switch_fix_system_to "Engine">>
|
||||
<<set $engineProblemKnown = true>>
|
||||
|
||||
//??如果玩家在这里拉绳,是不是就听到音乐了?
|
||||
|
||||
<<open_gear_panel>>
|
||||
|
||||
引擎中回荡着一种低沉的声音,那是“音乐”的声音,只不过被拉长、降低了许多倍,听起来像一种噪声。
|
||||
me: 就是这个声音啊,你忘了?
|
||||
shitou: 听起来像是齿轮上的划痕发出的噪音,哈哈!
|
||||
me: …这不是我昨天说的吗……
|
||||
me: 好吧,不管怎样,我只需要替你换一个更大的变速齿轮。
|
||||
me: 一会跑起来,你听到加快之后的声音,应该就会记起来了。
|
||||
|
||||
->更换齿轮
|
||||
|
||||
<<close_gear_panel>>
|
||||
|
||||
<<complete_task TaskManager 更换动力模块的调速齿轮>>
|
||||
|
||||
你将调速齿轮取下,换成了一个更大的齿轮。
|
||||
|
||||
me: 好了…现在它应该可以跑得更快了…只要你更用力一些。
|
||||
shitou: 那我可擅长了,来试试吧!把那根绳拉到底!
|
||||
|
||||
<<add_task TaskManager 测试当前的最大转速>>
|
||||
|
||||
|
||||
->拉绳
|
||||
|
||||
<<jump 调速后测速>>
|
||||
|
||||
===
|
||||
|
||||
|
||||
|
||||
|
||||
title:调速后测速
|
||||
position: -419,937
|
||||
---
|
||||
|
||||
显然,由于齿轮的力矩比变化,现在速度的上升比以前更慢了。
|
||||
但随着齿轮嘎吱嘎吱响着,引擎被带到了比之前更高的转速。
|
||||
音乐声逐渐变得清晰,又逐渐升高,旋律开始变快,音调变高,越来越异常。
|
||||
|
||||
<<shake_camera 0.4 0.3 20>>
|
||||
<<wait 0.5>>
|
||||
|
||||
随着“啪”的一声巨响,转速停止了上升,开始下降,回到了怠速。音乐也随之戛然而止。
|
||||
|
||||
shitou: 啊,医生,好痛!
|
||||
|
||||
me: 听起来像是变速箱里出了什么问题……
|
||||
|
||||
<<add_task TaskManager 检查变速箱的异响>>
|
||||
|
||||
->打开变速箱盖
|
||||
|
||||
变速箱里的景象令人痛心。到处都是齿轮碎片,还有几片卡在了其他齿轮之间。
|
||||
而原来放着唱片齿轮的位置已经空了。
|
||||
|
||||
me: 它…碎了。
|
||||
shitou: 医生,那是什么声音?我好痛!
|
||||
me: 得赶紧把碎片清出来。
|
||||
|
||||
->清理齿轮碎片
|
||||
|
||||
你将齿轮碎片清理出来,变速箱恢复了正常运转。
|
||||
|
||||
shitou: 呼…刚才发生了什么?我只记得我听到一阵很好听的音乐,然后就……
|
||||
me: 可能是因为转速太高了。
|
||||
shitou: 什么?
|
||||
me: 它承受不住转速,就碎了。<br>这个齿轮本来就是额外的,而且也不是为这么高的转速设计的…
|
||||
shitou: 啊,原来是这样!
|
||||
shitou: 没关系,医生!反正你啥都能治好~哈哈!齿轮坏了,再换一个就是了!
|
||||
shitou: 话说…刚才我听到的那个音乐…是什么?<br>我还没有听过这么好听的音乐…!
|
||||
me: ……
|
||||
me: 你真的什么都不记得了?
|
||||
shitou: 记得…什么?
|
||||
shitou:嗨呀,医生!你知道我的记性不好的。
|
||||
me: 无论如何…调速是完成了。<br>让我们出来确认一下吧。
|
||||
|
||||
<<set $engineDone = true>>
|
||||
<<hide_dialog>>
|
||||
|
||||
<<jump 进入阶段3>>
|
||||
|
||||
===
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0ca5547d73673844593260a1b6053b84
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 11500000, guid: 94073015eacc34c1d8fc6786e43d60ca, type: 3}
|
||||
+1
-1
@@ -159,7 +159,7 @@ me: 来吧。
|
||||
|
||||
|
||||
title: 进入阶段4
|
||||
position: 213,321
|
||||
position: 213,170
|
||||
---
|
||||
<<set $gameStage = 4>>
|
||||
<<jump Center>>
|
||||
@@ -1,57 +0,0 @@
|
||||
title: Stage3disposed
|
||||
tags:
|
||||
position: 210,-342
|
||||
---
|
||||
<<jump 中间对话>>
|
||||
===
|
||||
|
||||
|
||||
|
||||
|
||||
title: 中间对话
|
||||
position: 212,-57
|
||||
---
|
||||
<<fade_in 1>>
|
||||
<<switch_fix_system_to "Clinic">>
|
||||
<<character_fade_in_new>>
|
||||
<<fade_out 1>>
|
||||
|
||||
<<character_pos 直立>>
|
||||
<<character_face_new 正常微微笑>>
|
||||
|
||||
看起来石头对于昨天发生的事情已经忘得一干二净了。
|
||||
他对这个音乐感到兴奋
|
||||
你知道有的机体为了提高运行效率会降低一些头部相关的模块能耗…<br>但是像石头这样差的记忆力,实在过于反常。
|
||||
看起来,他已经完全丢失了昨天的记忆。<br>这让你感到很可疑…
|
||||
你当前的任务已经完成了,可以直接结束这次治疗。<br>或者,你可以选择检查他的头部,寻找原因。
|
||||
->检查头部
|
||||
me: 这实在很奇怪…我不能坐视不管。
|
||||
<<hide_dialog>>
|
||||
<<jump toStage4>>
|
||||
->结束治疗
|
||||
me: 好吧,虽然这确实很奇怪…<br>但我想这和我没有什么关系。
|
||||
石头感谢你,和你告别,并离开了诊所。
|
||||
<<hide_dialog>>
|
||||
<<jump toStage0>>
|
||||
<<jump toStage4>>
|
||||
|
||||
===
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
title: toStage4
|
||||
position: 213,321
|
||||
---
|
||||
<<set $gameStage = 4>>
|
||||
<<jump Center>>
|
||||
===
|
||||
|
||||
|
||||
title: toStage0
|
||||
position: 213,321
|
||||
---
|
||||
<<set $gameStage = 0>>
|
||||
<<jump Center>>
|
||||
===
|
||||
@@ -1,10 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 08685e18943868f47bf9c78dae16f47a
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 11500000, guid: 94073015eacc34c1d8fc6786e43d60ca, type: 3}
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
title: Stage5
|
||||
title: Stage5
|
||||
tags:
|
||||
position: 210,-342
|
||||
---
|
||||
@@ -158,8 +158,8 @@ me: 跑呀.~跑呀..~再多.烦恼..统统.忘掉..~
|
||||
|
||||
|
||||
title: HE
|
||||
position: 213,321
|
||||
position: 215,86
|
||||
---
|
||||
<<set $gameStage = 8>>
|
||||
<<set $gameStage = 6>>
|
||||
<<jump Center>>
|
||||
===
|
||||
@@ -1,117 +0,0 @@
|
||||
title: LungPlugIn
|
||||
position: -1094,-98
|
||||
---
|
||||
<<jump 检查_肺>>
|
||||
===
|
||||
|
||||
|
||||
|
||||
|
||||
title: HeartPlugIn
|
||||
position: -816,-97
|
||||
---
|
||||
<<jump 检查_心>>
|
||||
===
|
||||
|
||||
|
||||
|
||||
|
||||
title: LiverPlugIn
|
||||
position: -533,-97
|
||||
---
|
||||
<<jump 检查_肝>>
|
||||
===
|
||||
|
||||
|
||||
|
||||
|
||||
title: StomachPlugIn
|
||||
position: -267,-102
|
||||
---
|
||||
<<jump 检查_胃>>
|
||||
===
|
||||
|
||||
|
||||
|
||||
|
||||
title: EmoPlugIn
|
||||
tags: 待编辑
|
||||
colorID: 8
|
||||
position: -2,-3039
|
||||
---
|
||||
<<jump 检查情绪>>
|
||||
===
|
||||
|
||||
|
||||
|
||||
|
||||
title: SpeakPlugIn
|
||||
tags: 待编辑
|
||||
colorID: 8
|
||||
position: 240,-2640
|
||||
---
|
||||
<<jump 检查语言>>
|
||||
===
|
||||
title: LogicPlugIn
|
||||
tags: 待编辑
|
||||
colorID: 8
|
||||
position: 480,-3040
|
||||
---
|
||||
<<jump 检查逻辑>>
|
||||
===
|
||||
|
||||
|
||||
|
||||
|
||||
title: ColorPlugIn
|
||||
tags: 待编辑
|
||||
colorID: 8
|
||||
position: 240,-2840
|
||||
---
|
||||
<<jump 检查色觉>>
|
||||
===
|
||||
|
||||
|
||||
|
||||
|
||||
title: MemoryPlugIn
|
||||
tags: 待编辑
|
||||
colorID: 8
|
||||
position: 240,-3040
|
||||
---
|
||||
<<jump 检查记忆>>
|
||||
===
|
||||
|
||||
|
||||
|
||||
|
||||
title: UFPlugIn
|
||||
tags: 待编辑
|
||||
colorID: 8
|
||||
position: 0,-2840
|
||||
---
|
||||
<<jump 检查UF>>
|
||||
===
|
||||
|
||||
|
||||
|
||||
|
||||
title: EyePlugIn
|
||||
tags: 待编辑
|
||||
colorID: 8
|
||||
position: 480,-2840
|
||||
---
|
||||
<<jump 检查视觉>>
|
||||
===
|
||||
|
||||
|
||||
|
||||
|
||||
title: EngineSuccess
|
||||
position: -1092,115
|
||||
---
|
||||
<<if $gameStage == 2>>
|
||||
<<jump 调速完成>>
|
||||
<<endif>>
|
||||
===
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8c03cf1f1e29e4f40b51d192a094b95c
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 11500000, guid: 94073015eacc34c1d8fc6786e43d60ca, type: 3}
|
||||
@@ -1,118 +0,0 @@
|
||||
title: Start
|
||||
tags:
|
||||
colorID: 8
|
||||
position: 205,-53
|
||||
---
|
||||
<<jump VarsInit>>
|
||||
===
|
||||
|
||||
|
||||
|
||||
|
||||
title: VarsInit
|
||||
tags:
|
||||
colorID: 4
|
||||
position: 205,199
|
||||
---
|
||||
///在这里决定这次诊疗的目标是什么,以及目标判断相关的数值
|
||||
|
||||
//【流程相关】
|
||||
//gamestage:1-引入对话;2-检查;3-检查后对话;4-调速;5-调速后对话(冷却液)
|
||||
<<declare $gameStage=3>>
|
||||
///【流程逻辑】
|
||||
//如果线索板都答对了,就自动触发这个为true,这是主目标
|
||||
<<declare $isFinishedClueBoard=false>>
|
||||
//冷却液处理完成次数。每次处理完成就往下推进一步
|
||||
<<declare $coolingCount=0>>
|
||||
|
||||
//一次性对白标记,需要播时设为true,在检查点检查到true播放一次性对白,播放完设回false
|
||||
<<declare $hintFlag=false>>
|
||||
|
||||
//掉速次数
|
||||
<<declare $failTime = 0>>
|
||||
//是否知道可以换滤板
|
||||
<<declare $lungProblemKnown=false>>
|
||||
//是否知道可以换燃料
|
||||
<<declare $fuelProblemKnown=false>>
|
||||
//是否知道可以调压力
|
||||
<<declare $engineProblemKnown=false>>
|
||||
//是否知道冷却液浑浊
|
||||
<<declare $engineDone=false>>
|
||||
//是否完成了引擎自检
|
||||
<<declare $bloodProblemKnown=false>>
|
||||
//是否知道冷却液换过
|
||||
<<declare $bloodRenewedKnown=false>>
|
||||
//是否对冷却液换过却很脏提过疑惑
|
||||
<<declare $bloodQuestioned=false>>
|
||||
|
||||
//选择的透析剂
|
||||
<<declare $selection = 0>>
|
||||
|
||||
<<declare $emoChecked = false>>
|
||||
<<declare $logicChecked = false>>
|
||||
<<declare $memoryChecked = false>>
|
||||
<<declare $eyeChecked = false>>
|
||||
<<declare $speakerChecked = false>>
|
||||
<<declare $memoryPlayed = false>>
|
||||
<<declare $songOriginal = true>>
|
||||
|
||||
|
||||
//【功能相关】
|
||||
//clueboard相关
|
||||
<<declare $StartNode="">>
|
||||
<<declare $EndNode="">>
|
||||
|
||||
//插线
|
||||
<<declare $currentSocket="">>
|
||||
<<declare $PlugCount=0>>
|
||||
<<declare $PlugAll=false>>
|
||||
|
||||
<<jump Center>>
|
||||
===
|
||||
|
||||
|
||||
|
||||
|
||||
title: Center
|
||||
description: 脚本跳转中心,GameStage在此处处理,理论上不在其他地方读取GameStage
|
||||
position: 205,446
|
||||
colorID: 1
|
||||
---
|
||||
// 每次进入维修界面就自动保存
|
||||
<<auto_save>>
|
||||
|
||||
//gamestage:1-引入对话;2-头部检查;3-头部检查后对话;4-刻录;5-结束对话;0-BE对话
|
||||
// 引入对话
|
||||
<<if $gameStage == 1>>
|
||||
<<jump Stage1>>
|
||||
<<endif>>
|
||||
|
||||
<<if $gameStage == 2>>
|
||||
<<jump Stage2>>
|
||||
<<endif>>
|
||||
|
||||
<<if $gameStage == 3>>
|
||||
<<jump Stage3>>
|
||||
<<endif>>
|
||||
|
||||
<<if $gameStage == 4>>
|
||||
<<jump Stage4>>
|
||||
<<endif>>
|
||||
|
||||
<<if $gameStage == 5>>
|
||||
<<jump Stage5>>
|
||||
<<endif>>
|
||||
|
||||
<<if $gameStage == 6>>
|
||||
<<NextYarn>>
|
||||
<<endif>>
|
||||
|
||||
<<if $gameStage == 8>>
|
||||
<<NextYarn>>
|
||||
<<endif>>
|
||||
|
||||
===
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b30dca0a7523c39459a2509c2dd3cfe9
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 11500000, guid: 94073015eacc34c1d8fc6786e43d60ca, type: 3}
|
||||
@@ -1,12 +0,0 @@
|
||||
{
|
||||
"projectFileVersion": 2,
|
||||
"sourceFiles": [
|
||||
"*.yarn"
|
||||
],
|
||||
"excludeFiles": [
|
||||
"**/*~/*"
|
||||
],
|
||||
"localisation": {},
|
||||
"baseLanguage": "zh-CHS",
|
||||
"compilerOptions": {}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b254008a450f4c242b25311130c2592a
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 11500000, guid: 053561912b1654d80a424bb0696a74ae, type: 3}
|
||||
useAddressableAssets: 0
|
||||
UseUnityLocalisationSystem: 0
|
||||
unityLocalisationStringTableCollection: {instanceID: 0}
|
||||
@@ -1,143 +0,0 @@
|
||||
title: LungPlugIn
|
||||
position: -1094,-98
|
||||
---
|
||||
<<if $gameStage < 5>>
|
||||
<<jump 检查_肺>>
|
||||
<<else>>
|
||||
<<jump 检查_肺_2>>
|
||||
<<endif>>
|
||||
===
|
||||
|
||||
|
||||
|
||||
|
||||
title: HeartPlugIn
|
||||
position: -816,-97
|
||||
---
|
||||
<<jump 检查_心_2>>
|
||||
===
|
||||
|
||||
|
||||
|
||||
|
||||
title: LiverPlugIn
|
||||
position: -533,-97
|
||||
---
|
||||
<<if $gameStage < 5>>
|
||||
<<jump 检查_肝>>
|
||||
<<else>>
|
||||
<<jump 检查_肝_2>>
|
||||
<<endif>>
|
||||
===
|
||||
|
||||
|
||||
|
||||
|
||||
title: StomachPlugIn
|
||||
position: -267,-102
|
||||
--- z
|
||||
<<if $gameStage == 2>>
|
||||
<<jump 检查_胃>>
|
||||
<<else>>
|
||||
<<jump 检查_胃_2>>
|
||||
<<endif>>
|
||||
===
|
||||
|
||||
|
||||
|
||||
|
||||
title: EmoPlugIn
|
||||
tags: 待编辑
|
||||
colorID: 8
|
||||
position: -2,-3039
|
||||
---
|
||||
<<jump 检查情绪>>
|
||||
===
|
||||
|
||||
|
||||
|
||||
|
||||
title: SpeakPlugIn
|
||||
tags: 待编辑
|
||||
colorID: 8
|
||||
position: 240,-2640
|
||||
---
|
||||
<<jump 检查语言>>
|
||||
===
|
||||
|
||||
|
||||
|
||||
|
||||
title: LogicPlugIn
|
||||
tags: 待编辑
|
||||
colorID: 8
|
||||
position: 480,-3040
|
||||
---
|
||||
<<jump 检查逻辑>>
|
||||
===
|
||||
|
||||
|
||||
|
||||
|
||||
title: ColorPlugIn
|
||||
tags: 待编辑
|
||||
colorID: 8
|
||||
position: 240,-2840
|
||||
---
|
||||
<<jump 检查色觉>>
|
||||
===
|
||||
|
||||
|
||||
|
||||
|
||||
title: MemoryPlugIn
|
||||
tags: 待编辑
|
||||
colorID: 8
|
||||
position: 240,-3040
|
||||
---
|
||||
<<jump 检查记忆>>
|
||||
===
|
||||
|
||||
|
||||
|
||||
|
||||
title: UFPlugIn
|
||||
tags: 待编辑
|
||||
colorID: 8
|
||||
position: 0,-2840
|
||||
---
|
||||
<<jump 检查UF>>
|
||||
===
|
||||
|
||||
|
||||
|
||||
|
||||
title: EyePlugIn
|
||||
tags: 待编辑
|
||||
colorID: 8
|
||||
position: 480,-2840
|
||||
---
|
||||
<<jump 检查视觉>>
|
||||
===
|
||||
|
||||
|
||||
|
||||
|
||||
title: MemoryDeepIn
|
||||
tags:
|
||||
---
|
||||
<<close_screen>>
|
||||
<<jump 记忆深入>>
|
||||
===
|
||||
|
||||
|
||||
|
||||
|
||||
title: EngineSuccess
|
||||
position: -1092,115
|
||||
---
|
||||
<<if $gameStage == 2>>
|
||||
<<jump 调速完成>>
|
||||
<<endif>>
|
||||
===
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7cc382aa15e3a224c8f6e2e17c1c7d60
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 11500000, guid: 94073015eacc34c1d8fc6786e43d60ca, type: 3}
|
||||
@@ -1,118 +0,0 @@
|
||||
title: Start
|
||||
tags:
|
||||
colorID: 8
|
||||
position: 205,-53
|
||||
---
|
||||
<<jump VarsInit>>
|
||||
===
|
||||
|
||||
|
||||
|
||||
|
||||
title: VarsInit
|
||||
tags:
|
||||
colorID: 4
|
||||
position: 205,199
|
||||
---
|
||||
///在这里决定这次诊疗的目标是什么,以及目标判断相关的数值
|
||||
|
||||
//【流程相关】
|
||||
//gamestage:1-引入对话;2-检查;3-检查后对话;4-调速;5-调速后对话(冷却液)
|
||||
<<declare $gameStage=2>>
|
||||
///【流程逻辑】
|
||||
//如果线索板都答对了,就自动触发这个为true,这是主目标
|
||||
<<declare $isFinishedClueBoard=false>>
|
||||
//冷却液处理完成次数。每次处理完成就往下推进一步
|
||||
<<declare $coolingCount=0>>
|
||||
|
||||
//一次性对白标记,需要播时设为true,在检查点检查到true播放一次性对白,播放完设回false
|
||||
<<declare $hintFlag=false>>
|
||||
|
||||
//掉速次数
|
||||
<<declare $failTime = 0>>
|
||||
//是否知道可以换滤板
|
||||
<<declare $lungProblemKnown=false>>
|
||||
//是否知道可以换燃料
|
||||
<<declare $fuelProblemKnown=false>>
|
||||
//是否知道可以调压力
|
||||
<<declare $engineProblemKnown=false>>
|
||||
//是否知道冷却液浑浊
|
||||
<<declare $engineDone=false>>
|
||||
//是否完成了引擎自检
|
||||
<<declare $bloodProblemKnown=false>>
|
||||
//是否知道冷却液换过
|
||||
<<declare $bloodRenewedKnown=false>>
|
||||
//是否对冷却液换过却很脏提过疑惑
|
||||
<<declare $bloodQuestioned=false>>
|
||||
|
||||
//选择的透析剂
|
||||
<<declare $selection = 0>>
|
||||
|
||||
<<declare $emoChecked = false>>
|
||||
<<declare $logicChecked = false>>
|
||||
<<declare $memoryChecked = false>>
|
||||
<<declare $eyeChecked = false>>
|
||||
<<declare $speakerChecked = false>>
|
||||
<<declare $memoryPlayed = false>>
|
||||
<<declare $songOriginal = true>>
|
||||
|
||||
|
||||
//【功能相关】
|
||||
//clueboard相关
|
||||
<<declare $StartNode="">>
|
||||
<<declare $EndNode="">>
|
||||
|
||||
//插线
|
||||
<<declare $currentSocket="">>
|
||||
<<declare $PlugCount=0>>
|
||||
<<declare $PlugAll=false>>
|
||||
|
||||
<<jump Center>>
|
||||
===
|
||||
|
||||
|
||||
|
||||
|
||||
title: Center
|
||||
description: 脚本跳转中心,GameStage在此处处理,理论上不在其他地方读取GameStage
|
||||
position: 205,446
|
||||
colorID: 1
|
||||
---
|
||||
// 每次进入维修界面就自动保存
|
||||
<<auto_save>>
|
||||
|
||||
//gamestage:1-引入对话;2-头部检查;3-头部检查后对话;4-刻录;5-结束对话;0-BE对话
|
||||
// 引入对话
|
||||
<<if $gameStage == 1>>
|
||||
<<jump Stage1>>
|
||||
<<endif>>
|
||||
|
||||
<<if $gameStage == 2>>
|
||||
<<jump Stage2>>
|
||||
<<endif>>
|
||||
|
||||
<<if $gameStage == 3>>
|
||||
<<jump Stage3>>
|
||||
<<endif>>
|
||||
|
||||
<<if $gameStage == 4>>
|
||||
<<jump Stage4>>
|
||||
<<endif>>
|
||||
|
||||
<<if $gameStage == 5>>
|
||||
<<jump Stage5>>
|
||||
<<endif>>
|
||||
|
||||
<<if $gameStage == 6>>
|
||||
<<NextYarn>>
|
||||
<<endif>>
|
||||
|
||||
<<if $gameStage == 0>>
|
||||
<<NextYarn>>
|
||||
<<endif>>
|
||||
|
||||
===
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 70434527bc1e003458a73d41873fbce1
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 11500000, guid: 94073015eacc34c1d8fc6786e43d60ca, type: 3}
|
||||
@@ -1,12 +0,0 @@
|
||||
{
|
||||
"projectFileVersion": 2,
|
||||
"sourceFiles": [
|
||||
"*.yarn"
|
||||
],
|
||||
"excludeFiles": [
|
||||
"**/*~/*"
|
||||
],
|
||||
"localisation": {},
|
||||
"baseLanguage": "zh-CHS",
|
||||
"compilerOptions": {}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b7787a998da53b74c854f2e09dccec52
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 11500000, guid: 053561912b1654d80a424bb0696a74ae, type: 3}
|
||||
useAddressableAssets: 0
|
||||
UseUnityLocalisationSystem: 0
|
||||
unityLocalisationStringTableCollection: {instanceID: 0}
|
||||
+14042
-3613
File diff suppressed because it is too large
Load Diff
+1396
-1522
File diff suppressed because it is too large
Load Diff
@@ -10024,10 +10024,6 @@ MonoBehaviour:
|
||||
- {fileID: 11400000, guid: 8d8b11f0c2fbc4d4cb8c2857d98383c9, type: 2}
|
||||
- {fileID: 11400000, guid: ff82a99e791be3e41acf40232f908eb3, type: 2}
|
||||
- {fileID: 11400000, guid: afc5b01ef301cc74db7cae741acad427, type: 2}
|
||||
- {fileID: 11400000, guid: 9e3b2c77ad4a9454188d458da2cf0ddd, type: 2}
|
||||
- {fileID: 11400000, guid: e749fe0f9aa32f44097e037f52a5bfe0, type: 2}
|
||||
- {fileID: 11400000, guid: 7bf300be492f2634580f0eaabcca2b2e, type: 2}
|
||||
- {fileID: 11400000, guid: 088974ca6c9487041b695af86b6c93a1, type: 2}
|
||||
runMode: 0
|
||||
firstTalkSo: {fileID: 11400000, guid: ac5ca9a66ff22ab4b9cd5adbdade6b8c, type: 2}
|
||||
testTalkSo: {fileID: 11400000, guid: 10601ce26230723479d875a630f15732, type: 2}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
<<<<<<<< HEAD:Assets/Scenes/ExpressFixScene.unity.meta
|
||||
guid: 8782be70636ad314b8f60a637f3d1917
|
||||
========
|
||||
guid: 2c99bb256d7eae145a3c3e601cd2680b
|
||||
folderAsset: yes
|
||||
>>>>>>>> feature/地铁功能:Assets/Resources/Yarn/SubWay.meta
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ae752314f29a498468c7234bdd6ce1fa
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,229 +0,0 @@
|
||||
using UnityEngine;
|
||||
using Yarn.Unity;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using DG.Tweening;
|
||||
|
||||
public class CharacterManager : MonoBehaviour
|
||||
{
|
||||
private Dictionary<string, GameObject> loadedCharacters = new Dictionary<string, GameObject>();
|
||||
private GameObject currentCharacter;
|
||||
|
||||
// 图层引用
|
||||
private SpriteRenderer eyeLayer;
|
||||
private SpriteRenderer frownLayer;
|
||||
private SpriteRenderer smileLayer;
|
||||
private SpriteRenderer openEyesTearsLayer;
|
||||
private SpriteRenderer closedEyesTearsLayer;
|
||||
|
||||
private Coroutine autoBlinkCoroutine;
|
||||
|
||||
private float characterAlpha;
|
||||
|
||||
[YarnCommand("character_init")]
|
||||
public IEnumerator CharacterInit(string characterName)
|
||||
{
|
||||
if (!loadedCharacters.ContainsKey(characterName))
|
||||
{
|
||||
// 异步加载角色预制体
|
||||
ResourceRequest request = Resources.LoadAsync<GameObject>($"Characters/{characterName}");
|
||||
yield return request;
|
||||
|
||||
GameObject characterPrefab = request.asset as GameObject;
|
||||
if (characterPrefab != null)
|
||||
{
|
||||
GameObject characterInstance = Instantiate(characterPrefab, transform);
|
||||
loadedCharacters[characterName] = characterInstance;
|
||||
characterInstance.SetActive(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError($"Character prefab {characterName} not found in Resources/Characters");
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
currentCharacter = loadedCharacters[characterName];
|
||||
|
||||
// 获取图层引用
|
||||
eyeLayer = currentCharacter.transform.Find("EyeLayer").GetComponent<SpriteRenderer>();
|
||||
frownLayer = currentCharacter.transform.Find("FrownLayer").GetComponent<SpriteRenderer>();
|
||||
smileLayer = currentCharacter.transform.Find("SmileLayer").GetComponent<SpriteRenderer>();
|
||||
openEyesTearsLayer = currentCharacter.transform.Find("OpenEyesTearsLayer").GetComponent<SpriteRenderer>();
|
||||
closedEyesTearsLayer = currentCharacter.transform.Find("ClosedEyesTearsLayer").GetComponent<SpriteRenderer>();
|
||||
|
||||
|
||||
|
||||
// 初始化图层状态
|
||||
eyeLayer.enabled = false;
|
||||
yield return null;
|
||||
frownLayer.enabled = false;
|
||||
yield return null;
|
||||
smileLayer.enabled = false;
|
||||
yield return null;
|
||||
openEyesTearsLayer.enabled = false;
|
||||
yield return null;
|
||||
closedEyesTearsLayer.enabled = false;
|
||||
|
||||
// 初始化角色透明度
|
||||
SetCharacterAlpha(0);
|
||||
|
||||
// 等待一帧,确保初始化完成
|
||||
yield return new WaitForSeconds(1);
|
||||
|
||||
// 激活角色
|
||||
currentCharacter.SetActive(true);
|
||||
}
|
||||
|
||||
[YarnCommand("wait_for_character_init")]
|
||||
public IEnumerator WaitForCharacterInit(string characterName)
|
||||
{
|
||||
yield return StartCoroutine(CharacterInit(characterName));
|
||||
}
|
||||
|
||||
[YarnCommand("character_show")]
|
||||
public void CharacterShow(string characterName)
|
||||
{
|
||||
if (currentCharacter != null)
|
||||
{
|
||||
// 将角色的透明度设置为 1
|
||||
SetCharacterAlpha(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError($"Character {characterName} not found in loaded characters.");
|
||||
}
|
||||
}
|
||||
|
||||
[YarnCommand("character_fade_in")]
|
||||
public IEnumerator CharacterFadeIn(float duration = 1f)
|
||||
{
|
||||
if (currentCharacter != null)
|
||||
{
|
||||
yield return FadeCharacter(0, 1, duration);
|
||||
}
|
||||
}
|
||||
|
||||
[YarnCommand("character_fade_out")]
|
||||
public IEnumerator CharacterFadeOut(float duration = 1f)
|
||||
{
|
||||
if (currentCharacter != null)
|
||||
{
|
||||
yield return FadeCharacter(1, 0, duration);
|
||||
currentCharacter.SetActive(false);
|
||||
}
|
||||
}
|
||||
|
||||
private void SetCharacterAlpha(float alpha)
|
||||
{
|
||||
characterAlpha = alpha;
|
||||
SpriteRenderer[] renderers = currentCharacter.GetComponentsInChildren<SpriteRenderer>();
|
||||
foreach (var renderer in renderers)
|
||||
{
|
||||
Color color = renderer.color;
|
||||
color.a = alpha;
|
||||
renderer.color = color;
|
||||
}
|
||||
}
|
||||
|
||||
private IEnumerator FadeCharacter(float fromAlpha, float toAlpha, float duration)
|
||||
{
|
||||
yield return DOTween.To(() => characterAlpha, x => SetCharacterAlpha(x), toAlpha, duration).WaitForCompletion();
|
||||
}
|
||||
|
||||
[YarnCommand("character_eye")]
|
||||
public void SetEyeState(string state)
|
||||
{
|
||||
if (autoBlinkCoroutine != null)
|
||||
{
|
||||
StopCoroutine(autoBlinkCoroutine);
|
||||
autoBlinkCoroutine = null;
|
||||
}
|
||||
|
||||
switch (state)
|
||||
{
|
||||
case "open":
|
||||
eyeLayer.enabled = true;
|
||||
break;
|
||||
case "close":
|
||||
eyeLayer.enabled = false;
|
||||
break;
|
||||
case "blink":
|
||||
StartCoroutine(Blink());
|
||||
break;
|
||||
case "auto_blink":
|
||||
autoBlinkCoroutine = StartCoroutine(AutoBlink(true));
|
||||
break;
|
||||
default:
|
||||
Debug.LogError("Unknown eye state: " + state);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private IEnumerator Blink()
|
||||
{
|
||||
eyeLayer.enabled = false;
|
||||
yield return new WaitForSeconds(0.1f);
|
||||
eyeLayer.enabled = true;
|
||||
}
|
||||
|
||||
private IEnumerator AutoBlink(bool immediateBlink)
|
||||
{
|
||||
if (immediateBlink)
|
||||
{
|
||||
yield return Blink();
|
||||
}
|
||||
|
||||
while (true)
|
||||
{
|
||||
yield return new WaitForSeconds(6f);
|
||||
yield return Blink();
|
||||
}
|
||||
}
|
||||
|
||||
[YarnCommand("character_face")]
|
||||
public void SetFaceState(string state)
|
||||
{
|
||||
switch (state)
|
||||
{
|
||||
case "default":
|
||||
frownLayer.enabled = false;
|
||||
smileLayer.enabled = false;
|
||||
break;
|
||||
case "frown":
|
||||
frownLayer.enabled = true;
|
||||
smileLayer.enabled = false;
|
||||
break;
|
||||
case "smile":
|
||||
frownLayer.enabled = false;
|
||||
smileLayer.enabled = true;
|
||||
break;
|
||||
default:
|
||||
Debug.LogError("Unknown face state: " + state);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
[YarnCommand("character_crying")]
|
||||
public void SetCrying(bool isCrying)
|
||||
{
|
||||
if (isCrying)
|
||||
{
|
||||
if (eyeLayer.enabled)
|
||||
{
|
||||
openEyesTearsLayer.enabled = true;
|
||||
closedEyesTearsLayer.enabled = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
openEyesTearsLayer.enabled = false;
|
||||
closedEyesTearsLayer.enabled = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
openEyesTearsLayer.enabled = false;
|
||||
closedEyesTearsLayer.enabled = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d109d83a617c845469dcde9ac20246be
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using AibisDream.Framework;
|
||||
using Newtonsoft.Json;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -10,11 +9,9 @@ namespace AibisDream.FixSystem
|
||||
#region 组件引用
|
||||
|
||||
private const string SocketObjName = "Socket";
|
||||
private const string ModulePicName = "Module Pic";
|
||||
|
||||
public Transform socketPos;
|
||||
|
||||
// public Transform _indicatorPos;
|
||||
private BodyModuleSystem _bodyModuleSystem;
|
||||
private Material _highlightMaterial;
|
||||
private Material _alarmMaterial;
|
||||
@@ -68,12 +65,6 @@ namespace AibisDream.FixSystem
|
||||
{
|
||||
}
|
||||
|
||||
public void DeepIn()
|
||||
{
|
||||
if(DialogController.Instance)
|
||||
DialogController.Instance.StartDialogNode(data.DeepInNodeName);
|
||||
}
|
||||
|
||||
public Vector3 GetSocketPos()
|
||||
{
|
||||
return socketPos.position;
|
||||
@@ -81,41 +72,6 @@ namespace AibisDream.FixSystem
|
||||
|
||||
#endregion
|
||||
|
||||
#region 模块数据保存与卸载
|
||||
|
||||
public void Load(BodyModuleData newData)
|
||||
{
|
||||
var modulePic = transform.Find(ModulePicName).GetComponent<SpriteRenderer>();
|
||||
var newSocketPos = transform.Find(SocketObjName);
|
||||
|
||||
gameObject.name = newData.moduleName;
|
||||
// 初始化位置与外形
|
||||
transform.localPosition = newData.ModulePos;
|
||||
modulePic.sprite = newData.ModulePic;
|
||||
newSocketPos.localPosition = newData.SocketPos;
|
||||
// 数据同步
|
||||
data = newData;
|
||||
|
||||
InitReference();
|
||||
}
|
||||
|
||||
public BodyModuleData Save()
|
||||
{
|
||||
var modulePic = transform.Find(ModulePicName).GetComponent<SpriteRenderer>();
|
||||
var newSocketPos = transform.Find(SocketObjName);
|
||||
|
||||
return new BodyModuleData
|
||||
{
|
||||
moduleName = data.moduleName,
|
||||
ModulePic = modulePic.sprite,
|
||||
ModulePos = transform.localPosition,
|
||||
SocketPos = newSocketPos.localPosition,
|
||||
cantStopRunning = data.cantStopRunning,
|
||||
};
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 高亮提示和隐藏
|
||||
|
||||
public void Highlight(bool enable)
|
||||
@@ -142,42 +98,11 @@ namespace AibisDream.FixSystem
|
||||
public struct BodyModuleData
|
||||
{
|
||||
public const string PlugInNodeTemplate = "{0}PlugIn";
|
||||
public const string DeepInTemplate = "{0}DeepIn";
|
||||
|
||||
// ID
|
||||
public string moduleName;
|
||||
|
||||
// 外形信息
|
||||
public string modulePicPath;
|
||||
public SerializableVector3 modulePos;
|
||||
public SerializableVector3 socketPos;
|
||||
|
||||
// 功能信息
|
||||
[Header("功能参数")] public bool cantStopRunning;
|
||||
|
||||
// 只读
|
||||
[JsonIgnore] public string PlugInNodeName => string.Format(PlugInNodeTemplate, moduleName);
|
||||
[JsonIgnore] public string DeepInNodeName => string.Format(DeepInTemplate, moduleName);
|
||||
|
||||
[JsonIgnore]
|
||||
public Sprite ModulePic
|
||||
{
|
||||
get => !string.IsNullOrEmpty(modulePicPath) ? ResourceKit.LoadSpriteFromPsd(modulePicPath) : null;
|
||||
set => modulePicPath = ResourceKit.SaveSprite(value);
|
||||
}
|
||||
|
||||
[JsonIgnore]
|
||||
public Vector3 ModulePos
|
||||
{
|
||||
get => modulePos.ToVector3();
|
||||
set => modulePos = new SerializableVector3(value);
|
||||
}
|
||||
|
||||
[JsonIgnore]
|
||||
public Vector3 SocketPos
|
||||
{
|
||||
get => socketPos.ToVector3();
|
||||
set => socketPos = new SerializableVector3(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,35 +1,30 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Linq;
|
||||
using AibisDream.Framework;
|
||||
using AibisDream.Kit;
|
||||
using Cinemachine;
|
||||
using UnityEngine;
|
||||
using System.Collections.Generic;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace AibisDream.FixSystem
|
||||
{
|
||||
public class BodyModuleSystem : SystemHasData
|
||||
public class BodyModuleSystem : MonoBehaviour
|
||||
{
|
||||
public static string DataPath = Application.streamingAssetsPath + "/LevelData/BodyModuleSystem/";
|
||||
|
||||
#region 内部索引
|
||||
|
||||
public List<BodyModule> BodyModules { get; private set; }
|
||||
private BodyModule[] BodyModules { get; set; }
|
||||
|
||||
private GameObject _bodyModuleGroup;
|
||||
private GameObject _headModuleGroup;
|
||||
|
||||
public CableSystem CableSystem { get; private set; }
|
||||
public GameObject bodyModulePrefab;
|
||||
[HideInInspector] public Transform bodyModuleGroup;
|
||||
[HideInInspector] public HeatMapController heatMapController;
|
||||
|
||||
#endregion
|
||||
|
||||
#region 数据保存相关
|
||||
|
||||
public override string CurDataKey { get; set; }
|
||||
private string[] _keyOptions;
|
||||
|
||||
#endregion
|
||||
|
||||
#region 系统状态
|
||||
|
||||
private readonly ModuleSystemData _data = new();
|
||||
public bool inHotErr;
|
||||
private int _heatValue;
|
||||
public bool isAvailable;
|
||||
@@ -50,15 +45,18 @@ namespace AibisDream.FixSystem
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
|
||||
InitComponentRefs();
|
||||
}
|
||||
|
||||
private void InitComponentRefs()
|
||||
{
|
||||
// 注册数据
|
||||
StorageSystem.Instance.RegisterData(_data);
|
||||
|
||||
// 处理内部索引
|
||||
BodyModules = transform.GetComponentsInChildren<BodyModule>().ToList();
|
||||
CableSystem = transform.Find("Cable System").GetComponent<CableSystem>();
|
||||
bodyModuleGroup = transform.Find("Body Module Group");
|
||||
_bodyModuleGroup = transform.Find("Body Module Group")?.gameObject;
|
||||
_headModuleGroup = transform.Find("Head Module Group")?.gameObject;
|
||||
if (transform.Find("HeatMapController"))
|
||||
{
|
||||
heatMapController = transform.Find("HeatMapController").GetComponent<HeatMapController>();
|
||||
@@ -72,6 +70,7 @@ namespace AibisDream.FixSystem
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
StorageSystem.Instance.UnregisterData<ModuleSystemData>();
|
||||
CameraKit.Instance.UnRegisterCamera(CameraEnum.BodyModule);
|
||||
}
|
||||
|
||||
@@ -126,23 +125,6 @@ namespace AibisDream.FixSystem
|
||||
return BodyModules?.FirstOrDefault(module => module.data.moduleName == modulename);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设置死循环状态
|
||||
/// </summary>
|
||||
public void SetModuleState_CantStopRunning(string moduleName, bool state)
|
||||
{
|
||||
BodyModule result = FindBodyModuleByName(moduleName);
|
||||
if (result != null)
|
||||
{
|
||||
Debug.Log("Found module: " + moduleName);
|
||||
result.data.cantStopRunning = state;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Module not found.");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设置发热
|
||||
/// </summary>
|
||||
@@ -184,112 +166,6 @@ namespace AibisDream.FixSystem
|
||||
CableSystem.ResetPlug();
|
||||
}
|
||||
|
||||
public void HandleDeepIn()
|
||||
{
|
||||
if (CableSystem.curBodyModule)
|
||||
{
|
||||
CableSystem.curBodyModule.DeepIn();
|
||||
}
|
||||
}
|
||||
|
||||
#region 数据加载与保存
|
||||
|
||||
public override string GetConfigPath()
|
||||
{
|
||||
return DataPath;
|
||||
}
|
||||
|
||||
public override void LoadLevel()
|
||||
{
|
||||
if (string.IsNullOrEmpty(CurDataKey))
|
||||
{
|
||||
Debug.Log("配置项名称为空");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!ConfigUtil.Instance.TryLoadConfig<BodyModuleSystemData>(DataPath + CurDataKey,
|
||||
out var data))
|
||||
{
|
||||
Debug.Log("没有找到配置项");
|
||||
return;
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
// 现将当前配置保存为temp避免丢失
|
||||
if (CurDataKey != "temp.json")
|
||||
{
|
||||
SaveByKey("temp.json");
|
||||
}
|
||||
#endif
|
||||
|
||||
// 加载数据
|
||||
LoadData(data);
|
||||
}
|
||||
|
||||
private void LoadData(BodyModuleSystemData systemData)
|
||||
{
|
||||
inHotErr = systemData.hasHotErr;
|
||||
|
||||
var oldModules = GetComponentsInChildren<BodyModule>();
|
||||
// 先销毁旧的Module
|
||||
foreach (var oldModule in oldModules)
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
DestroyImmediate(oldModule.gameObject);
|
||||
#else
|
||||
Destroy(oldModule);
|
||||
#endif
|
||||
}
|
||||
|
||||
// 再加载新的Module
|
||||
var newModules = new BodyModule[systemData.moduleDataArray.Length];
|
||||
for (int i = 0; i < systemData.moduleDataArray.Length; i++)
|
||||
{
|
||||
BodyModule newModule = Instantiate(bodyModulePrefab, bodyModuleGroup).GetComponent<BodyModule>();
|
||||
newModule.Load(systemData.moduleDataArray[i]);
|
||||
newModules[i] = newModule;
|
||||
}
|
||||
|
||||
BodyModules = newModules.ToList();
|
||||
}
|
||||
|
||||
public override void SaveLevel()
|
||||
{
|
||||
if (string.IsNullOrEmpty(CurDataKey)) return;
|
||||
|
||||
SaveByKey(CurDataKey);
|
||||
if (!_keyOptions.Contains(CurDataKey))
|
||||
{
|
||||
// 重新读取key
|
||||
_keyOptions = ConfigUtil.Instance.GetFileNames(DataPath);
|
||||
}
|
||||
}
|
||||
|
||||
private void SaveByKey(string key)
|
||||
{
|
||||
var oldModules = GetComponentsInChildren<BodyModule>();
|
||||
var moduleDataArray = new BodyModuleData[oldModules.Length];
|
||||
for (int i = 0; i < oldModules.Length; i++)
|
||||
{
|
||||
moduleDataArray[i] = oldModules[i].Save();
|
||||
}
|
||||
|
||||
var systemData = new BodyModuleSystemData
|
||||
{
|
||||
moduleDataArray = moduleDataArray,
|
||||
hasHotErr = inHotErr
|
||||
};
|
||||
|
||||
ConfigUtil.Instance.SaveConfig(systemData, DataPath + key);
|
||||
}
|
||||
|
||||
public void AddBodyModule()
|
||||
{
|
||||
Instantiate(bodyModulePrefab, bodyModuleGroup);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 激活交互系统
|
||||
/// </summary>
|
||||
@@ -305,11 +181,48 @@ namespace AibisDream.FixSystem
|
||||
{
|
||||
isAvailable = false;
|
||||
}
|
||||
|
||||
public void SwitchModuleGroup(ModuleState moduleState)
|
||||
{
|
||||
// 先切换Group
|
||||
switch (moduleState)
|
||||
{
|
||||
case ModuleState.Body:
|
||||
_bodyModuleGroup.SetActive(true);
|
||||
_headModuleGroup.SetActive(false);
|
||||
break;
|
||||
case ModuleState.Head:
|
||||
_bodyModuleGroup.SetActive(false);
|
||||
_headModuleGroup.SetActive(true);
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException(nameof(moduleState), moduleState, null);
|
||||
}
|
||||
// 重新获取ModuleGroup
|
||||
var root = moduleState == ModuleState.Body ? _bodyModuleGroup : _headModuleGroup;
|
||||
BodyModules = root.GetComponentsInChildren<BodyModule>();
|
||||
// 更改data
|
||||
_data.moduleState = moduleState;
|
||||
}
|
||||
}
|
||||
|
||||
public struct BodyModuleSystemData
|
||||
public class ModuleSystemData : IData
|
||||
{
|
||||
public bool hasHotErr;
|
||||
public BodyModuleData[] moduleDataArray;
|
||||
public ModuleState moduleState;
|
||||
|
||||
[JsonIgnore]
|
||||
public BodyModuleSystem bodyModuleSystem;
|
||||
|
||||
public IEnumerator Load()
|
||||
{
|
||||
bodyModuleSystem.SwitchModuleGroup(moduleState);
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
public enum ModuleState
|
||||
{
|
||||
Body,
|
||||
Head
|
||||
}
|
||||
}
|
||||
@@ -9,12 +9,6 @@ namespace AibisDream
|
||||
private static BodyModuleSystem BodyModuleSystem => FixSystemCenter.SystemDic.Get<BodyModuleSystem>();
|
||||
private static PunchTapeSystem PunchTapeSystem => FixSystemCenter.SystemDic.Get<PunchTapeSystem>();
|
||||
|
||||
[YarnCommand("SetModuleState_CantStopRunning")]
|
||||
public static void SetModuleState_CantStopRunning(string moduleName, bool state)
|
||||
{
|
||||
BodyModuleSystem.SetModuleState_CantStopRunning(moduleName, state);
|
||||
}
|
||||
|
||||
[YarnCommand("ShowHeatMap")]
|
||||
public static void ShowHeatMap()
|
||||
{
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using AibisDream.Framework;
|
||||
using UnityEngine;
|
||||
@@ -112,11 +113,14 @@ namespace AibisDream.FixSystem
|
||||
|
||||
public struct BodyModuleState : IState
|
||||
{
|
||||
private string _args;
|
||||
|
||||
public FixState GetState => FixState.BodyModule;
|
||||
|
||||
public void SetArgs(string args)
|
||||
{
|
||||
// 无
|
||||
// 设置参数
|
||||
_args = args;
|
||||
}
|
||||
|
||||
public IEnumerator Enter()
|
||||
@@ -125,6 +129,12 @@ namespace AibisDream.FixSystem
|
||||
|
||||
// 拔出插头
|
||||
bodyModuleSystem.ResetPlug();
|
||||
// 切换Body或Head
|
||||
if (Enum.TryParse<ModuleState>(_args, out var moduleState))
|
||||
{
|
||||
bodyModuleSystem.SwitchModuleGroup(moduleState);
|
||||
}
|
||||
|
||||
// 切换相机
|
||||
yield return CameraKit.Instance.SwitchCamera(CameraEnum.BodyModule);
|
||||
// 开启交互
|
||||
@@ -159,6 +169,10 @@ namespace AibisDream.FixSystem
|
||||
// 先切BodyModule
|
||||
if (!CameraKit.Instance.EqualToCameraState(CameraEnum.BodyModule))
|
||||
{
|
||||
// 先切BodyModule
|
||||
var bodyModule = FixSystemCenter.SystemDic.Get<BodyModuleSystem>();
|
||||
bodyModule.SwitchModuleGroup(ModuleState.Body);
|
||||
|
||||
yield return MainUIController.Instance?.FadeInSync(0.5f);
|
||||
yield return CameraKit.Instance.SwitchCamera(CameraEnum.BodyModule);
|
||||
yield return MainUIController.Instance?.FadeOutSync(0.5f);
|
||||
@@ -195,6 +209,9 @@ namespace AibisDream.FixSystem
|
||||
// 先切BodyModule
|
||||
if (!CameraKit.Instance.EqualToCameraState(CameraEnum.BodyModule))
|
||||
{
|
||||
var bodyModule = FixSystemCenter.SystemDic.Get<BodyModuleSystem>();
|
||||
bodyModule.SwitchModuleGroup(ModuleState.Body);
|
||||
|
||||
yield return CameraKit.Instance.SwitchCamera(CameraEnum.BodyModule);
|
||||
}
|
||||
|
||||
|
||||
@@ -84,7 +84,6 @@ namespace AibisDream.Framework
|
||||
{
|
||||
var key = typeof(T).AssemblyQualifiedName;
|
||||
if (key != null) _instances[key] = instance;
|
||||
Debug.Log(_instances.Count);
|
||||
}
|
||||
|
||||
public T Get<T>() where T : class, IData
|
||||
|
||||
Reference in New Issue
Block a user