Merge branch '春晖11.12中午' into 'develop'
先存一个版本.... See merge request aibis-dream/aibis-dream!67
This commit is contained in:
@@ -438,6 +438,7 @@ public void SetViewAvailability(string viewStateName, bool isAvailable)
|
||||
//MouseCursorManager.Instance.isInDeepView=false;
|
||||
OnGetMainView.Invoke();
|
||||
DialogController.Instance.StartDialogNode("主维修界面");
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ using DG.Tweening;
|
||||
using Yarn.Unity;
|
||||
using AibisDream;
|
||||
|
||||
public class UFProcess : MonoBehaviour
|
||||
public class UFProcess : MonoBehaviour,IViewLifecycle
|
||||
{
|
||||
public Image memoryProcessImage; // 用于显示调取记忆的表现
|
||||
public Image memoryFinishedImage; // 用于显示记忆处理结束的表现
|
||||
@@ -32,8 +32,31 @@ public class UFProcess : MonoBehaviour
|
||||
memoryProcessImage.material.SetFloat("_StrongTintFade", 1);
|
||||
memoryProcessImage.material.SetFloat("_GlitchFade", 0);
|
||||
}
|
||||
public void Initialize()
|
||||
{
|
||||
// 初始化逻辑
|
||||
|
||||
}
|
||||
|
||||
public void OnEnter()
|
||||
{
|
||||
|
||||
}
|
||||
public void OnShow()
|
||||
{
|
||||
Debug.Log("UFview Show");
|
||||
StartCoroutine(ProcessMemory("liuying1-2"));
|
||||
}
|
||||
|
||||
public void OnExit()
|
||||
{
|
||||
|
||||
Debug.Log("EyeView exited.");
|
||||
|
||||
}
|
||||
|
||||
[YarnCommand("UFprocess")]
|
||||
public IEnumerator ProcessMemory(string memoryFinishedImageName, string UFImageName,bool isColorWrong=false)
|
||||
public IEnumerator ProcessMemory(string memoryFinishedImageName)
|
||||
{
|
||||
AudioManager.PlayLoopAudio("UFlearning");
|
||||
if (isProcessing)
|
||||
@@ -43,30 +66,22 @@ public class UFProcess : MonoBehaviour
|
||||
}
|
||||
|
||||
isProcessing = true; // 开始处理,设置为true
|
||||
Image currentImage;
|
||||
if(isColorWrong)
|
||||
{
|
||||
currentImage=memoryFinishedImageColorWrong;
|
||||
}
|
||||
else
|
||||
{
|
||||
currentImage=memoryFinishedImage;
|
||||
}
|
||||
|
||||
|
||||
Sprite memoryFinishedSprite = Resources.Load<Sprite>("Art/Memory/" + memoryFinishedImageName);
|
||||
Sprite UFMemorySprite = Resources.Load<Sprite>("Art/Photos/" + UFImageName);
|
||||
Sprite UFMemorySprite = Resources.Load<Sprite>("Art/Photos/" + memoryFinishedImageName+"Error");
|
||||
if (memoryFinishedSprite == null)
|
||||
{
|
||||
Debug.LogError("Memory finished image not found: " + memoryFinishedImageName);
|
||||
yield break;
|
||||
}
|
||||
|
||||
if (UFMemorySprite == null)
|
||||
{
|
||||
Debug.LogError("UF image not found: " + UFImageName);
|
||||
yield break;
|
||||
}
|
||||
currentImage.material.SetFloat("_TwistUvAmount", 0); // 设置 Pixel_Fade 为0
|
||||
// if (UFMemorySprite == null)
|
||||
// {
|
||||
// Debug.LogError("UF image not found: " + UFImageName);
|
||||
// yield break;
|
||||
// }
|
||||
memoryFinishedImage.material.SetFloat("_TwistUvAmount", 0); // 设置 Pixel_Fade 为0
|
||||
|
||||
|
||||
// 开始处理记忆的表现
|
||||
@@ -80,29 +95,29 @@ public class UFProcess : MonoBehaviour
|
||||
memorySequence.Append(memoryProcessImage.material.DOFloat(0, "_StrongTintFade", 1));
|
||||
memorySequence.Join(memoryProcessImage.material.DOFloat(1, "_GlitchFade", 1));
|
||||
|
||||
memorySequence.AppendInterval(3f);
|
||||
memorySequence.AppendInterval(2f);
|
||||
|
||||
// 记忆处理结束,激活memoryFinishedImage
|
||||
memorySequence.AppendCallback(() =>
|
||||
{
|
||||
currentImage.color= Color.white;
|
||||
memoryFinishedImage.color= Color.white;
|
||||
memoryProcessImage.gameObject.SetActive(false);
|
||||
|
||||
currentImage.gameObject.SetActive(true);
|
||||
currentImage.sprite = memoryFinishedSprite; // 设置记忆处理结束的图片
|
||||
currentImage.material.SetFloat("_TwistUvAmount", 0); // 设置 Pixel_Fade 为0
|
||||
memoryFinishedImage.gameObject.SetActive(true);
|
||||
memoryFinishedImage.sprite = memoryFinishedSprite; // 设置记忆处理结束的图片
|
||||
memoryFinishedImage.material.SetFloat("_TwistUvAmount", 0); // 设置 Pixel_Fade 为0
|
||||
});
|
||||
|
||||
memorySequence.AppendInterval(2f); // 添加4秒的延时
|
||||
memorySequence.AppendInterval(0f); // 添加4秒的延时
|
||||
|
||||
memorySequence.Append(currentImage.material.DOFloat(1, "_TwistUvAmount", 3f));
|
||||
memorySequence.Join(currentImage.material.DOFloat(0, "_Alpha", 3f));
|
||||
memorySequence.Append(memoryFinishedImage.material.DOFloat(1, "_TwistUvAmount", 3f));
|
||||
memorySequence.Join(memoryFinishedImage.material.DOFloat(0, "_Alpha", 3f));
|
||||
memorySequence.AppendInterval(1f); // 添加1.5秒的延时
|
||||
|
||||
// 激活UFImage,并开始像素淡入效果
|
||||
memorySequence.AppendCallback(() =>
|
||||
{
|
||||
currentImage.gameObject.SetActive(false);
|
||||
memoryFinishedImage.gameObject.SetActive(false);
|
||||
UFImage.gameObject.SetActive(true);
|
||||
UFImage.color= Color.white;
|
||||
UFImage.sprite = UFMemorySprite; // 设置糅合后的广告图
|
||||
@@ -126,6 +141,7 @@ public class UFProcess : MonoBehaviour
|
||||
AudioManager.PauseLoopAudio();
|
||||
});
|
||||
yield return memorySequence.WaitForCompletion();
|
||||
DialogController.Instance.StartDialogNode("UF进程播放完毕");
|
||||
}
|
||||
public bool IsProcessing()
|
||||
{
|
||||
|
||||
@@ -954,6 +954,7 @@ MonoBehaviour:
|
||||
isallowedRepair: 1
|
||||
screwsContainer: {fileID: 1848343729}
|
||||
targetArea: {fileID: 0}
|
||||
isRepairMode: 0
|
||||
socketToEnable: {fileID: 1606783662}
|
||||
--- !u!225 &18925493
|
||||
CanvasGroup:
|
||||
@@ -3025,7 +3026,6 @@ GameObject:
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 137938504}
|
||||
- component: {fileID: 137938503}
|
||||
- component: {fileID: 137938505}
|
||||
m_Layer: 0
|
||||
m_Name: UFManager
|
||||
@@ -3034,20 +3034,6 @@ GameObject:
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &137938503
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 137938502}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 736e891081b782746a5c22a5e1237ad6, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
photoImage: {fileID: 938852130}
|
||||
baseImage: {fileID: 687630262}
|
||||
--- !u!4 &137938504
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -3255,6 +3241,7 @@ MonoBehaviour:
|
||||
isallowedRepair: 1
|
||||
screwsContainer: {fileID: 1259092914}
|
||||
targetArea: {fileID: 0}
|
||||
isRepairMode: 0
|
||||
socketToEnable: {fileID: 1371483729}
|
||||
--- !u!1 &145192917
|
||||
GameObject:
|
||||
@@ -8167,6 +8154,7 @@ MonoBehaviour:
|
||||
isallowedRepair: 1
|
||||
screwsContainer: {fileID: 2082853501}
|
||||
targetArea: {fileID: 0}
|
||||
isRepairMode: 0
|
||||
socketToEnable: {fileID: 1606783662}
|
||||
--- !u!1 &293839046
|
||||
GameObject:
|
||||
@@ -10260,6 +10248,7 @@ MonoBehaviour:
|
||||
- {fileID: 5156684866132484758, guid: dac7c27f779d8db4683b60ca67946a84, type: 3}
|
||||
- {fileID: 2485500826200128654, guid: 1afc7e4d2be0126438b5fe65aaccc901, type: 3}
|
||||
toolCanvas: {fileID: 1022441801}
|
||||
faceCanvas: {fileID: 929696549}
|
||||
--- !u!1 &397718960
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -13768,7 +13757,7 @@ 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: 0.8509493, y: -0.86955}
|
||||
m_AnchoredPosition: {x: 0.896, y: -0.94}
|
||||
m_SizeDelta: {x: 0.18, y: 0.18}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &586222318
|
||||
@@ -14506,7 +14495,7 @@ 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: -0.59985113, y: 0.37199992}
|
||||
m_AnchoredPosition: {x: -0.258, y: 0.926}
|
||||
m_SizeDelta: {x: 0.18, y: 0.18}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &602459842
|
||||
@@ -15937,7 +15926,7 @@ 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: 0.5998508, y: -0.372}
|
||||
m_AnchoredPosition: {x: 0.742, y: -0.952}
|
||||
m_SizeDelta: {x: 0.18, y: 0.18}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &651738038
|
||||
@@ -23621,10 +23610,10 @@ MonoBehaviour:
|
||||
cameraPos: {x: 0, y: 0.5}
|
||||
audioName: amb_remove
|
||||
soundName: remove_in_1
|
||||
- manager: {fileID: 0}
|
||||
- manager: {fileID: 137938505}
|
||||
viewPanel: {fileID: 1294333830}
|
||||
fixPanel: {fileID: 0}
|
||||
socket: {fileID: 0}
|
||||
socket: {fileID: 1606783662}
|
||||
viewState: 2
|
||||
Visuals:
|
||||
- {fileID: 0}
|
||||
@@ -30646,6 +30635,7 @@ MonoBehaviour:
|
||||
isallowedRepair: 0
|
||||
screwsContainer: {fileID: 376361520}
|
||||
targetArea: {fileID: 0}
|
||||
isRepairMode: 0
|
||||
socketToEnable: {fileID: 1371483729}
|
||||
--- !u!1 &1410030920
|
||||
GameObject:
|
||||
@@ -30901,7 +30891,7 @@ 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: -0.59985113, y: -0.372}
|
||||
m_AnchoredPosition: {x: -1.083, y: 0.098}
|
||||
m_SizeDelta: {x: 0.18, y: 0.18}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1434135402
|
||||
@@ -38521,7 +38511,7 @@ GameObject:
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!224 &1779014496
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -38538,7 +38528,7 @@ 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: 0.5998508, y: 0.37199992}
|
||||
m_AnchoredPosition: {x: 0.613, y: 0.37199992}
|
||||
m_SizeDelta: {x: 0.18, y: 0.18}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1779014497
|
||||
@@ -38863,7 +38853,7 @@ 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: -0.079050064, y: 0.86955}
|
||||
m_AnchoredPosition: {x: -0.092, y: 0.928}
|
||||
m_SizeDelta: {x: 0.18, y: 0.18}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1814339997
|
||||
@@ -40147,7 +40137,7 @@ GameObject:
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1848343730
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -41604,7 +41594,7 @@ 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: -0.8509493, y: 0.10694957}
|
||||
m_AnchoredPosition: {x: -0.903, y: 0.10694957}
|
||||
m_SizeDelta: {x: 0.18, y: 0.18}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1906421257
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2259,7 +2259,7 @@ MonoBehaviour:
|
||||
runMode: 0
|
||||
firstTalkSO: {fileID: 11400000, guid: 10601ce26230723479d875a630f15732, type: 2}
|
||||
clinicScene: ClinicScene
|
||||
testYarnProject: PeipeiNew
|
||||
testYarnProject: PeipeiNew2
|
||||
--- !u!4 &719228339
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -2283,30 +2283,6 @@ PrefabInstance:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 639620682}
|
||||
m_Modifications:
|
||||
- target: {fileID: 973112152669269883, guid: 5a170c0b6c933c540a86be691fa6745c, type: 3}
|
||||
propertyPath: _sID
|
||||
value: 121bb6da-9055-40a5-ae33-05be2ec09f54
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 973112152669269883, guid: 5a170c0b6c933c540a86be691fa6745c, type: 3}
|
||||
propertyPath: graphManager
|
||||
value:
|
||||
objectReference: {fileID: 380148808}
|
||||
- target: {fileID: 1496828829037596491, guid: 5a170c0b6c933c540a86be691fa6745c, type: 3}
|
||||
propertyPath: _sID
|
||||
value: 3c0ead6f-afd4-41bf-968d-0d36f758e232
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1496828829037596491, guid: 5a170c0b6c933c540a86be691fa6745c, type: 3}
|
||||
propertyPath: graphManager
|
||||
value:
|
||||
objectReference: {fileID: 380148808}
|
||||
- target: {fileID: 8404161828147755465, guid: 5a170c0b6c933c540a86be691fa6745c, type: 3}
|
||||
propertyPath: _sID
|
||||
value: 6b671834-73b4-403d-94d3-0726554589ee
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8404161828147755465, guid: 5a170c0b6c933c540a86be691fa6745c, type: 3}
|
||||
propertyPath: graphManager
|
||||
value:
|
||||
objectReference: {fileID: 380148808}
|
||||
- target: {fileID: 23699057384935269, guid: a1dbef2a0a50ecf49a39eae2d3e486b2, type: 3}
|
||||
propertyPath: m_Pivot.x
|
||||
value: 0.5
|
||||
@@ -2435,6 +2411,30 @@ PrefabInstance:
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 973112152669269883, guid: 5a170c0b6c933c540a86be691fa6745c, type: 3}
|
||||
propertyPath: _sID
|
||||
value: 121bb6da-9055-40a5-ae33-05be2ec09f54
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 973112152669269883, guid: 5a170c0b6c933c540a86be691fa6745c, type: 3}
|
||||
propertyPath: graphManager
|
||||
value:
|
||||
objectReference: {fileID: 380148808}
|
||||
- target: {fileID: 1496828829037596491, guid: 5a170c0b6c933c540a86be691fa6745c, type: 3}
|
||||
propertyPath: _sID
|
||||
value: 3c0ead6f-afd4-41bf-968d-0d36f758e232
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1496828829037596491, guid: 5a170c0b6c933c540a86be691fa6745c, type: 3}
|
||||
propertyPath: graphManager
|
||||
value:
|
||||
objectReference: {fileID: 380148808}
|
||||
- target: {fileID: 8404161828147755465, guid: 5a170c0b6c933c540a86be691fa6745c, type: 3}
|
||||
propertyPath: _sID
|
||||
value: 6b671834-73b4-403d-94d3-0726554589ee
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8404161828147755465, guid: 5a170c0b6c933c540a86be691fa6745c, type: 3}
|
||||
propertyPath: graphManager
|
||||
value:
|
||||
objectReference: {fileID: 380148808}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
@@ -4908,30 +4908,6 @@ PrefabInstance:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 639620682}
|
||||
m_Modifications:
|
||||
- target: {fileID: 973112152669269883, guid: 5a170c0b6c933c540a86be691fa6745c, type: 3}
|
||||
propertyPath: _sID
|
||||
value: 67e03198-f3fa-40e3-88ca-042210787447
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 973112152669269883, guid: 5a170c0b6c933c540a86be691fa6745c, type: 3}
|
||||
propertyPath: graphManager
|
||||
value:
|
||||
objectReference: {fileID: 380148808}
|
||||
- target: {fileID: 1496828829037596491, guid: 5a170c0b6c933c540a86be691fa6745c, type: 3}
|
||||
propertyPath: _sID
|
||||
value: 39cf0bb1-4276-40ca-8336-c91048fb4ba1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1496828829037596491, guid: 5a170c0b6c933c540a86be691fa6745c, type: 3}
|
||||
propertyPath: graphManager
|
||||
value:
|
||||
objectReference: {fileID: 380148808}
|
||||
- target: {fileID: 8404161828147755465, guid: 5a170c0b6c933c540a86be691fa6745c, type: 3}
|
||||
propertyPath: _sID
|
||||
value: 27840e3a-f0c8-4ee8-a048-4e57774c3376
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8404161828147755465, guid: 5a170c0b6c933c540a86be691fa6745c, type: 3}
|
||||
propertyPath: graphManager
|
||||
value:
|
||||
objectReference: {fileID: 380148808}
|
||||
- target: {fileID: 23699057384935269, guid: a1dbef2a0a50ecf49a39eae2d3e486b2, type: 3}
|
||||
propertyPath: m_Pivot.x
|
||||
value: 0.5
|
||||
@@ -5092,6 +5068,30 @@ PrefabInstance:
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 973112152669269883, guid: 5a170c0b6c933c540a86be691fa6745c, type: 3}
|
||||
propertyPath: _sID
|
||||
value: 67e03198-f3fa-40e3-88ca-042210787447
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 973112152669269883, guid: 5a170c0b6c933c540a86be691fa6745c, type: 3}
|
||||
propertyPath: graphManager
|
||||
value:
|
||||
objectReference: {fileID: 380148808}
|
||||
- target: {fileID: 1496828829037596491, guid: 5a170c0b6c933c540a86be691fa6745c, type: 3}
|
||||
propertyPath: _sID
|
||||
value: 39cf0bb1-4276-40ca-8336-c91048fb4ba1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1496828829037596491, guid: 5a170c0b6c933c540a86be691fa6745c, type: 3}
|
||||
propertyPath: graphManager
|
||||
value:
|
||||
objectReference: {fileID: 380148808}
|
||||
- target: {fileID: 8404161828147755465, guid: 5a170c0b6c933c540a86be691fa6745c, type: 3}
|
||||
propertyPath: _sID
|
||||
value: 27840e3a-f0c8-4ee8-a048-4e57774c3376
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8404161828147755465, guid: 5a170c0b6c933c540a86be691fa6745c, type: 3}
|
||||
propertyPath: graphManager
|
||||
value:
|
||||
objectReference: {fileID: 380148808}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
@@ -7610,30 +7610,6 @@ PrefabInstance:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 639620682}
|
||||
m_Modifications:
|
||||
- target: {fileID: 973112152669269883, guid: 5a170c0b6c933c540a86be691fa6745c, type: 3}
|
||||
propertyPath: _sID
|
||||
value: 65545b51-845c-4df4-8f5c-90c1f04cbe23
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 973112152669269883, guid: 5a170c0b6c933c540a86be691fa6745c, type: 3}
|
||||
propertyPath: graphManager
|
||||
value:
|
||||
objectReference: {fileID: 380148808}
|
||||
- target: {fileID: 1496828829037596491, guid: 5a170c0b6c933c540a86be691fa6745c, type: 3}
|
||||
propertyPath: _sID
|
||||
value: 3336344b-f73d-481c-bd5a-548f8a4bead4
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1496828829037596491, guid: 5a170c0b6c933c540a86be691fa6745c, type: 3}
|
||||
propertyPath: graphManager
|
||||
value:
|
||||
objectReference: {fileID: 380148808}
|
||||
- target: {fileID: 8404161828147755465, guid: 5a170c0b6c933c540a86be691fa6745c, type: 3}
|
||||
propertyPath: _sID
|
||||
value: ddd9082f-516c-4e2f-bd55-78c29857f972
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8404161828147755465, guid: 5a170c0b6c933c540a86be691fa6745c, type: 3}
|
||||
propertyPath: graphManager
|
||||
value:
|
||||
objectReference: {fileID: 380148808}
|
||||
- target: {fileID: 23699057384935269, guid: a1dbef2a0a50ecf49a39eae2d3e486b2, type: 3}
|
||||
propertyPath: m_Pivot.x
|
||||
value: 0.5
|
||||
@@ -7790,6 +7766,30 @@ PrefabInstance:
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 973112152669269883, guid: 5a170c0b6c933c540a86be691fa6745c, type: 3}
|
||||
propertyPath: _sID
|
||||
value: 65545b51-845c-4df4-8f5c-90c1f04cbe23
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 973112152669269883, guid: 5a170c0b6c933c540a86be691fa6745c, type: 3}
|
||||
propertyPath: graphManager
|
||||
value:
|
||||
objectReference: {fileID: 380148808}
|
||||
- target: {fileID: 1496828829037596491, guid: 5a170c0b6c933c540a86be691fa6745c, type: 3}
|
||||
propertyPath: _sID
|
||||
value: 3336344b-f73d-481c-bd5a-548f8a4bead4
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1496828829037596491, guid: 5a170c0b6c933c540a86be691fa6745c, type: 3}
|
||||
propertyPath: graphManager
|
||||
value:
|
||||
objectReference: {fileID: 380148808}
|
||||
- target: {fileID: 8404161828147755465, guid: 5a170c0b6c933c540a86be691fa6745c, type: 3}
|
||||
propertyPath: _sID
|
||||
value: ddd9082f-516c-4e2f-bd55-78c29857f972
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8404161828147755465, guid: 5a170c0b6c933c540a86be691fa6745c, type: 3}
|
||||
propertyPath: graphManager
|
||||
value:
|
||||
objectReference: {fileID: 380148808}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
@@ -8314,30 +8314,6 @@ PrefabInstance:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 639620682}
|
||||
m_Modifications:
|
||||
- target: {fileID: 973112152669269883, guid: 5a170c0b6c933c540a86be691fa6745c, type: 3}
|
||||
propertyPath: _sID
|
||||
value: 67e03198-f3fa-40e3-88ca-042210787447
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 973112152669269883, guid: 5a170c0b6c933c540a86be691fa6745c, type: 3}
|
||||
propertyPath: graphManager
|
||||
value:
|
||||
objectReference: {fileID: 380148808}
|
||||
- target: {fileID: 1496828829037596491, guid: 5a170c0b6c933c540a86be691fa6745c, type: 3}
|
||||
propertyPath: _sID
|
||||
value: 39cf0bb1-4276-40ca-8336-c91048fb4ba1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1496828829037596491, guid: 5a170c0b6c933c540a86be691fa6745c, type: 3}
|
||||
propertyPath: graphManager
|
||||
value:
|
||||
objectReference: {fileID: 380148808}
|
||||
- target: {fileID: 8404161828147755465, guid: 5a170c0b6c933c540a86be691fa6745c, type: 3}
|
||||
propertyPath: _sID
|
||||
value: 27840e3a-f0c8-4ee8-a048-4e57774c3376
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8404161828147755465, guid: 5a170c0b6c933c540a86be691fa6745c, type: 3}
|
||||
propertyPath: graphManager
|
||||
value:
|
||||
objectReference: {fileID: 380148808}
|
||||
- target: {fileID: 23699057384935269, guid: a1dbef2a0a50ecf49a39eae2d3e486b2, type: 3}
|
||||
propertyPath: m_Pivot.x
|
||||
value: 0.5
|
||||
@@ -8514,6 +8490,30 @@ PrefabInstance:
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 973112152669269883, guid: 5a170c0b6c933c540a86be691fa6745c, type: 3}
|
||||
propertyPath: _sID
|
||||
value: 67e03198-f3fa-40e3-88ca-042210787447
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 973112152669269883, guid: 5a170c0b6c933c540a86be691fa6745c, type: 3}
|
||||
propertyPath: graphManager
|
||||
value:
|
||||
objectReference: {fileID: 380148808}
|
||||
- target: {fileID: 1496828829037596491, guid: 5a170c0b6c933c540a86be691fa6745c, type: 3}
|
||||
propertyPath: _sID
|
||||
value: 39cf0bb1-4276-40ca-8336-c91048fb4ba1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1496828829037596491, guid: 5a170c0b6c933c540a86be691fa6745c, type: 3}
|
||||
propertyPath: graphManager
|
||||
value:
|
||||
objectReference: {fileID: 380148808}
|
||||
- target: {fileID: 8404161828147755465, guid: 5a170c0b6c933c540a86be691fa6745c, type: 3}
|
||||
propertyPath: _sID
|
||||
value: 27840e3a-f0c8-4ee8-a048-4e57774c3376
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8404161828147755465, guid: 5a170c0b6c933c540a86be691fa6745c, type: 3}
|
||||
propertyPath: graphManager
|
||||
value:
|
||||
objectReference: {fileID: 380148808}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects:
|
||||
- {fileID: 7898933851103092944, guid: a1dbef2a0a50ecf49a39eae2d3e486b2, type: 3}
|
||||
|
||||
@@ -121,6 +121,7 @@ namespace AibisDream
|
||||
if(CheckIfNodeExistInCurrentYarnProject(nodeName))
|
||||
{
|
||||
dialogueRunner.StartDialogue(nodeName);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -235,6 +235,16 @@ public class Plug : MonoBehaviour, IDragHandler, IPointerDownHandler, IPointerUp
|
||||
// });
|
||||
// }
|
||||
}
|
||||
public void ReturnToInit()
|
||||
{
|
||||
transform.DOMove(startPosition, 0.1f).OnComplete(() =>
|
||||
{
|
||||
//transform.rotation = startRotation;
|
||||
initialSocket.InsertPlug(this);
|
||||
OnPlugInserted?.Invoke(this); // 触发插入事件
|
||||
plugSprite.enabled =false; // Make the plug sprite disappear when it is inserted into the initial socket.
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
void OnDrawGizmosSelected()
|
||||
|
||||
@@ -64,6 +64,8 @@ public class OscilloscopeController : MonoBehaviour
|
||||
}
|
||||
private void HandlePlugInserted(Plug plug)
|
||||
{
|
||||
DialogController.Instance.SetVariable("$currentSocket",plug.currentSocket.name);
|
||||
DialogController.Instance.StartDialogNode("PlugInsert");
|
||||
// 这里可以处理插入后的波形显示逻辑
|
||||
Debug.Log("Plug inserted into the socket, starting waveform display.");
|
||||
}
|
||||
@@ -97,6 +99,7 @@ public class OscilloscopeController : MonoBehaviour
|
||||
|
||||
if(currentSocket.WaitYarnCommand)
|
||||
{
|
||||
DialogController.Instance.StartDialogNode(yarnString);
|
||||
// DialogController.Instance.SetVariable("$ViewToDeepIn",trimmedString);
|
||||
// DialogController.Instance.StartDialogNode("DeepInView");
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ using UnityEngine.EventSystems;
|
||||
using DG.Tweening;
|
||||
using System.Drawing; // 需要引入 DOTween 命名空间
|
||||
using UnityEngine.UI;
|
||||
using AibisDream;
|
||||
|
||||
public class Module : MonoBehaviour, IPointerClickHandler
|
||||
{
|
||||
@@ -16,65 +17,92 @@ public class Module : MonoBehaviour, IPointerClickHandler
|
||||
|
||||
public GameObject screwsContainer; // 螺丝的父对象
|
||||
public RectTransform targetArea; // 拖拽的目标区域,用于判定维修完成
|
||||
|
||||
private bool isRepairMode = false;
|
||||
[HideInInspector]
|
||||
public bool isRepairMode = false;
|
||||
private bool canDrag = false;
|
||||
private Vector3 initialPosition;
|
||||
|
||||
private Plug plug;
|
||||
|
||||
|
||||
public Socket socketToEnable;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
plug=FindObjectOfType<Plug>();
|
||||
initialPosition = transform.position;
|
||||
originalCanvasPosition = faceCanvas.position;
|
||||
//socketToEnable.raycastTarget=false;
|
||||
socketToEnable.IsAvailable=false;
|
||||
EnableScrewsInteraction(false);
|
||||
foreach (Transform screw in screwsContainer.transform)
|
||||
{
|
||||
screw.GetComponent<Screw>().enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
public void StartRepairIfToolIsScrewdriver(Tool tool)
|
||||
// public void StartRepairIfToolIsScrewdriver(Tool tool)
|
||||
// {
|
||||
// EnterRepairMode();
|
||||
// }
|
||||
public void RemoveAllPlugsFromSockets()
|
||||
{
|
||||
EnterRepairMode();
|
||||
Socket[] sockets = FindObjectsOfType<Socket>(); // 找到场景中的所有Socket组件
|
||||
foreach (Socket socket in sockets)
|
||||
{
|
||||
socket.RemovePlug(plug); // 移除Plug
|
||||
}
|
||||
plug.ReturnToInit();
|
||||
plug.enabled=false;
|
||||
}
|
||||
|
||||
public void EnterRepairMode()
|
||||
{
|
||||
isRepairMode = true;
|
||||
// public void EnterRepairMode()
|
||||
// {
|
||||
|
||||
// 使用 DOTween 对 Canvas 的位置和缩放进行平滑过渡
|
||||
faceCanvas.DOMove(repairCanvasPosition, animationDuration)
|
||||
.SetEase(Ease.OutQuad) // 移动面板
|
||||
.OnComplete(() => EnableScrewsInteraction(true)); // 动画完成后才启用交互
|
||||
// DialogController.Instance.StartDialogNode("EnterRepairMode");
|
||||
// isRepairMode = true;
|
||||
// RemoveAllPlugsFromSockets();
|
||||
// // 使用 DOTween 对 Canvas 的位置和缩放进行平滑过渡
|
||||
// faceCanvas.DOMove(repairCanvasPosition, animationDuration)
|
||||
// .SetEase(Ease.OutQuad) // 移动面板
|
||||
// .OnComplete(() => EnableScrewsInteraction(true)); // 动画完成后才启用交互
|
||||
|
||||
faceCanvas.DOScale(repairCanvasScale, animationDuration)
|
||||
.SetEase(Ease.OutQuad); // 缩放面板
|
||||
}
|
||||
// faceCanvas.DOScale(repairCanvasScale, animationDuration)
|
||||
// .SetEase(Ease.OutQuad); // 缩放面板
|
||||
// }
|
||||
|
||||
public void ExitRepairMode()
|
||||
{
|
||||
isRepairMode = false;
|
||||
// public void ExitRepairMode()
|
||||
// {
|
||||
// isRepairMode = false;
|
||||
|
||||
// 使用 DOTween 对 Canvas 的位置和缩放进行平滑过渡
|
||||
faceCanvas.DOMove(originalCanvasPosition, animationDuration)
|
||||
.SetEase(Ease.InQuad)
|
||||
.OnComplete(() => EnableScrewsInteraction(false)); // 动画完成后禁用交互
|
||||
// // 使用 DOTween 对 Canvas 的位置和缩放进行平滑过渡
|
||||
// faceCanvas.DOMove(originalCanvasPosition, animationDuration)
|
||||
// .SetEase(Ease.InQuad)
|
||||
// .OnComplete(() => EnableScrewsInteraction(false)); // 动画完成后禁用交互
|
||||
|
||||
faceCanvas.DOScale(1f, animationDuration)
|
||||
.SetEase(Ease.InQuad); // 恢复面板缩放
|
||||
ResetModulePosition();
|
||||
ToolManager.Instance.ShowToolBoxAfterTask();
|
||||
//socketToEnable.raycastTarget=true;
|
||||
socketToEnable.IsAvailable=true;
|
||||
}
|
||||
// faceCanvas.DOScale(1f, animationDuration)
|
||||
// .SetEase(Ease.InQuad); // 恢复面板缩放
|
||||
// ResetModulePosition();
|
||||
// ToolManager.Instance.ShowToolBoxAfterTask();
|
||||
// //socketToEnable.raycastTarget=true;
|
||||
// socketToEnable.IsAvailable=true;
|
||||
|
||||
private void EnableScrewsInteraction(bool isEnabled)
|
||||
// foreach (Transform screw in screwsContainer.transform)
|
||||
// {
|
||||
// if(screw!=null)
|
||||
// {
|
||||
// screw.GetComponent<Screw>().enabled = false;
|
||||
// }
|
||||
|
||||
// }
|
||||
// }
|
||||
|
||||
public void EnableScrewsInteraction(bool isEnabled)
|
||||
{
|
||||
foreach (Transform screw in screwsContainer.transform)
|
||||
{
|
||||
screw.GetComponent<Screw>().enabled = isEnabled;
|
||||
}
|
||||
plug.enabled=true;
|
||||
}
|
||||
|
||||
private void ResetModulePosition()
|
||||
@@ -102,6 +130,14 @@ public class Module : MonoBehaviour, IPointerClickHandler
|
||||
|
||||
if (allDropped)
|
||||
{
|
||||
socketToEnable.IsAvailable=true;
|
||||
foreach (Transform screw in screwsContainer.transform)
|
||||
{
|
||||
if(screw!=null)
|
||||
{
|
||||
screw.GetComponent<Screw>().enabled = false;
|
||||
}
|
||||
}
|
||||
Destroy(gameObject);
|
||||
CompleteRepair();
|
||||
}
|
||||
@@ -122,7 +158,8 @@ public class Module : MonoBehaviour, IPointerClickHandler
|
||||
|
||||
private void CompleteRepair()
|
||||
{
|
||||
DialogController.Instance.StartDialogNode("FinishedReapir");
|
||||
Debug.Log("维修完成!");
|
||||
ExitRepairMode();
|
||||
//ExitRepairMode();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.UI;
|
||||
using Yarn.Unity;
|
||||
using AibisDream;
|
||||
|
||||
public class ToolManager : MonoBehaviour
|
||||
{
|
||||
@@ -17,6 +18,13 @@ public class ToolManager : MonoBehaviour
|
||||
private bool isBoxShow = false;
|
||||
|
||||
public bool HasTool => currentTool != null; // 判断玩家是否已获得工具
|
||||
private Module currentModule;
|
||||
|
||||
public Transform faceCanvas;
|
||||
|
||||
private Vector3 originalCanvasPosition; // 原始面板位置
|
||||
|
||||
private bool isInRepiarMode=false;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
@@ -34,6 +42,8 @@ public class ToolManager : MonoBehaviour
|
||||
|
||||
private void Start()
|
||||
{
|
||||
originalCanvasPosition=faceCanvas.position;
|
||||
currentModule=null;
|
||||
toolBox.SetActive(false); // 初始隐藏工具盒
|
||||
|
||||
toolPrefabDictionary = new Dictionary<string, GameObject>();
|
||||
@@ -49,15 +59,45 @@ public class ToolManager : MonoBehaviour
|
||||
public void TryStartRepairMode(Module module)
|
||||
{
|
||||
// 如果当前工具是螺丝刀,调用Module的EnterRepairMode方法
|
||||
if (currentTool is Screwdriver&&module.isallowedRepair)
|
||||
if (currentTool is Screwdriver&&module.isallowedRepair&&isInRepiarMode==false)
|
||||
{
|
||||
module.StartRepairIfToolIsScrewdriver(currentTool);
|
||||
//module.StartRepairIfToolIsScrewdriver(currentTool);
|
||||
currentModule=module;
|
||||
EnterRepairMode();
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("no tool or not allowed");
|
||||
}
|
||||
}
|
||||
public void EnterRepairMode()
|
||||
{
|
||||
isInRepiarMode=true;
|
||||
//isRepairMode = true;
|
||||
currentModule.RemoveAllPlugsFromSockets();
|
||||
// 使用 DOTween 对 Canvas 的位置和缩放进行平滑过渡
|
||||
faceCanvas.DOMove(currentModule.repairCanvasPosition, 1)
|
||||
.SetEase(Ease.OutQuad) // 移动面板
|
||||
.OnComplete(() => currentModule.EnableScrewsInteraction(true)); // 动画完成后才启用交互
|
||||
faceCanvas.DOScale(currentModule.repairCanvasScale, 1)
|
||||
.SetEase(Ease.OutQuad)
|
||||
.OnComplete(() => DialogController.Instance.StartDialogNode("EnterRepairMode")); // 缩放面板
|
||||
}
|
||||
|
||||
[YarnCommand("ExitRepairMode")]
|
||||
public void ExitRepairMode()
|
||||
{
|
||||
isInRepiarMode=false;
|
||||
// 使用 DOTween 对 Canvas 的位置和缩放进行平滑过渡
|
||||
faceCanvas.DOMove(originalCanvasPosition, 1)
|
||||
.SetEase(Ease.InQuad);
|
||||
|
||||
faceCanvas.DOScale(1f, 1)
|
||||
.SetEase(Ease.InQuad); // 恢复面板缩放
|
||||
ShowToolBoxAfterTask();
|
||||
currentModule=null;
|
||||
}
|
||||
|
||||
|
||||
[YarnCommand("ShowTool")]
|
||||
public void ShowTool(string toolName)
|
||||
@@ -117,6 +157,7 @@ public class ToolManager : MonoBehaviour
|
||||
// 移除工具的点击事
|
||||
|
||||
// 显示工具盒并添加归还工具的点击事件
|
||||
|
||||
public void ShowToolBoxAfterTask()
|
||||
{
|
||||
toolBox.SetActive(true);
|
||||
|
||||
@@ -103,10 +103,10 @@ public class MouseCursorManager : MonoBehaviour
|
||||
{
|
||||
SetCursor(handCursorSprite);
|
||||
}
|
||||
else if (IsHoveringOverDialogueItem())
|
||||
{
|
||||
SetCursor(searchCursorSprite, true); // 使用翻转光标
|
||||
}
|
||||
// else if (IsHoveringOverDialogueItem())
|
||||
// {
|
||||
// SetCursor(searchCursorSprite, true); // 使用翻转光标
|
||||
// }
|
||||
else
|
||||
{
|
||||
ResetCursor();
|
||||
@@ -114,30 +114,36 @@ public class MouseCursorManager : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
private bool IsHoveringOverDialogueItem()
|
||||
{
|
||||
if (EventSystem.current.IsPointerOverGameObject())
|
||||
{
|
||||
PointerEventData pointerData = new PointerEventData(EventSystem.current) { position = Input.mousePosition };
|
||||
var results = new List<RaycastResult>();
|
||||
EventSystem.current.RaycastAll(pointerData, results);
|
||||
foreach (var result in results)
|
||||
{
|
||||
if (result.gameObject.CompareTag("DialogueObject")) // 物体需添加 DialogueObject 标签
|
||||
{
|
||||
if(result.gameObject.transform.GetChild(0).GetComponent<Socket>().IsAvailable)
|
||||
{
|
||||
Debug.Log("Hover Dialogue");
|
||||
return true;
|
||||
}
|
||||
// private bool IsHoveringOverDialogueItem()
|
||||
// {
|
||||
// if (EventSystem.current.IsPointerOverGameObject())
|
||||
// {
|
||||
// PointerEventData pointerData = new PointerEventData(EventSystem.current) { position = Input.mousePosition };
|
||||
// var results = new List<RaycastResult>();
|
||||
// EventSystem.current.RaycastAll(pointerData, results);
|
||||
// foreach (var result in results)
|
||||
// {
|
||||
// if (result.gameObject.CompareTag("DialogueObject")) // 物体需添加 DialogueObject 标签
|
||||
// {
|
||||
// if(result.gameObject.transform.GetChild(0)!=null)
|
||||
// {
|
||||
// if(result.gameObject.transform.GetChild(0).GetComponent<Socket>().IsAvailable)
|
||||
// {
|
||||
// Debug.Log("Hover Dialogue");
|
||||
// return true;
|
||||
|
||||
// }
|
||||
|
||||
|
||||
// }
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
// }
|
||||
// }
|
||||
// return false;
|
||||
// }
|
||||
|
||||
private bool IsHoveringOverDragItem()
|
||||
{
|
||||
@@ -175,40 +181,40 @@ public class MouseCursorManager : MonoBehaviour
|
||||
return;
|
||||
}
|
||||
|
||||
PointerEventData pointerData = new PointerEventData(EventSystem.current) { position = Input.mousePosition };
|
||||
var results = new List<RaycastResult>();
|
||||
EventSystem.current.RaycastAll(pointerData, results);
|
||||
// PointerEventData pointerData = new PointerEventData(EventSystem.current) { position = Input.mousePosition };
|
||||
// var results = new List<RaycastResult>();
|
||||
// EventSystem.current.RaycastAll(pointerData, results);
|
||||
|
||||
foreach (var result in results)
|
||||
{
|
||||
Canvas hitCanvas = result.gameObject.GetComponentInParent<Canvas>();
|
||||
// foreach (var result in results)
|
||||
// {
|
||||
// Canvas hitCanvas = result.gameObject.GetComponentInParent<Canvas>();
|
||||
|
||||
if (hitCanvas != null)
|
||||
{
|
||||
// If the Canvas's sortingOrder is higher than the reference sortingOrder, ignore it
|
||||
if (hitCanvas.renderMode==RenderMode.ScreenSpaceOverlay)
|
||||
{
|
||||
Debug.Log("Raycast hit an object with a higher sortingOrder that should block the raycast");
|
||||
// You can add additional logic here to block interaction or trigger events
|
||||
//return false; // Stop further raycasting if it should be blocked
|
||||
}
|
||||
else
|
||||
{
|
||||
if (result.gameObject.CompareTag("DialogueObject"))
|
||||
{
|
||||
// if (hitCanvas != null)
|
||||
// {
|
||||
// // If the Canvas's sortingOrder is higher than the reference sortingOrder, ignore it
|
||||
// if (hitCanvas.renderMode==RenderMode.ScreenSpaceOverlay)
|
||||
// {
|
||||
// Debug.Log("Raycast hit an object with a higher sortingOrder that should block the raycast");
|
||||
// // You can add additional logic here to block interaction or trigger events
|
||||
// //return false; // Stop further raycasting if it should be blocked
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// if (result.gameObject.CompareTag("DialogueObject"))
|
||||
// {
|
||||
|
||||
if(result.gameObject.transform.GetChild(0).GetComponent<Socket>().IsAvailable)
|
||||
{
|
||||
string dialogueNode =result.gameObject.name+"Dialogue"; // 假设物体名是对话节点
|
||||
DialogController.Instance.StartDialogNode(dialogueNode);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// if(result.gameObject.transform.GetChild(0).GetComponent<Socket>().IsAvailable)
|
||||
// {
|
||||
// string dialogueNode =result.gameObject.name+"Dialogue"; // 假设物体名是对话节点
|
||||
// DialogController.Instance.StartDialogNode(dialogueNode);
|
||||
// return;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user