Day1基础完成

This commit is contained in:
2024-11-11 21:53:25 +08:00
parent 90e870bc4c
commit 72c9e83f27
16 changed files with 4320 additions and 2324 deletions
+7 -20
View File
@@ -32,9 +32,9 @@ RectTransform:
m_Children: []
m_Father: {fileID: 6642614580045378737}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 0, y: 0.5}
m_AnchoredPosition: {x: 100, y: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 200, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &301788080956036961
@@ -302,9 +302,9 @@ RectTransform:
m_Father: {fileID: 4878766829730645848}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 100, y: 25}
m_SizeDelta: {x: 200, y: 50}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 25}
m_SizeDelta: {x: 0, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7211577943304119970
CanvasRenderer:
@@ -361,7 +361,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!224 &4075187263989925841
RectTransform:
m_ObjectHideFlags: 0
@@ -506,7 +506,6 @@ GameObject:
serializedVersion: 6
m_Component:
- component: {fileID: 1118681895561534015}
- component: {fileID: 2054288184847322501}
- component: {fileID: 7636495373068008950}
- component: {fileID: -33119857249935177}
m_Layer: 5
@@ -536,18 +535,6 @@ RectTransform:
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 400, y: 400}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &2054288184847322501
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8689056903559000942}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d792e0af9bafc174d8a2566cf81b2c6a, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &7636495373068008950
MonoBehaviour:
m_ObjectHideFlags: 0
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 5a170c0b6c933c540a86be691fa6745c
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 5a170c0b6c933c540a86be691fa6745c
guid: a1dbef2a0a50ecf49a39eae2d3e486b2
PrefabImporter:
externalObjects: {}
userData:
@@ -226,11 +226,11 @@ void OnClarityChanged(float value)
}
[YarnCommand("MemoryFinished")]
public IEnumerator MemoryFinished()
public void MemoryFinished()
{
AudioManager.PauseMemoryAudio();
// Fade out alpha from 1 to 0
yield return playBackground.DOFade(0f, 1f).WaitForCompletion(); // Fade to fully transparent over 1 second
playBackground.DOFade(0f, 1f).WaitForCompletion(); // Fade to fully transparent over 1 second
// Deactivate playBackground after fade out
playBackground.gameObject.SetActive(false);
@@ -255,7 +255,7 @@ public IEnumerator PlayMemory()
// Activate playBackground and fade in alpha from 0 to 1
AudioManager.PlayMemoryAudio("mem_"+clueSlot.punchTape.MemoryIndex);
playBackground.gameObject.SetActive(true);
FavoritesManager.Instance.CloseFavorites();
//FavoritesManager.Instance.CloseFavorites();
playBackground.color = new Color(playBackground.color.r, playBackground.color.g, playBackground.color.b, 0);
yield return playBackground.DOFade(1f, 1f).WaitForCompletion(); // Fade to fully opaque over 1 second
+287 -21
View File
@@ -8562,7 +8562,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!114 &303263614
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -15331,6 +15331,139 @@ Material:
- _ShadowColor: {r: 0, g: 0, b: 0, a: 1}
- _ShineColor: {r: 1, g: 1, b: 1, a: 1}
m_BuildTextureStacks: []
--- !u!1 &641055554
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 641055555}
- component: {fileID: 641055558}
- component: {fileID: 641055557}
- component: {fileID: 641055556}
m_Layer: 5
m_Name: Button
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &641055555
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 641055554}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1950489328}
m_Father: {fileID: 1882925197}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 220, y: -122}
m_SizeDelta: {x: 160, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &641055556
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 641055554}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 641055557}
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 1102365681}
m_TargetAssemblyTypeName: EyeTransitionManager, Assembly-CSharp
m_MethodName: BackToFace
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!114 &641055557
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 641055554}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &641055558
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 641055554}
m_CullTransparentMesh: 1
--- !u!21 &646403221
Material:
serializedVersion: 8
@@ -25974,7 +26107,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
m_IsActive: 1
--- !u!224 &1229487020
RectTransform:
m_ObjectHideFlags: 0
@@ -27081,18 +27214,6 @@ PrefabInstance:
serializedVersion: 3
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: -7797423782240204142, guid: 4be755e61b9056242875aea80ae263be, type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: -5575855682135862688, guid: 4be755e61b9056242875aea80ae263be, type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: -2837288398070546240, guid: 4be755e61b9056242875aea80ae263be, type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: -7797423782240204142, guid: d8489dc41f8c4c9479ba48d5bf39e02e, type: 3}
propertyPath: m_IsActive
value: 0
@@ -27557,6 +27678,18 @@ PrefabInstance:
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: -7797423782240204142, guid: 4be755e61b9056242875aea80ae263be, type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: -5575855682135862688, guid: 4be755e61b9056242875aea80ae263be, type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: -2837288398070546240, guid: 4be755e61b9056242875aea80ae263be, type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects:
- {fileID: 449361851162706709, guid: fd04c28739017964789d58d573f9fabb, type: 3}
@@ -31953,12 +32086,10 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: 'Eye Zoom Out
'
m_text: "\u8FD4\u56DE"
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_fontAsset: {fileID: 11400000, guid: f242fb3dde1933640859f1c54591c9c8, type: 2}
m_sharedMaterial: {fileID: -6659093157667844055, guid: f242fb3dde1933640859f1c54591c9c8, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
@@ -35918,8 +36049,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -571, y: 328}
m_SizeDelta: {x: 160, y: 30}
m_AnchoredPosition: {x: -541, y: 300}
m_SizeDelta: {x: 160, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1700390218
MonoBehaviour:
@@ -40973,6 +41104,7 @@ RectTransform:
- {fileID: 2025235957}
- {fileID: 1400025921}
- {fileID: 1272879183}
- {fileID: 641055555}
m_Father: {fileID: 594466392}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
@@ -41714,6 +41846,140 @@ SpriteRenderer:
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!1 &1950489327
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1950489328}
- component: {fileID: 1950489330}
- component: {fileID: 1950489329}
m_Layer: 5
m_Name: Text (TMP)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1950489328
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1950489327}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 641055555}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1950489329
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1950489327}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: "\u8FD4\u56DE"
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: f242fb3dde1933640859f1c54591c9c8, type: 2}
m_sharedMaterial: {fileID: -6659093157667844055, guid: f242fb3dde1933640859f1c54591c9c8, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4281479730
m_fontColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 24
m_fontSizeBase: 24
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!222 &1950489330
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1950489327}
m_CullTransparentMesh: 1
--- !u!1 &1967548534
GameObject:
m_ObjectHideFlags: 0
+176 -129
View File
@@ -7,7 +7,8 @@ position: 242,-2373
//NOTE:房间界面的对话都单句写短一些(16字以内,参考CoffeeTalk),维修的可以长一些
////新闻:balabalabala
///<<indoor>>
////<<jump VarsInit>>
<<jump VarsInit>>
//<<jump 诊断初始化>>
===
title: VarsInit
tags:
@@ -19,16 +20,12 @@ position: 241,-2149
///【流程逻辑】
//如果线索板都答对了,就自动触发这个为true,这是主目标
<<declare $isFinishedClueBoard=false>>
//统计查看记忆数目,用来判断是否收集够,这是完成主目标的必要目标
<<declare $memoryCount=0>>
//记录是否已经完成了UF的检查
<<declare $isFinishedUFCheck=0>>
//记录是否已经完成了视觉的检查
<<declare $isFinishedEyeCheck=0>>
//统计进入视觉后触发目标的次数,主要是用来触发第一次点击任意目标触发首次对话,以及判断是否收集够打孔带,这是完成主目标的必要目标
<<declare $eyeTargetTriggerCount=0>>
//方便的触发针对eyetarget的对话,如果不喜欢这种写法可以商量,然后分开写
@@ -72,6 +69,10 @@ position: 241,-2149
<<declare $eyenocolorKnown=false>>
//是否已知:佩佩会想象出颜色
<<declare $eyecolorKnown=false>>
//是否插入过UF产生的打孔带
<<declare $isCheckedPunchTapeFormUF=false>>
//是否插入过视觉产生的打孔带
<<declare $isCheckedPunchTapeFormEye=false>>
<<jump 引入对话>>
===
@@ -97,19 +98,25 @@ peipei: 自述是一名美工,最近绘图结果有明显问题
// me: 也许是有什么别的问题影响到它了
me: 可以先画一张图么,看看什么情况
peipei: 好
<<show_photo UFManager "can_grass_error">>
<<hide_photo UFManager>>
<<generate_UFClue ClueManager UFImage can_grass_error 绿色>>
peipei: 生成好了
me: 嗯...看着很奇怪...像是色彻底丢失了...
me: 先放进收藏夹吧
<<fade_in 1>>
<<fade_out 1>>
peipei: 画好了
<<generate_UFClue ClueManager UFImage can_grass_error>>
me: 嗯...看着很奇怪...不知道为什么,像是绿色彻底丢失了...
me: 先放入诊疗面板吧)
<<CollectionClue ClueManager>>
// <<OpenClueBoard ClueBoard>>
// <<wait_for_ClueBoard_close ClueBoard>>
// <<wait_for_ClueBoard_close ClueBoard>>
me: 噢?有新的日志?
日志:绘图进程请求记录,从记忆向UF写入数据,生成记忆索引卡...
<<generate_PunchTape ClueManager "植物" "EyeView" "liuying1-2">>
me: (看起来UF的绘图需要索引记忆?)
me: (看来要确诊问题,需要进一步检查下了)
me: 佩佩,你的UF模块是安装在哪里的?
peipei: 在头部,我的左眼里面安装的
me: 看起来要打开头部检查了
me: 我们走吧佩佩,去诊疗室
me: (先放入诊疗面板吧)
<<CollectionClue ClueManager>>
peipei: 医生,怎么样,情况很严重么?
me: 还不知道,我们可能需要深入检查下
me: 我们去诊疗室吧
// me:生成好了
// ->继续聊聊
@@ -143,11 +150,12 @@ position: 240,-1440
---
<<fade_in 0.5>>
<<load_scene 佩佩视觉模块>>
<<SetExternalError ViewManager MemoryView true>>
// <<OpenClueBoard ClueBoard>>
//<<Set_ViewVisualState ViewManager "ColorView" 1>>
<<wait 0.5>>
<<fade_out 0.5>>
me: 好了,绘图结果不正常…会是什么问题呢?
// me: 好了,绘图结果不正常…会是什么问题呢?
<<if $ufKnown == true>>
me: 好了,这个UF模块在哪呢……
<<else>>
@@ -155,19 +163,15 @@ position: 240,-1440
<<endif>>
<<jump 主维修界面 >>
===
// title: AddAllClueToFavorites
// tags:
// colorID: 6
// position: -560,-1440
// ---
// <<generate_PunchTape ClueManager "海报" "EyeView" "liuying1-1" "红色" true>>
// <<generate_PunchTape ClueManager "植物" "EyeView" "liuying1-2" "绿色" true>>
// <<generate_PunchTape ClueManager "天空" "EyeView" "liuying1-3" "蓝色" true>>
// <<generate_MemoryClue ClueManager "病房" "liuying1-3" "蓝色" true>>
// <<generate_MemoryClue ClueManager "草地绘画" "liuying1-2" "绿色" true>>
// <<generate_MemoryClue ClueManager "夕阳景色" "liuying1-1" "红色" true>>
// <<generate_UFClue ClueManager UFImage can_grass_error 绿色 true>>
// ===
title: AddAllClueToFavorites
tags:
colorID: 6
position: -560,-1440
---
<<generate_PunchTape ClueManager "海报" "EyeView" "liuying1-1" "红色" true>>
<<generate_PunchTape ClueManager "植物" "EyeView" "liuying1-2" "绿色" true>>
<<generate_PunchTape ClueManager "天空" "EyeView" "liuying1-3" "蓝色" true>>
===
title: 主维修界面
tags:
colorID: 3
@@ -175,6 +179,9 @@ position: 240,-440
---
<<start_transition ViewManager "MainView">>
//<<SetHeat Plug 1>>
<<if visited_count("主维修界面")==1>>
<<endif>>
<<if visited("手术") && $isFinishedEyeCheck == -1 && $isFinishedUFCheck == -1>>
<<jump 流程结束>>
<<endif>>
@@ -182,81 +189,17 @@ position: 240,-440
// <<if $isFinishedClueBoard == true>>
// <<jump 结论>>
// <<endif>>
// 检查主目标是否完成并提供反馈
<<if $isFinishedEyeCheck == -1>>
<<if $memoryCount == 3>>
<<jump Dialogue_当检查完成时的主界面触发对话>>
//me: 似乎该检查的都检查了,应该去看下诊疗单了
me: 似乎该检查的都检查了,应该去看下诊疗单了
//<<OpenClueBoard target>>
<<else>>
// 此处可以替换为界面视觉效果,表示有外部错误
<<jump Dialogue_当记忆模块可以查看时的主界面触发对话>>
//me: 现在记忆模块应该可以查看了,我们应该去记忆看看
<<endif>>
<<endif>>
===
title: Dialogue_当检查完成时的主界面触发对话
position: 532,-44
---
me: 似乎该检查的都检查了,应该去看下诊疗单了
===
title: Dialogue_当记忆模块可以查看时的主界面触发对话
position: 554,-350
---
me: 似乎该检查的都检查了,应该去看下诊疗单了
===
title: ClueBoard
tags:
colorID: 3
position: -305,-1353
---
<<if $clueBoardStep == 0>>
<<if $clueCategory == "UFView">>
me: 嗯,这就是佩佩所说的绘画错误吧
me: 不过,这个绘画错误又是由什么导致的呢?
//<<set $clueBoardStep = $clueBoardStep + 1>>
<<SetSlotCorrect ClueBoard>>
<<AddNewClueSlot ClueBoard>>
<<else>>
<<if $clueCategory == "EyeView">>
me: 似乎确实和佩佩的症状有关,但是先把最直接的错误表现找到吧
<<elseif $clueCategory == "MemoryView">>
me: 似乎确实和佩佩的症状有关,但是先把最直接的错误表现找到吧
<<endif>>
<<endif>>
<<elseif $clueBoardStep == 1>>
<<if $clueCategory == "MemoryView" && $clueMatchCode == $previousMatchCode>>
me: 嗯,UF绘图需要索引记忆,就是由于这个记忆的调用出了问题,才导致了UF绘图的颜色错误
me: 但是这个记忆的颜色为什么会出错呢?
//<<set $clueBoardStep = $clueBoardStep + 1>>
<<SetSlotCorrect ClueBoard>>
<<AddNewClueSlot ClueBoard>>
<<else>>
<<if $clueCategory == "MemoryView">>
me: 确实应该是记忆导致的UF绘图问题,但是从颜色看,应该不是这个记忆?
<<elseif $clueCategory == "EyeView">>
me: 似乎确实和佩佩的症状有关,但是先把导致绘图错误最直接的原因找到吧
<<else>>
me: 似乎不太相关呢
<<endif>>
<<endif>>
<<elseif $clueBoardStep == 2>>
<<if $clueCategory == "EyeView" && $clueMatchCode == $previousMatchCode>>
me: 没错!佩佩在视觉中想象颜色的时候调用了这部分记忆
me: 因为想象视觉的颜色而占据了部分记忆,所以UF在绘图时索引失效
me: 一切都搞清楚了
<<SetSlotCorrect ClueBoard>>
<<jump 结论>>
//<<command CompleteAnalysis>>
<<else>>
<<if $clueCategory == "EyeView">>
me: 确实应该是视觉导致的记忆调用,但是好像不是这次调用引起的?
<<else>>
me: 似乎不太相关呢
<<endif>>
// me: 现在记忆模块应该可以查看了,或许可以去记忆看看
<<endif>>
<<endif>>
===
title: 结论
tags:
colorID: 8
@@ -357,20 +300,63 @@ position: 640,-1640
title: FirstDialogue
tags:
colorID: 8
position: 640,-1240
position: 639,-1240
---
me:佩佩,你怎么看到的是黑白的
解释色觉芯片可能动过手术
peipei: 不过不用为我担心
peipei: 你看那边的天空
me: 佩佩,为什么你看到的是黑白的
peipei: 啊……医生,这好像是很久的事情了。
me: 很久的事情……?
peipei: 是的。不记得是在装上UF的时候还是装了之后一段时间的事情……
peipei: 总之是某次设备升级之后就这样了。
me: 你们能通过UF模块产生有颜色的图片,但是你们自己却看不见颜色?
peipei: 医生,你也是公司的员工呀,你也有医疗模块吧。
me: 什么意思?
peipei: 公司的所有技术性工作都是最终由技术性模块操作完成的。
peipei: 画都是我身体里的UF画的,它自己会产生颜色,我不需要能看见或者理解颜色。
me: 也就是说成为绘图工,就会失去色觉?
me: 这听起来…太令人难以接受了。
peipei: ……其实也不必为我那么担心啦,医生。
peipei: 我还是能想办法看见颜色的。
me: 什么?可是…我没在你的视觉里看到颜色。
peipei: 没什么,医生……抱歉。我…失言了。
peipei: 但总之,不用为我担心……
me: (佩佩有什么事情瞒着我。)
->追问
me: 佩佩,你刚才想要说的话,我希望你能告诉我。
me: 我需要知道尽量多的信息,才好对你做最准确的诊断和治疗。
peipei: 你…能替我保守秘密么?
->我守口如瓶
me: 你可以信任我,我会守口如瓶的。
peipei: 谢谢你,医生。其实仔细想想……
->只要有利于治疗
me: 如果保守这个秘密有利于治疗的话:是的。毕竟我是个医生。
peipei: 你说的对,医生…我不该这么问的。其实仔细想想……
->取决于你要说什么
me: 我不知道,这取决于这个秘密的性质了。
peipei: 好吧,其实仔细想想……
peipei: 对医生应该是不能说谎的,对吧?
peipei: 小时候我经常生病。有天为了能出去玩,我对住院医生说谎了。
peipei: 那一次医生很生气。他很关心我,但是我让他失望了,没有能照顾好自己。
peipei: 所以我想,也许不该成为一个秘密。
<<set_Eyetarget EyeManager "sky" false>>
peipei: 我小时候,经常透过窗户看蓝天
peipei: 看到窗外的蓝天了吗?
<<set_EyeState EyeManager "CanImagineColor">>
<<EyeEffect_FadeIn EyeManager>>
me: 啊,出现错误抖动了
日志: 未知进程,正在从记忆非法写入,打印记忆卡...
<<generate_PunchTape ClueManager "天空" "EyeView" "liuying1-3" "蓝色">>
me: 好了,我要再做几次检查
错误日志: 未知进程,正在从记忆非法写入,打印记忆索引卡...
<<generate_PunchTape ClueManager "天空" "EyeView" "liuying1-3">>
me: 记忆发送了进程,为视觉进行了写入操作?这是怎么发生的?
me: 先放进文件袋,等会去看看
<<CollectionClue ClueManager>>
me: 佩佩,你做了什么?为什么突然出现了颜色?
peipei: 我不知道怎么说……我就是记得它是这个颜色。
me: 记得?
peipei: 医生,你应该也有关于天空的珍贵记忆吧。你还记得在那段记忆里,天空是什么颜色的吗?
me: 记得?
peipei: 你一定是记得的,我也是。天空的颜色不是那么容易被忘记的。
peipei: 只要想起那个记忆,眼前就浮现出颜色了
//总觉得这里想象力已经呼之欲出了
me: 佩佩,我得再做几次测试
me: 我需要让你再观察几个东西,你只要重复刚才做的事情就好了。
peipei: 好的,医生。
<<set $eyecolorKnown=true>>
<<jump EyeCheckEnd>>
===
@@ -394,12 +380,22 @@ me:这个没有生成颜色,奇怪...
title: Eye_poster
tags:
colorID: 8
position: 1240,-1240
position: 1239,-1241
---
<<if visited("Eye_poster")==false>>
<<set $eyeTargetTriggerCount = $eyeTargetTriggerCount + 1>>
日志:未知进程,正在从记忆非法写入,打印记忆卡...
<<generate_PunchTape ClueManager "海报" "EyeView" "liuying1-1" "红色">>
me:佩佩,看到那张海报了么?
<<set_EyeState EyeManager "CanImagineColor">>
<<set_Eyetarget EyeManager "poster">>
peipei: 啊,又是罐头……
peipei: 坏了!我还有一张海报没出……
<<EyeEffect_FadeIn EyeManager>>
peipei: 啊……我差点忘了。我来这里就是为了这个。
日志:未知进程,正在从记忆非法写入,打印记忆索引卡...
<<generate_PunchTape ClueManager "海报" "EyeView" "liuying1-1">>
me:把这个卡带收起来
<<CollectionClue ClueManager>>
<<jump EyeCheckEnd>>
<<endif>>
<<set_EyeState EyeManager "CanImagineColor">>
<<EyeEffect_FadeIn EyeManager>>
@@ -408,25 +404,39 @@ position: 1240,-1240
title: Eye_plant
tags:
colorID: 8
position: 1040,-1240
position: 1035,-1244
---
<<if visited("Eye_plant")==false>>
<<set $eyeTargetTriggerCount = $eyeTargetTriggerCount + 1>>
日志:未知进程,正在从记忆非法写入,打印记忆卡...
<<generate_PunchTape ClueManager "植物" "EyeView" "liuying1-2" "绿色">>
<<endif>>
me:佩佩,看到那个绿萝了么?
peipei: 医生,你的绿萝长得很不错喔!
//植物出现颜色;其中一片叶子枯萎了,但也显示出了绿色
peipei: 小时候我养过一盆绿萝。爸爸说等我慢慢长大,这盆绿萝就会跟我一起长大变成绿萝树!
<<set_EyeState EyeManager "CanImagineColor">>
<<EyeEffect_FadeIn EyeManager>>
peipei: 可惜……
///<<set_EyeState EyeManager "CanImagineColor">>枯萎的叶子变成了正确的黄色
peipei: 我还是把它养死了。
peipei: 我愧疚了好久,那时的我真的以为小草可以长成一棵树。
日志:未知进程请求记录,正在从记忆非法写入,打印记忆索引卡...
<<generate_PunchTape ClueManager "植物" "EyeView" "liuying1-2">>
me:先收起来
<<CollectionClue ClueManager>>
<<CollectionClue ClueManager EyePlant>>
<<jump EyeCheckEnd>>
<<endif>>
<<set_EyeState EyeManager "CannImagineColor">>
<<EyeEffect_FadeIn EyeManager>>
<<jump EyeCheckEnd>>
===
title: EyeCheckEnd
tags:
colorID: 3
position: 641,-840
position: 642,-840
---
<<if $isFinishedEyeCheck==-1>>
me:这里似乎没什么新的线索
me:这里应该已经彻底检查过
<<jump 主维修界面>>
<<endif>>
<<if $isFinishedEyeCheck==1>>
@@ -439,7 +449,7 @@ me:这里似乎没什么新的线索了
<<endif>>
<<elseif $isFinishedEyeCheck==0&&$eyeTargetTriggerCount == 3>>
me:似乎有足够的信息了,我们离开这里吧
me:视觉部分该检查的都检查了,我们离开这里吧
<<SetExternalError ViewManager MemoryView true>>
<<set $isFinishedEyeCheck=-1>>
<<jump 主维修界面>>
@@ -494,7 +504,7 @@ position: 2640,-840
---
<<MemoryFinished MemoryManager>>
<<if $memoryCount==3>>
me:似乎该看的都看了,我们退出记忆吧
me:所有的索引卡都看了,我们退出记忆吧
///todo只给提示,不自动退
<<set $ufDiscussCount=3>>
<<set $eyeDiscussCount=2>>
@@ -504,7 +514,7 @@ position: 2640,-840
title: 天空
tags:
colorID: 8
position: 2640,-1240
position: 2626,-1244
---
<<wait 1>>
peipei_child: 医生!看,大象!
@@ -522,15 +532,16 @@ peipei_child: 医生快看,它现在更像一个飞机啦!
<<wait 1>>
<<if visited("天空")==false>>
<<set $memoryCount+=1>>
me:好了,这个记录下吧
<<generate_MemoryClue ClueManager "病房" "liuying1-3" "蓝色">>
me:似乎没什么问题
//me:好了,这个记录下吧
//<<generate_MemoryClue ClueManager "病房" "liuying1-3" "蓝色">>
<<endif>>
<<jump End_memoryPaly>>
===
title: 海报
tags:
colorID: 8
position: 2840,-1240
position: 2855,-1243
---
<<wait 1>>
unknown: 好美啊。
@@ -543,15 +554,15 @@ unknown: 我爱你。
<<wait 3>>
<<if visited("海报")==false>>
<<set $memoryCount+=1>>
me:好了,这个记录下吧
<<generate_MemoryClue ClueManager "夕阳景色" "liuying1-1" "红色">>
me:似乎没什么问题
//<<generate_MemoryClue ClueManager "夕阳景色" "liuying1-1" "红色">>
<<endif>>
<<jump End_memoryPaly>>
===
title: 植物
tags:
colorID: 8
position: 3040,-1240
position: 3081,-1247
---
<<wait 1>>
peipei: 要是工作也能画画…要是能永远画画就好了。
@@ -565,15 +576,51 @@ peipei: 我肯定是对的。
peipei: 如果公司这么讨厌的话,我就不在那里干就好了啊!
<<if visited("植物")==false>>
<<set $memoryCount+=1>>
me:好了,这个记录下吧
<<generate_MemoryClue ClueManager "草地绘画" "liuying1-2" "绿色">>
<<if $isCheckedPunchTapeFormUF==true>>
me:(这个记忆和UF绘图访问的记忆是一样的)
me:(可能这就是问题所在?)
<<else>>
me:先记录在诊断面板里吧
<<CollectionClue ClueManager MemoryGrass>>
<<endif>>
<<endif>>
<<jump End_memoryPaly>>
===
title: UF绘图
tags:
colorID: 8
position: 3316,-1247
---
<<wait 1>>
peipei: 要是工作也能画画…要是能永远画画就好了。
同学: 哈哈,可能等我们进入公司就不这么觉得了。听说进公司之后做什么都不会再快乐了。
peipei: 不会的。至少画画这件事情让我感觉到很纯粹的快乐……
peipei: 那种朝九晚五,一眼看到头的生活,我想我反而会受不了的。
同学: 哈哈……
同学: 但愿你是对的。
peipei: 我肯定是对的。
<<wait 1>>
peipei: 如果公司这么讨厌的话,我就不在那里干就好了啊!
<<if visited("UF绘图")==false>>
<<set $isCheckedPunchTapeFormUF=true>>
<<if $isCheckedPunchTapeFormEye==true>>
me:(这个记忆和视觉异常访问的记忆是一样的)
me:(可能这就是问题所在?)
//<<CollectionClue ClueManager MemoryGrass>>
<<else>>
me:看起来好像没什么问题啊?
me:先记录一下吧
<<CollectionClue ClueManager MemoryGrass>>
//<<generate_MemoryClue ClueManager "草地绘画" "liuying1-2" "绿色">>
<<endif>>
<<endif>>
<<jump End_memoryPaly>>
===
title: OnUFViewDeepIn
tags:
colorID: 3
position: -492,-856
position: -399,-876
---
// <<if $isFinishedUFCheck==0>>
// <<set $isFinishedUFCheck=-1>>
File diff suppressed because it is too large Load Diff
+34 -1
View File
@@ -5,16 +5,23 @@ using AibisDream;
using MeadowGames.UINodeConnect4;
using UnityEngine;
using Yarn.Unity;
using RainbowArt.CleanFlatUI;
public class ClueBaordNew : MonoBehaviour
{
private GraphManager gm;
public List<Node> nodeLists;
public Notification ClueBoardNotification;
private Dictionary<string, Vector3> nodePositions = new Dictionary<string, Vector3>();
void Start()
{
gm=GetComponent<GraphManager>();
gm.OnConnectionAdded += CheckConnection;
nodePositions["UFImage"] = new Vector3(-795, -263, 0);
nodePositions["memoryGrass"] = new Vector3(1, 1, 0);
nodePositions["EyePlant"] = new Vector3(2, 2, 0);
}
@@ -44,6 +51,7 @@ public class ClueBaordNew : MonoBehaviour
connection.DisableClick=false;
connection.EnableDrag=false;
DialogController.Instance.StartDialogNode("UF图像问题回答正确");
// GetNode("MemoryGrass").transform.GetChild(1).gameObject.SetActive(true);
}
if (connection.port0.node.ID == "MemoryGrass" && connection.port1.node.ID == "EyePlant")
@@ -62,13 +70,38 @@ public class ClueBaordNew : MonoBehaviour
Node start= GetNode(startNode);
pos=start.transform.position+new Vector3(500,0,0);
Debug.Log("记忆问题回答正确");
Node newNode=gm.InstantiateNode(nodeLists.Find(node => node.ID == nodeToAdd),pos);
Node newNode=nodeLists.Find(node => node.ID == nodeToAdd);
newNode.gameObject.SetActive(true);
Connection newConnection=start.ports[0].ConnectTo(newNode.ports[0]);
newConnection.DisableClick=false;
newConnection.EnableDrag=false;
gm.UnselectAllElements();
newNode.Select();
}
[YarnCommand("AddNode")]
public void CreateNode(string NodeID)
{
Node targetNode = nodeLists.Find(node => node.ID == NodeID);
if (targetNode == null)
{
Debug.LogWarning($"Node with ID {NodeID} not found.");
return;
}
targetNode.gameObject.SetActive(true);
// 获取 NodeID 对应的 position
// Vector3 position;
// if (!nodePositions.TryGetValue(NodeID, out position))
// {
// Debug.LogWarning($"Position for NodeID {NodeID} not found.");
// position = Vector3.zero; // 若未找到则设置一个默认位置
// }
// // 实例化节点,并将其放置在指定的位置
// Node newNode = gm.InstantiateNode(targetNode, position);
ClueBoardNotification.ShowNotification();
}
[YarnCommand("EnableQuestion")]
public void EnableQuestion(string nodeID)
+72 -65
View File
@@ -9,12 +9,14 @@ using Yarn.Unity;
public class ClueBoardManager : MonoBehaviour
{
[SerializeField] private GameObject clueBoardUI; // ClueBoard UI的GameObject
public GameObject clueBoardUI; // ClueBoard UI的GameObject
public GameObject iamgePointer; // ClueBoard UI的GameObject
[SerializeField] private Button toggleButton; // 开启/关闭ClueBoard的按钮
[SerializeField] private Button submitButton; // 提交按钮
[SerializeField] private TMP_Text conclue; // 提交按钮
[SerializeField] private ClueSlotBase initialClueSlotPrefab; // 初始的ClueSlot预制体
[SerializeField] private Transform clueSlotContainer; // ClueSlot的容器
//[SerializeField] private Button submitButton; // 提交按钮
// [SerializeField] private TMP_Text conclue; // 提交按钮
//[SerializeField] private ClueSlotBase initialClueSlotPrefab; // 初始的ClueSlot预制体
// [SerializeField] private Transform clueSlotContainer; // ClueSlot的容器
private RectTransform clueBoardRectTransform; // ClueBoard的RectTransform
private List<ClueSlotBase> clueSlots = new List<ClueSlotBase>(); // 当前存在的所有ClueSlot
@@ -38,25 +40,27 @@ public class ClueBoardManager : MonoBehaviour
clueBoardRectTransform = clueBoardUI.GetComponent<RectTransform>();
// 定义ClueBoard UI的位置
hiddenPosition = new Vector2(-Screen.width, clueBoardRectTransform.anchoredPosition.y); // 屏幕右侧
visiblePosition = new Vector2(0, clueBoardRectTransform.anchoredPosition.y); // 屏幕内
// hiddenPosition = new Vector2(-Screen.width, clueBoardRectTransform.anchoredPosition.y); // 屏幕右侧
// visiblePosition = new Vector2(0, clueBoardRectTransform.anchoredPosition.y); // 屏幕内
// 设置初始位置和状态
clueBoardRectTransform.anchoredPosition = hiddenPosition;
// // 设置初始位置和状态
// clueBoardRectTransform.anchoredPosition = hiddenPosition;
clueBoardUI.SetActive(false);
iamgePointer.GetComponent<Image>().enabled=false;
toggleButton.onClick.AddListener(ToggleClueBoard); // 绑定按钮事件
submitButton.onClick.AddListener(CheckCurrentSlot); // 绑定提交事件
//submitButton.onClick.AddListener(CheckCurrentSlot); // 绑定提交事件
conclue.text="待分析症状";
//conclue.text="待分析症状";
// 初始化第一个ClueSlot
AddNewClueSlot();
//AddNewClueSlot();
}
// 开启或关闭 ClueBoard
private void ToggleClueBoard()
{
Debug.Log("触发打开关闭诊疗面板");
if (isBoardOpen)
{
CloseClueBoard();
@@ -70,10 +74,11 @@ public class ClueBoardManager : MonoBehaviour
public void OpenClueBoard()
{
clueBoardUI.SetActive(true);
iamgePointer.GetComponent<Image>().enabled=true;
isBoardOpen = true;
// 用DOTween从右侧移动到可见区域
clueBoardRectTransform.DOAnchorPos(visiblePosition, 0.5f);
// clueBoardRectTransform.DOAnchorPos(visiblePosition, 0.5f);
}
private void CloseClueBoard()
@@ -81,67 +86,69 @@ public class ClueBoardManager : MonoBehaviour
isBoardOpen = false;
// 用DOTween移动回右侧屏幕外
clueBoardRectTransform.DOAnchorPos(hiddenPosition, 0.5f).OnComplete(() =>
{
clueBoardUI.SetActive(false); // 移动完成后隐藏UI
});
// clueBoardRectTransform.DOAnchorPos(hiddenPosition, 0.5f).OnComplete(() =>
// {
// clueBoardUI.SetActive(false); // 移动完成后隐藏UI
// });
clueBoardUI.SetActive(false);
iamgePointer.GetComponent<Image>().enabled=false;
}
// 添加新的 ClueSlot
[YarnCommand("AddNewClueSlot")]
public void AddNewClueSlot()
{
ClueSlotBase newSlot = Instantiate(initialClueSlotPrefab, clueSlotContainer);
newSlot.ReleaseSlot();
clueSlots.Add(newSlot);
}
[YarnCommand("SetSlotCorrect")]
public void SetSlotCorrect()
{
clueSlots[currentStep].SetSlotCorrect();
currentStep++;
}
// [YarnCommand("AddNewClueSlot")]
// public void AddNewClueSlot()
// {
// ClueSlotBase newSlot = Instantiate(initialClueSlotPrefab, clueSlotContainer);
// newSlot.ReleaseSlot();
// clueSlots.Add(newSlot);
// }
// [YarnCommand("SetSlotCorrect")]
// public void SetSlotCorrect()
// {
// clueSlots[currentStep].SetSlotCorrect();
// currentStep++;
// }
private void CheckCurrentSlot()
{
if (currentStep >= clueSlots.Count) return;
// private void CheckCurrentSlot()
// {
// if (currentStep >= clueSlots.Count) return;
ClueSlotBase currentSlot = clueSlots[currentStep];
Clue currentClue = currentSlot.GetComponentInChildren<ClueItem>()?.GetClueData();
// ClueSlotBase currentSlot = clueSlots[currentStep];
// Clue currentClue = currentSlot.GetComponentInChildren<ClueItem>()?.GetClueData();
if (currentClue == null)
{
TriggerDialogue("", "", "", currentStep);
return;
}
// if (currentClue == null)
// {
// TriggerDialogue("", "", "", currentStep);
// return;
// }
// Trigger Yarn to handle the current clue, name, and step
TriggerDialogue(currentClue.Category, currentClue.MatchCode, currentClue.ClueName, currentStep);
}
private void TriggerDialogue(string clueCategory, string matchCode, string clueName, int step)
{
if (DialogController.Instance.CheckIfNodeExistInCurrentYarnProject("ClueBoard"))
{
// Set Yarn variables
DialogController.Instance.SetVariable("$clueBoardStep", step);
DialogController.Instance.SetVariable("$clueCategory", clueCategory);
DialogController.Instance.SetVariable("$clueMatchCode", matchCode);
DialogController.Instance.SetVariable("$clueName", clueName);
// // Trigger Yarn to handle the current clue, name, and step
// TriggerDialogue(currentClue.Category, currentClue.MatchCode, currentClue.ClueName, currentStep);
// }
// private void TriggerDialogue(string clueCategory, string matchCode, string clueName, int step)
// {
// if (DialogController.Instance.CheckIfNodeExistInCurrentYarnProject("ClueBoard"))
// {
// // Set Yarn variables
// DialogController.Instance.SetVariable("$clueBoardStep", step);
// DialogController.Instance.SetVariable("$clueCategory", clueCategory);
// DialogController.Instance.SetVariable("$clueMatchCode", matchCode);
// DialogController.Instance.SetVariable("$clueName", clueName);
// Set the previous MatchCode for comparison in Yarn
if (step > 0)
{
Clue previousClue = clueSlots[step - 1].GetComponentInChildren<ClueItem>()?.GetClueData();
if (previousClue != null)
{
DialogController.Instance.SetVariable("$previousMatchCode", previousClue.MatchCode);
}
}
// // Set the previous MatchCode for comparison in Yarn
// if (step > 0)
// {
// Clue previousClue = clueSlots[step - 1].GetComponentInChildren<ClueItem>()?.GetClueData();
// if (previousClue != null)
// {
// DialogController.Instance.SetVariable("$previousMatchCode", previousClue.MatchCode);
// }
// }
// Start the Yarn dialog node
DialogController.Instance.StartDialogNode("ClueBoard");
}
}
// // Start the Yarn dialog node
// DialogController.Instance.StartDialogNode("ClueBoard");
// }
// }
// 根据步骤判定当前 Clue 是否符合条件
// private bool IsValidClueForStep(int step, Clue clue)
+25 -11
View File
@@ -1,6 +1,7 @@
using UnityEngine;
using UnityEngine.EventSystems;
using Yarn.Unity;
using System;
public class ClueInteraction : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler, IPointerClickHandler, IBeginDragHandler, IDragHandler, IEndDragHandler
{
@@ -8,7 +9,8 @@ public class ClueInteraction : MonoBehaviour, IPointerEnterHandler, IPointerExit
public Transform OriginalParent => originalParent;
private Canvas canvas;
private ClueItem clueItem;
private bool isFavorited = false; // 初始未收藏
[HideInInspector]
public bool isFavorited = false; // 初始未收藏
private RectTransform rectTransform;
private Vector2 originalAnchorMin;
@@ -19,6 +21,8 @@ public class ClueInteraction : MonoBehaviour, IPointerEnterHandler, IPointerExit
private CursorMode cursorMode = CursorMode.Auto;
public event Action OnInteraction;
private void Start()
{
canvas = GetComponentInParent<Canvas>();
@@ -52,16 +56,26 @@ public class ClueInteraction : MonoBehaviour, IPointerEnterHandler, IPointerExit
public void OnPointerClick(PointerEventData eventData)
{
if (isFavorited)
{
Debug.Log("已经收藏,点击查看详情");
}
else
{
FavoritesManager.Instance.AddClue(clueItem.GetClueData());
Destroy(gameObject);
Debug.Log("收藏成功!");
}
// if (isFavorited)
// {
// Debug.Log("已经收藏,点击查看详情");
// }
// else
// {
// if(GetComponent<Clue>().ClueType==ClueType.PunchTape)
// {
// FavoritesManager.Instance.AddClue(clueItem.GetClueData());
// Destroy(gameObject);
// Debug.Log("收藏成功!");
// OnInteraction?.Invoke();
// }
// else
// {
// OnInteraction?.Invoke();
// }
// }
}
public void OnBeginDrag(PointerEventData eventData)
+87 -24
View File
@@ -4,6 +4,8 @@ using Unity.VisualScripting;
using UnityEngine;
using UnityEngine.UI;
using Yarn.Unity;
using RainbowArt.CleanFlatUI;
using System;
public class ClueManager : MonoBehaviour
{
@@ -11,10 +13,14 @@ public class ClueManager : MonoBehaviour
public GameObject imageCluePrefab;
public Canvas canvas; // UI画布
private ClueInteraction currentClueInteraction;
private GameObject currentClue;
public Notification FavouriteNotification;
//public Notification ClueBoardNotification;
ClueBaordNew clueBaord;
void Start()
{
clueBaord=FindObjectOfType<ClueBaordNew>();
}
void Update()
{
@@ -43,9 +49,6 @@ public class ClueManager : MonoBehaviour
// {
// GeneratePunchTape("植物","EyeView","天空");
// }
}
public void GetPunchTape()
{
@@ -76,36 +79,96 @@ public class ClueManager : MonoBehaviour
GameObject clueGO = Instantiate(punchTapecluePrefab, canvas.transform);
ClueItem clueItem = clueGO.GetComponent<ClueItem>();
ClueInteraction clueInteraction = clueGO.GetComponent<ClueInteraction>();
currentClue=clueGO;
clueItem.Setup(punchTape);
}
[YarnCommand("generate_UFClue")]
public void GenerateUFClue(string clueName, string imageName,string mathCode,bool directlyAddToFavorites=false)
public void GenerateUFClue(string clueName, string imageName,bool directlyAddToFavorites=false)
{
Sprite UFSprite = Resources.Load<Sprite>("Art/Photos/" + imageName);
ImageClue imageClue=new ImageClue("UFView", clueName, UFSprite,mathCode);
if(directlyAddToFavorites)
{
FavoritesManager.Instance.AddClue(imageClue);
return;
}
ImageClue imageClue=new ImageClue("UFView", clueName, UFSprite);
// if(directlyAddToFavorites)
// {
// FavoritesManager.Instance.AddClue(imageClue);
// return;
// }
GameObject clueGO = Instantiate(imageCluePrefab, canvas.transform);
ClueItem clueItem = clueGO.GetComponent<ClueItem>();
currentClue=clueGO;
clueItem.Setup(imageClue);
// ClueInteraction clueInteraction = clueGO.GetComponent<ClueInteraction>();
// clueInteraction.enabled=false;
// currentClueInteraction=clueInteraction;
// currentClueInteraction.OnInteraction+=ShowClueBoardNotification;
}
[YarnCommand("generate_MemoryClue")]
public void GenerateMemoryClue(string clueName, string imageName,string mathCode,bool directlyAddToFavorites=false)
// [YarnCommand("generate_MemoryClue")]
// public void GenerateMemoryClue(string nodeID, string imageName,string mathCode,bool directlyAddToFavorites=false)
// {
// Sprite UFSprite = Resources.Load<Sprite>("Art/Memory/" + imageName);
// ImageClue imageClue=new ImageClue("MemoryView", clueName, UFSprite,mathCode);
// if(directlyAddToFavorites)
// {
// FavoritesManager.Instance.AddClue(imageClue);
// return;
// }
// GameObject clueGO = Instantiate(imageCluePrefab, canvas.transform);
// ClueItem clueItem = clueGO.GetComponent<ClueItem>();
// ClueInteraction clueInteraction = clueGO.GetComponent<ClueInteraction>();
// clueInteraction.enabled=false;
// currentClueInteraction=clueInteraction;
// currentClueInteraction.OnInteraction+=ShowClueBoardNotification;
// clueItem.Setup(imageClue);
// }
[YarnCommand("CollectionClue")]
public void EnabeClueInteraction(string nodeID=null)
{ if(nodeID!=null)
{
Debug.Log("收藏线索版成功!");
clueBaord.CreateNode(nodeID);
return;
}
// if(currentClue==null)
// {
// Debug.Log("收藏线索版成功!");
// clueBaord.CreateNode(nodeID);
// return;
// }
ClueItem clueItem = currentClue.GetComponent<ClueItem>();
Clue clue=clueItem.GetClueData();
ClueInteraction clueInteraction=currentClue.GetComponent<ClueInteraction>();
if(clue.ClueType==ClueType.PunchTape)
{
FavoritesManager.Instance.AddClue(clueItem.GetClueData());
Destroy(currentClue.gameObject);
Debug.Log("收藏文件夹成功!");
clueInteraction.isFavorited=true;
currentClue=null;
}
else
{
Debug.Log("收藏线索版成功!");
clueBaord.CreateNode(clue.ClueName);
Destroy(currentClue.gameObject);
currentClue=null;
}
}
public void ShowFavouriteNotification()
{
Sprite UFSprite = Resources.Load<Sprite>("Art/Memory/" + imageName);
ImageClue imageClue=new ImageClue("MemoryView", clueName, UFSprite,mathCode);
if(directlyAddToFavorites)
{
FavoritesManager.Instance.AddClue(imageClue);
return;
}
GameObject clueGO = Instantiate(imageCluePrefab, canvas.transform);
ClueItem clueItem = clueGO.GetComponent<ClueItem>();
clueItem.Setup(imageClue);
FavouriteNotification.ShowNotification();
currentClueInteraction.OnInteraction-=ShowFavouriteNotification;
}
// public void ShowClueBoardNotification()
// {
// clueBaord.CreateNode(currentClueInteraction.GetComponent<Clue>().ClueName);
// }
}
+40 -49
View File
@@ -33,64 +33,52 @@ public class ClueSlotBase : MonoBehaviour, IDropHandler
}
public void OnDrop(PointerEventData eventData)
{
if (isLocked)
{
if(isLocked)
Debug.Log("ClueSlot locked");
return;
}
ClueItem clueItem = eventData.pointerDrag.GetComponent<ClueItem>();
if (clueItem != null)
{
Clue clue = clueItem.GetClueData();
interaction = clueItem.GetComponent<ClueInteraction>();
if (clue != null && interaction != null)
{
Debug.Log("clueSlot locked");
return;
}
ClueItem clueItem = eventData.pointerDrag.GetComponent<ClueItem>();
if (clueItem != null)
{
Clue clue = clueItem.GetClueData();
interaction = clueItem.GetComponent<ClueInteraction>();
// 如果插槽已被占用,先将当前 ClueItem 返回到集合
if (currentClueItem != null)
{
ReturnClueToCollection(currentClueItem);
currentClueItem = null; // 清除旧的 currentClueItem
}
if (clue != null && interaction != null)
{
isOccupied = true;
// 如果当前已经有一个 ClueItem,返回它到集合
if (currentClueItem != null)
{
ReturnClueToCollection(currentClueItem);
}
// 更新当前的 ClueItem
currentClueItem = clueItem;
// 更新当前的 ClueItem
currentClueItem = clueItem;
isOccupied = true;
RectTransform slotRectTransform = GetComponent<RectTransform>();
// 调整位置和父对象
RectTransform slotRectTransform = GetComponent<RectTransform>();
interaction.SetClueParentAndPosition(slotRectTransform);
// 调整位置和父对象
interaction.SetClueParentAndPosition(slotRectTransform);
// // 调整 RectTransform 的属性以匹配插槽大小
// RectTransform clueRectTransform = clueItem.GetComponent<RectTransform>();
// OriginalTransform=clueRectTransform;
// RectTransform slotRectTransform = GetComponent<RectTransform>();
// clueRectTransform.SetParent(slotRectTransform);
// clueRectTransform.anchorMin = Vector2.zero; // 左下角
// clueRectTransform.anchorMax = Vector2.one; // 右上角
// clueRectTransform.offsetMin = Vector2.zero; // 左下偏移
// clueRectTransform.offsetMax = Vector2.zero; // 右上偏移
// clueRectTransform.pivot = new Vector2(0.5f, 0.5f); // 居中
// 调用虚方法处理插入逻辑
OnClueInserted(clue);
}
else
{
interaction?.ReturnToOriginalPosition(); // 类型不匹配,返回原位
}
// 调用虚方法处理插入逻辑
OnClueInserted(clue);
}
else
{
// 如果类型不匹配,返回 ClueItem 到原位
interaction?.ReturnToOriginalPosition();
}
}
}
// 释放插槽时调用
public virtual void ReleaseSlot()
{
{
//FavoritesManager.Instance.RemoveClue(currentClueItem.GetClueData());
if (currentClueItem != null)
{
ReturnClueToCollection(currentClueItem);
@@ -101,13 +89,15 @@ public class ClueSlotBase : MonoBehaviour, IDropHandler
}
// 将 ClueItem 返回到集合的逻辑
protected void ReturnClueToCollection(ClueItem clueItem)
protected void ReturnClueToCollection(ClueItem clueItem)
{
// 这里调用 ClueInteraction 的返回逻辑
if (clueItem != null)
{
ClueInteraction clueInteraction = clueItem.GetComponent<ClueInteraction>();
clueInteraction?.ReturnToOriginalPosition(); // 返回到原位的逻辑
FavoritesManager.Instance.AddClue(clueItem.GetClueData());
// 你也可以在这里添加额外的逻辑来处理集合的更新
}
}
@@ -115,6 +105,7 @@ public class ClueSlotBase : MonoBehaviour, IDropHandler
// 插入线索时调用的虚方法,子类可以重写此方法以实现特定功能
protected virtual void OnClueInserted(Clue clue)
{
//FavoritesManager.Instance.RemoveClue(clue);
// 默认不做任何操作
Debug.Log("Clue inserted in base slot.");
}
+1 -1
View File
@@ -19,7 +19,7 @@ public class ImageClue : Clue
return;
}
if (clueItem.categoryText != null) clueItem.categoryText.text = "分类:" + Category;
//if (clueItem.categoryText != null) clueItem.categoryText.text = "分类:" + Category;
if (clueItem.nameText != null) clueItem.nameText.text = "名称:" + ClueName;
if (clueItem.clueImageUI != null) clueItem.clueImageUI.sprite = Sprite;
}
+12 -4
View File
@@ -16,17 +16,25 @@ public class MemoryClueSlot : ClueSlotBase
// 重写基类的 OnClueInserted 方法,处理播放记忆的逻辑
protected override void OnClueInserted(Clue clue)
{
if (clue is PunchTape)
{
punchTape = clue as PunchTape;
PlayMemory(punchTape);
PlayMemory(punchTape);
FavoritesManager.Instance.RemoveClue(clue);
}
}
public override void ReleaseSlot()
public override void ReleaseSlot()
{
if (currentClueItem != null)
{
base.ReleaseSlot();
punchTape = null; // 清除 PunchTape 引用
ReturnClueToCollection(currentClueItem);
currentClueItem = null; // 清除 currentClueItem 的引用
}
isOccupied = false;
interaction = null;
base.ReleaseSlot(); // 保证基类的清理逻辑被执行
}
private void PlayMemory(PunchTape punchTape)
{
if (punchTape != null)