重构插线和深入的逻辑,加入剪线的timeline

This commit is contained in:
2024-12-25 03:48:06 +08:00
parent c3876895d6
commit cc4d3a5a05
26 changed files with 4478 additions and 214 deletions
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: d539fa263af20b6489fdae7ccf0aff36
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
File diff suppressed because it is too large Load Diff
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 2624f43fbe016a3448d6b3c166e4f3a7
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -13,4 +13,4 @@ MonoBehaviour:
m_Name: SpeedAction
m_EditorClassIdentifier:
tagID: speed
defaultSpeed: 2
defaultSpeed: 4
Binary file not shown.
@@ -0,0 +1,140 @@
fileFormatVersion: 2
guid: b25680a6827f6d548be9f8c4b936a2bf
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.
@@ -0,0 +1,140 @@
fileFormatVersion: 2
guid: 8d0695bdcc4385247b6affebb0e03f80
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:
@@ -167,41 +167,19 @@ position: 43,-97
<<if visited("EyeCheckEnd")==true>>
【占位】玩家发现了视觉异常且深入了,没发现问题,佩佩说有个不该隐藏的事情要告诉你,要你再次检查视觉
<<add_task TaskManager 再次检查视觉模块 找到异常记忆的来源 >>
<<ModuleHightLight Eye true>>
<<elseif visited("发现视觉异常")==true&&visited("EyeCheckEnd")==false>>
【占位】玩家发现了视觉异常,但是没有深入视觉,提示玩家或许可以深入看看之前的视觉错误,也可以继续全身检查
<<add_task TaskManager 全身检查,寻找错误记忆调用的来源 找到异常记忆的来源 >>
<<jump 全身检查高亮>>
<<elseif visited("发现视觉异常")==false>>
【占位】玩家没有发现视觉异常,应该进行全身检查来寻找会调用记忆的模块
<<add_task TaskManager 全身检查,寻找错误记忆调用的来源 找到异常记忆的来源 >>
<<jump 全身检查高亮>>
<<endif>>
<<jump 主维修界面游戏状态检查>>
<<elseif $gameStage==5>>
<<jump 结论>>
<<endif>>
===
title: 全身检查高亮
tags:
position: 43,-97
---
<<if visited("EmoPlugIn")==false>>
<<ModuleHightLight Emo true>>
<<endif>>
<<if visited("SpeakPlugIn")==false>>
<<ModuleHightLight Speak true>>
<<endif>>
<<if visited("ColorPlugIn")==false>>
<<ModuleHightLight Color true>>
<<endif>>
<<if visited("LogicPlugIn")==false>>
<<ModuleHightLight Logic true>>
<<endif>>
<<if visited("Eye")==false>>
<<ModuleHightLight Eye true>>
<<endif>>
===
// title: UF图像问题回答正确
// tags:
@@ -1,4 +1,4 @@
title: EyeDeepIn
title: EyeDeepIn
tags:
position: -9,21
---
@@ -2,6 +2,19 @@
tags:
---
<<switch_fix_system_to Memory>>
<<if visited("OnMemoryViewShow")==false>>
me: 把打孔带放进插槽里,读取记忆吧。
<<ShowNotification ClueManager 提示 将打孔带拖至槽位>>
<<endif>>
<<if $gameStage<4>>
<<if $memoryCount==3>>
me: 该看的都看过了
<<switch_fix_system_to "BodyModule">>
<<endif>>
<<elseif $gameStage>4>>
me: 该看的都看过了
<<switch_fix_system_to "BodyModule">>
<<endif>>
===
title: End_memoryPaly
@@ -18,9 +18,13 @@ tags: 待编辑
colorID: 8
position: -2,-3039
---
<<MessageBoxSetChecking>>
<<wait 1>>
<<MessageBoxSetText 检测到情绪模块温度高,负荷超过平均值>>
<<MessageBoxSetText 仍未到达干预阈值,无需干预>>
<<MessageBoxSetNormal>>
<<if visited("EmoPlugIn")==false>>
<<set $PlugCount=$PlugCount+1>>
<<ModuleHightLight Emo false>>
<<jump PlugFinished>>
<<endif>>
===
@@ -29,10 +33,13 @@ tags: 待编辑
colorID: 8
position: 240,-2640
---
//待编辑
<<MessageBoxSetChecking>>
<<wait 1>>
<<MessageBoxSetText 语言模块运转正常,使用频率低>>
<<MessageBoxSetNormal>>
<<wait 0.5>>
<<if visited("SpeakPlugIn")==false>>
<<set $PlugCount=$PlugCount+1>>
<<ModuleHightLight Speak false>>
<<jump PlugFinished>>
<<endif>>
===
@@ -41,10 +48,13 @@ tags: 待编辑
colorID: 8
position: 480,-3040
---
<<MessageBoxSetChecking>>
<<wait 1>>
<<MessageBoxSetText 检测到逻辑模块负荷低于平均值>>
<<MessageBoxSetText 仍未到达干预阈值,无需干预>>
<<MessageBoxSetNormal>>
<<if visited("LogicPlugIn")==false>>
<<set $PlugCount=$PlugCount+1>>
<<ModuleHightLight Logic false>>
受到发热的影响,佩佩有点神智不清
<<jump PlugFinished>>
<<endif>>
//待编辑
@@ -56,10 +66,12 @@ tags: 待编辑
colorID: 8
position: 240,-2840
---
<<MessageBoxSetChecking>>
<<wait 1>>
<<MessageBoxSetText 未找到色觉晶圆>>
<<MessageBoxSetWarning>>
<<if visited("ColorPlugIn")==false>>
<<set $PlugCount=$PlugCount+1>>
<<ModuleHightLight Color false>>
待编辑
<<jump PlugFinished>>
<<endif>>
@@ -70,11 +82,19 @@ tags: 待编辑
colorID: 8
position: 240,-3040
---
<<MessageBoxSetChecking>>
<<wait 1>>
<<MessageBoxSetText 检测到记忆模块运转正常>>
<<MessageBoxSetText 检测到拥有合法记忆卡带>>
<<MessageBoxSetText 可以深入记忆模块查看记忆>>
<<MessageBoxSetNormal>>
<<EnableDeepInButton>>
<<if visited("MemoryPlugIn")==false>>
<<set $PlugCount=$PlugCount+1>>
<<jump PlugFinished>>
<<endif>>
//总体表现:对工作的焦虑、虚弱的身体状态
===
title: UFPlugIn
@@ -82,7 +102,14 @@ tags: 待编辑
colorID: 8
position: 0,-2840
---
<<jump PlugFinished>>
<<MessageBoxSetChecking>>
<<wait 1>>
<<MessageBoxSetText UF模块运转出现错误>>
<<MessageBoxSetText 需要深入UF模块控制台查看详细进程>>
<<MessageBoxSetError>>
<<wait 0.5>>
<<EnableDeepInButton>>
// <<jump PlugFinished>>
===
title: EyePlugIn
tags: 待编辑
@@ -91,10 +118,23 @@ position: 480,-2840
---
//待编辑
//佩佩很害怕,她意识到了原来的颜色再也回不来了
<<MessageBoxSetChecking>>
<<wait 1>>
<<if $gameStage==7>>
<<MessageBoxSetText 视觉模块未发现明显异常>>
<<MessageBoxSetText 仍需深入视觉模块详细复查>>
<<MessageBoxSetWarning>>
<<else>>
<<MessageBoxSetText 视觉模块运转出现错误>>
<<MessageBoxSetText 需要深入视觉模块查看详细情况>>
<<MessageBoxSetError>>
<<endif>>
<<wait 0.5>>
<<EnableDeepInButton>>
<<if visited("EyePlugIn")==false>>
<<set $PlugCount=$PlugCount+1>>
<<jump 发现视觉异常>>
//<<jump PlugFinished>>
//<<jump 发现视觉异常>>
<<jump PlugFinished>>
<<endif>>
===
@@ -159,7 +159,6 @@ position: 251,-1150
<<CollectionClue ClueManager>>
【占位】原来UF是用记忆来绘图的,有线索就好办了,去记忆看看
<<add_task TaskManager 在记忆模块检查UF生成的索引 寻找绘图异常相关线索>>
<<ModuleHightLight Memory true>>
<<set $gameStage=2>>
<<jump 主维修界面游戏状态检查>>
===
@@ -293,7 +292,6 @@ position: -273,-66
<<set $gameStage=7>>
me: 还没结束…保险起见,我们进视觉复查一下吧。
<<add_task TaskManager 复查视觉模块>>
<<ModuleHightLight Eye true>>
<<task_moveIn TaskManager>>
<<set $isFinishedEyeCheck=false>>
<<jump 主维修界面游戏状态检查>>
@@ -411,7 +409,7 @@ tags:
colorID: 8
position: 460,-2977
---
//第一次看
position: 460,-2977
<<if $chipmissingKnown == false>>
me: 这似乎是佩佩的核心模块…让我查查。
<<ShowNotification ClueManager 数据库 正在查询:_美工_核心模块_……>>
@@ -7,15 +7,11 @@ position: -870,-2464
<<if visited("发现视觉异常")==false>>
me: 探针查到了缺陷波形…我需要把它找出来,才能进行深入检查。
me: 拖动波形显示下方的滑条,直到“缺陷波形”变得最清晰,然后点击【深入】。
<<ModuleAlarm Eye true>>
<<ShowNotification ClueManager 提示 拖动滑条调整波形以深入检查>>
<<jump PlugFinished>>
<<if $gameStage<=2>>>
<<add_task TaskManager 深入视觉模块 寻找绘图异常相关线索>>
<<ModuleHightLight Eye true>>
<<elseif $gameStage>=3>>
<<add_task TaskManager 深入视觉模块 找到异常记忆的来源>>
<<ModuleHightLight Eye true>>
<<endif>>
<<endif>>
===
@@ -3,7 +3,7 @@ tags:
colorID: 6
position: -579,564
---
<<switch_fix_system_to Memory >>
<<switch_fix_system_to Memory>>
<<if $gameStage == 7 && $isPeipeiBE == true>>
<<jump 记忆初始化深度>>
<<elseif $gameStage == 7 && $isPeipeiBE == false>>
@@ -15,7 +15,6 @@ tags:
colorID: 4
position: 240,-2040
---
<<declare $isFinishedClueBoard=false>>
//记录是否已经完成了UF的检查
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -34428,7 +34428,7 @@ MonoBehaviour:
iconOnDrag: {fileID: 8895775685280376203, guid: eb11ac9a06fb4792b393db9b83ab43b4, type: 3}
exclusiveOnDragCanvas: {fileID: 0}
useLegacyDragMethod: 0
position: {x: -19.061888, y: -180.38382, z: 0}
position: {x: 1060.164, y: 1195.7235, z: 0}
dragSelection:
customRenderer: {fileID: 0}
line:
@@ -50973,7 +50973,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 3205391740691769686, guid: fd04c28739017964789d58d573f9fabb, type: 3}
m_Sprite: {fileID: 8999216280242551931, guid: fd04c28739017964789d58d573f9fabb, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
-8
View File
@@ -10,14 +10,6 @@ public class Socket : MonoBehaviour, ISocket
public Plug plug=null;
private YarnOption _option;
private bool waitYarnCommand = false;
// private int heatNum=0;
// public int HeatNum()
// {
// return heatNum;
// }
public bool WaitYarnCommand
{
get { return waitYarnCommand; }
+22 -22
View File
@@ -23,25 +23,25 @@ public class MessageBox : MonoBehaviour
}
}
// Yarn Command处理方法
[YarnCommand("messagebox")]
public void HandleMessageBoxCommand(string type, string message)
{
switch (type.ToLower())
{
case "warning":
SetWarning(message);
break;
case "normal":
SetNormal(message);
break;
case "null":
SetNull();
break;
default:
Debug.LogError("Invalid message type for messagebox command: " + type);
break;
}
}
// [YarnCommand("messagebox")]
// public void HandleMessageBoxCommand(string type, string message)
// {
// switch (type.ToLower())
// {
// case "warning":
// SetWarning(message);
// break;
// case "normal":
// SetNormal(message);
// break;
// case "null":
// SetNull();
// break;
// default:
// Debug.LogError("Invalid message type for messagebox command: " + type);
// break;
// }
// }
private void Start()
{
SetNull();
@@ -54,7 +54,7 @@ public class MessageBox : MonoBehaviour
state.color = Color.red; // 红色
text.text = message;
text.color = Color.white; // 默认文本颜色
StartCoroutine(FlashWarning()); // 开始闪烁效果
//StartCoroutine(FlashWarning()); // 开始闪烁效果
}
// 设置为Normal状态
@@ -64,7 +64,7 @@ public class MessageBox : MonoBehaviour
state.color = new Color(1.0f, 0.55f, 0.0f); // 琥珀色
text.text = message;
text.color = Color.white; // 默认文本颜色
StopCoroutine(FlashWarning()); // 停止闪烁效果(如果正在闪烁)
//StopCoroutine(FlashWarning()); // 停止闪烁效果(如果正在闪烁)
}
// 设置为Null状态
@@ -74,7 +74,7 @@ public class MessageBox : MonoBehaviour
state.color = Color.blue; // 蓝色
text.text = string.Empty;
text.color = Color.white; // 默认文本颜色
StopCoroutine(FlashWarning()); // 停止闪烁效果(如果正在闪烁)
//StopCoroutine(FlashWarning()); // 停止闪烁效果(如果正在闪烁)
}
// 闪烁警告效果
@@ -11,12 +11,12 @@ namespace AibisDream.FixSystem
private const string SocketObjName = "Socket";
private const string ModulePicName = "Module Pic";
private const string IndicatorName = "Indicator";
public Transform _socketPos;
public Transform _indicatorPos;
// public Transform _indicatorPos;
private BodyModuleSystem _bodyModuleSystem;
private Material highlightMaterial;
private Material alarmMaterial;
private Material alarmMaterial;
private Material originalMaterial; // 原材质
private SpriteRenderer targetSpriteRenderer; // 目标的 SpriteRenderer
@@ -32,20 +32,18 @@ namespace AibisDream.FixSystem
// 获取组件索引
InitReference();
}
private void InitReference()
{
_socketPos = transform.Find(SocketObjName);
_bodyModuleSystem = transform.parent.parent.GetComponent<BodyModuleSystem>();
targetSpriteRenderer=transform.Find("Socket").GetComponent<SpriteRenderer>();
targetSpriteRenderer=transform.Find("Module Pic").GetComponent<SpriteRenderer>();
originalMaterial = targetSpriteRenderer.GetComponent<SpriteRenderer>().material;
highlightMaterial = Resources.Load<Material>("Materials/HighlightMaterial");
alarmMaterial=Resources.Load<Material>("Materials/AlarmMaterial");
}
#region
public bool IsAvailable()
{
return available;
@@ -54,11 +52,10 @@ namespace AibisDream.FixSystem
{
available=isAvailable;
}
public void PlugIn()
{
// 插入后先播放wave
ShowWave();
//ShowWave();
if(DialogController.Instance!=null)
// 然后触发Yarn节点
DialogController.Instance.StartDialogNode(_bodyModuleSystem.inHotErr ? "系统过热" : data.PlugInNodeName);
@@ -66,16 +63,18 @@ namespace AibisDream.FixSystem
public void PlugOut()
{
_bodyModuleSystem.oscilloscopeSystem.MessageBoxSetNull();
StartCoroutine(_bodyModuleSystem.oscilloscopeSystem.DisableDeepInButton());
// 先关闭wave
_bodyModuleSystem.oscilloscopeSystem.ShowScreenMessage("未插入任何模块", Color.white);
CloseWave();
//_bodyModuleSystem.oscilloscopeSystem.ShowScreenMessage("未插入任何模块", Color.white);
//CloseWave();
// TODO 触发Yarn节点(似乎目前没有拔出对话?)
}
public void DeepIn()
{
if (!data.waveHasError&&!data.ignoreWaveCheck) return;
// 如果有错误并且已经深入了
// if (!data.waveHasError&&!data.ignoreWaveCheck) return;
// // 如果有错误并且已经深入了
if(DialogController.Instance!=null)
DialogController.Instance.StartDialogNode(data.DeepInNodeName);
}
@@ -142,6 +141,7 @@ namespace AibisDream.FixSystem
{
var modulePic = transform.Find(ModulePicName).GetComponent<SpriteRenderer>();
var socketPos = transform.Find(SocketObjName);
//var indicatorPos = transform.Find(IndicatorName);
return new BodyModuleData
{
@@ -152,7 +152,9 @@ namespace AibisDream.FixSystem
waveformType = data.waveformType,
waveHasError = data.waveHasError,
ignoreWaveCheck = data.ignoreWaveCheck,
cantStopRunning=data.cantStopRunning
cantStopRunning=data.cantStopRunning,
//IndicatorPos=indicatorPos.localPosition
//indicatorPos= indicatorPos.position
};
}
@@ -198,6 +200,8 @@ namespace AibisDream.FixSystem
public SerializableVector3 modulePos;
public SerializableVector3 socketPos;
public SerializableVector3 indicatorPos;
// 功能信息
public WaveformType waveformType;
@@ -231,5 +235,11 @@ namespace AibisDream.FixSystem
get => socketPos.ToVector3();
set => socketPos = new SerializableVector3(value);
}
// [JsonIgnore]
// public Vector3 IndicatorPos
// {
// get => indicatorPos.ToVector3();
// set => indicatorPos = new SerializableVector3(value);
// }
}
}
@@ -7,6 +7,7 @@ namespace AibisDream
public static class BodyModuleYarnCommand
{
private static BodyModuleSystem BodyModuleSystem => FixSystemCenter.SystemDic.Get<BodyModuleSystem>();
private static OscilloscopeSystem OscilloscopeSystem => FixSystemCenter.SystemDic.Get<OscilloscopeSystem>();
[YarnCommand("SetModuleState_CantStopRunning")]
@@ -68,7 +69,7 @@ namespace AibisDream
[YarnCommand("Temp_InstallChip")]
public static void Temp_InstallChip()
{
var _UFCover = BodyModuleSystem.FindBodyModuleByName("Color").transform.Find("Module Pic").gameObject;
var _UFCover = BodyModuleSystem.FindBodyModuleByName("Color").transform.Find("Chip").gameObject;
if(!_UFCover.activeInHierarchy)
{
_UFCover.SetActive(true);
@@ -77,7 +78,7 @@ namespace AibisDream
[YarnCommand("Temp_RemoveChip")]
public static void Temp_RemoveChip()
{
var _UFCover = BodyModuleSystem.FindBodyModuleByName("Color").transform.Find("Module Pic").gameObject;
var _UFCover = BodyModuleSystem.FindBodyModuleByName("Color").transform.Find("Chip").gameObject;
if(_UFCover.activeInHierarchy)
{
_UFCover.SetActive(false);
@@ -101,5 +102,45 @@ namespace AibisDream
var targetModule = BodyModuleSystem.FindBodyModuleByName(moduleName);
targetModule.Alarm(enable);
}
[YarnCommand("MessageBoxSetError")]
public static void MessageBoxSetError()
{
OscilloscopeSystem.MessageBoxSetError();
}
[YarnCommand("MessageBoxSetWarning")]
public static void MessageBoxSetWarning()
{
OscilloscopeSystem.MessageBoxSetWarning();
}
[YarnCommand("MessageBoxSetNormal")]
public static void MessageBoxSetNormal()
{
OscilloscopeSystem.MessageBoxSetNormal();
}
[YarnCommand("MessageBoxSetChecking")]
public static void MessageBoxSetChecking()
{
OscilloscopeSystem.MessageBoxSetChecking();
}
[YarnCommand("MessageBoxSetNull")]
public static void MessageBoxSetNull()
{
OscilloscopeSystem.MessageBoxSetNull();
}
[YarnCommand("MessageBoxSetText")]
public static void MessageBoxSetText(string text)
{
OscilloscopeSystem.MessageBoxSetText(text);
}
[YarnCommand("EnableDeepInButton")]
public static void EnableDeepInButton()
{
OscilloscopeSystem.StartCoroutine(OscilloscopeSystem.EnableDeepInButton());
}
[YarnCommand("DisableDeepInButton")]
public static void DisableDeepInButton()
{
OscilloscopeSystem.StartCoroutine(OscilloscopeSystem.DisableDeepInButton());
}
}
}
@@ -1,7 +1,10 @@
using AibisDream.Utility;
using TMPro;
using UnityEngine;
using DG.Tweening;
using Febucci.UI;
using Random = UnityEngine.Random;
using System.Collections;
namespace AibisDream.FixSystem
{
@@ -10,8 +13,8 @@ namespace AibisDream.FixSystem
#region
private BodyModuleSystem _bodyModuleSystem;
private TMP_Text _screenText;
public TMP_Text state; // 显示状态的TextMeshPro组件
private TMP_Text _screenText;// 显示消息的TextMeshPro组件
private WaveformLine _waveformLine;
private ScanLine _scanLine;
private SpriteRenderer _screen;
@@ -44,10 +47,10 @@ namespace AibisDream.FixSystem
_screen = transform.Find("Screen").GetComponent<SpriteRenderer>();
_waveSlider = transform.Find("Wave Slider").GetComponent<WaveSlider>();
_deepinButton = new SpriteButton(transform.Find("Deepin Button").gameObject, false);
_waveformLine.SetLineSize(_screen.bounds.size.x, _screen.bounds.size.y);
_scanLine.SetScreenSize(_screen.bounds.size.x, _screen.bounds.size.y);
_screenText.text = "";
//_screenText.text = "";
MessageBoxSetNull();
_deepinButton.OnButtonDown += HandleDeepInButtonClick;
_scanLine.ScanErrorEvent += OnScanSuccess;
@@ -119,14 +122,15 @@ namespace AibisDream.FixSystem
}
public void HandleDeepInButtonClick()
{
if(_bodyModuleSystem.CableSystem.curBodyModule.data.ignoreWaveCheck==true)
{
_bodyModuleSystem.HandleDeepIn();
}
else
{
StartScan();
}
// if(_bodyModuleSystem.CableSystem.curBodyModule.data.ignoreWaveCheck==true)
// {
// _bodyModuleSystem.HandleDeepIn();
// }
// else
// {
// StartScan();
// }
_bodyModuleSystem.HandleDeepIn();
}
@@ -159,8 +163,62 @@ namespace AibisDream.FixSystem
}
#endregion
}
public void MessageBoxSetError()
{
state.text = "错误";
state.color = Color.red; // 红色
// _screenText.text = message;
// _screenText.color = Color.white; // 默认文本颜色
}
public void MessageBoxSetWarning()
{
state.text = "警告";
state.color = new Color(1.0f, 0.55f, 0.0f); // 琥珀色
// _screenText.text = message;
// _screenText.color = Color.white; // 默认文本颜色
}
public void MessageBoxSetNormal()
{
state.text = "正常";
state.color = Color.blue; // 琥珀色
// _screenText.text = message;
// _screenText.color = Color.white; // 默认文本颜色
}
public void MessageBoxSetChecking()
{
state.text = "检查中";
state.color = Color.white; // 琥珀色
// _screenText.text = string.Empty;
// _screenText.color = Color.white; // 默认文本颜色
}
public void MessageBoxSetText(string text)
{
_screenText.color = Color.white; // 默认文本颜色
_screenText.text += text+"<br>";
}
public void MessageBoxSetNull()
{
state.text = "未检测到信号";
state.color = Color.white; // 蓝色
_screenText.text = string.Empty;
_screenText.color = Color.white; // 默认文本颜色
}
public IEnumerator EnableDeepInButton()
{
yield return _deepinButton.GetTransform().DOLocalMoveX(0.5f, 0.5f).WaitForCompletion();
_deepinButton.SetActive(true);
}
public IEnumerator DisableDeepInButton()
{
yield return _deepinButton.GetTransform().DOLocalMoveX(-0.1f, 0.5f).WaitForCompletion();
_deepinButton.SetActive(false);
}
}
public enum WaveformType
{
Default,
@@ -1,4 +1,4 @@
using System.Collections;
using System.Collections;
using AibisDream.Framework;
using UnityEngine;
@@ -23,6 +23,7 @@ namespace AibisDream.FixSystem
clinicSystem.gameObject.SetActive(false);
// 黑屏淡出
yield return MainUIController.Instance.FadeOutSync(FadeDuration);
}
public void SetArgs(string arg)
+2 -1
View File
@@ -56,7 +56,8 @@ namespace AibisDream
public IEnumerator StartTestGame()
{
// TODO 全部改好之后这里要直接进入FixScene
yield return SceneLoader.Instance.LoadSceneAsync(clinicScene);
yield return null;
//yield return SceneLoader.Instance.LoadSceneAsync(clinicScene);
var proj = Resources.Load<YarnProject>($"Yarn/{testYarnProject}/{testYarnProject}");
DialogController.Instance.StartDialog(proj);
}
@@ -61,5 +61,9 @@ namespace AibisDream
{
isButtonActive = isActive;
}
public Transform GetTransform()
{
return _self.transform;
}
}
}