让currenttartget重复也能触发

This commit is contained in:
2024-12-30 02:04:33 +08:00
parent c44da6f0d9
commit db9d5c8c01
6 changed files with 135 additions and 8 deletions
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 55815694d4a85b94bb7a56c5b004b0ef
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,84 @@
title: Start
tags:
colorID: 8
position: 253,-2041
---
<<declare $currentEyeTarget="">>
<<load_scene PeipeiFixScene>>
<<indoor_new 1>>
<<switch_fix_system_to "BodyModule">>
<<switch_fix_system_to "Eye">>
===
title: IntoEyeView
tags:
group:视觉检查
colorID: 6
position: 244,271
---
<<if $currentEyeTarget == "computer">>
<<jump Eye_computerAfterSurgery>>
<<elseif $currentEyeTarget == "poster">>
<<jump Eye_posterAfterSurgery>>
<<elseif $currentEyeTarget == "sky">>
<<jump Eye_skyAfterSurgery>>
<<elseif $currentEyeTarget == "plant">>
<<jump Eye_plantAfterSurgery>>
<<endif>>
===
title: Eye_skyAfterSurgery
tags:
colorID: 8
group:视觉检查
position: 559,756
---
看目标
<<jump EyeCheckEnd>>
===
title: EyeCheckEnd
tags:
colorID: 3
group:视觉检查
position: 251,1116
---
<<Set_MouseMovementLockState EyeManager false>>
===
title: Eye_computerAfterSurgery
tags:
colorID: 8
group:视觉检查
position: 1228,749
---
看目标
<<jump EyeCheckEnd>>
===
title: Eye_posterAfterSurgery
tags:
colorID: 8
group:视觉检查
position: 1006,747
---
看目标
<<jump EyeCheckEnd>>
===
title: Eye_plantAfterSurgery
tags:
colorID: 8
group:视觉检查
position: 787,755
---
看目标
<<jump EyeCheckEnd>>
===
@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: cdad29dc629aa0f4786f5445bb65caf1
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 94073015eacc34c1d8fc6786e43d60ca, type: 3}
@@ -0,0 +1,12 @@
{
"projectFileVersion": 2,
"sourceFiles": [
"**/*.yarn"
],
"excludeFiles": [
"**/*~/*"
],
"localisation": {},
"baseLanguage": "zh-CHS",
"compilerOptions": {}
}
@@ -0,0 +1,13 @@
fileFormatVersion: 2
guid: f4b36c70851a3dd4eb172dc7613b3386
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 053561912b1654d80a424bb0696a74ae, type: 3}
useAddressableAssets: 0
UseUnityLocalisationSystem: 0
unityLocalisationStringTableCollection: {instanceID: 0}
@@ -139,10 +139,10 @@ public class EyeSystem : MonoBehaviour
public void SetTarget(EyeTarget newTarget)
{
if (newTarget != currentTarget)
{
// if (newTarget != currentTarget)
// {
StartCoroutine(SetTargetCoroutine(newTarget.gameObject.name));
}
// }
}
[YarnCommand("set_Eyetarget")]
public IEnumerator SetTargetCoroutine(string targetName,bool startDialogue=true)
@@ -156,11 +156,11 @@ public class EyeSystem : MonoBehaviour
yield break;
}
if (currentTarget == target)
{
// DialogController.Instance.SetVariable("$currentEyeTarget",target.name);
yield break;
}
// if (currentTarget == target)
// {
// DialogController.Instance.SetVariable("$currentEyeTarget",target.name);
// yield break;
// }
DialogController.Instance.SetVariable("$currentEyeTarget",target.name);
StartCoroutine(EyeEffectFadeOut());
float duration = eyeStateEffect.TransitionDuration;