From fc3b4d72072db65bf5cb41f8e967faea855eb154 Mon Sep 17 00:00:00 2001 From: TRAfoer Date: Thu, 17 Jul 2025 17:03:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E4=B8=80=E4=B8=AA=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/NLayer/NLayer.csproj.meta | 7 + .../EditorGame/Animations/Transform/LookAt.cs | 12 +- .../GeneralSubmodules/TransformSubmodule.cs | 32 +- .../AutoSave/world for white/AutoSave_0.json | 338 +++++++++--------- 4 files changed, 198 insertions(+), 191 deletions(-) create mode 100644 Assets/NLayer/NLayer.csproj.meta diff --git a/Assets/NLayer/NLayer.csproj.meta b/Assets/NLayer/NLayer.csproj.meta new file mode 100644 index 00000000..e0885ac2 --- /dev/null +++ b/Assets/NLayer/NLayer.csproj.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 6dbdd314784e80440b48088e6357c1ef +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/EditorGame/Animations/Transform/LookAt.cs b/Assets/Scripts/EditorGame/Animations/Transform/LookAt.cs index dcef1855..2c4011d5 100644 --- a/Assets/Scripts/EditorGame/Animations/Transform/LookAt.cs +++ b/Assets/Scripts/EditorGame/Animations/Transform/LookAt.cs @@ -43,23 +43,23 @@ namespace Ichni.RhythmGame { timeDurationSubmodule = new TimeDurationSubmodule(this); } - + void LateUpdate() { - (animatedObject as IHaveTransformSubmodule)?.UpdateLookAt(this); + if (enabling.value) (animatedObject as IHaveTransformSubmodule)?.UpdateLookAt(this); } - + protected override void UpdateAnimation(float songTime) { if (lookAtObject == null) return; - + enabling.UpdateFlexibleBool(EditorManager.instance.songInformation.songTime); - + if (!targetTransformSubmodule.eulerAnglesOffsetLock || enabling.value) { targetTransformSubmodule.eulerAnglesOffsetLock = enabling.value; } - + if (enabling.value) { animationReturnType = FlexibleReturnType.MiddleExecuting; diff --git a/Assets/Scripts/EditorGame/Base/GeneralSubmodules/TransformSubmodule.cs b/Assets/Scripts/EditorGame/Base/GeneralSubmodules/TransformSubmodule.cs index 49c00c1f..6460294c 100644 --- a/Assets/Scripts/EditorGame/Base/GeneralSubmodules/TransformSubmodule.cs +++ b/Assets/Scripts/EditorGame/Base/GeneralSubmodules/TransformSubmodule.cs @@ -24,7 +24,7 @@ namespace Ichni.RhythmGame public Vector3 currentPosition; public Vector3 currentEulerAngles; public Vector3 currentScale; - + public bool positionDirtyMark; public bool eulerAnglesDirtyMark; public bool scaleDirtyMark; @@ -41,7 +41,7 @@ namespace Ichni.RhythmGame positionOffset = Vector3.zero; eulerAnglesOffset = Vector3.zero; scaleOffset = Vector3.zero; - + currentPosition = Vector3.zero; currentEulerAngles = Vector3.zero; currentScale = Vector3.one; @@ -69,7 +69,7 @@ namespace Ichni.RhythmGame positionOffset = Vector3.zero; eulerAnglesOffset = Vector3.zero; scaleOffset = Vector3.zero; - + currentPosition = originalPosition; currentEulerAngles = originalEulerAngles; currentScale = originalScale; @@ -99,7 +99,7 @@ namespace Ichni.RhythmGame public override void SetUpInspector() { IHaveInspection inspector = EditorManager.instance.uiManager.inspector; - + var container = inspector.GenerateContainer("Transform"); var subcontainer = container.GenerateSubcontainer(1); var originalPosInputField = @@ -108,20 +108,20 @@ namespace Ichni.RhythmGame inspector.GenerateVector3InputField(this, subcontainer, "Start Rotation", nameof(originalEulerAngles)); var originalScaleInputField = inspector.GenerateVector3InputField(this, subcontainer, "Start Scale", nameof(originalScale)); - var currentPosText = + var currentPosText = inspector.GenerateParameterText(this, subcontainer, "Current Position", nameof(currentPosition), true); var currentRotText = inspector.GenerateParameterText(this, subcontainer, "Current Rotation", nameof(currentEulerAngles), true); - + if (attachedGameElement is PathNode or Trail) // 如果是PathNode,显示法线方向 { var currentNormalText = inspector.GenerateHintText(this, subcontainer, () => "Normal: " + attachedGameElement.transform.forward); } - - var currentScaleText = + + var currentScaleText = inspector.GenerateParameterText(this, subcontainer, "Current Scale", nameof(currentScale), true); - + originalPosInputField.AddListenerFunction(Refresh); originalRotInputField.AddListenerFunction(Refresh); originalScaleInputField.AddListenerFunction(Refresh); @@ -153,7 +153,7 @@ namespace Ichni.RhythmGame { return; } - + bool willRefresh = false; if (transformSubmodule.scaleDirtyMark) @@ -182,20 +182,20 @@ namespace Ichni.RhythmGame willRefresh = true; transformSubmodule.positionOffset = Vector3.zero; } - - if(willRefresh) + + if (willRefresh) { attachedGameElement.Refresh(); } - + }).AddTo(attachedGameElement); } - + public void UpdateLookAt(LookAt lookAt) // 处理LookAt { Transform target = lookAt.lookAtObject.transform; Transform self = transformSubmodule.attachedGameElement.transform; - + if (transformSubmodule.eulerAnglesOffsetLock && transformSubmodule.eulerAnglesDirtyMark) { Vector3 lookingDirection = (target.position - self.position).normalized; @@ -204,7 +204,7 @@ namespace Ichni.RhythmGame transformSubmodule.eulerAnglesOffset += eulerAnglesOffset; transformSubmodule.currentEulerAngles = transformSubmodule.originalEulerAngles + transformSubmodule.eulerAnglesOffset; - + self.localEulerAngles = transformSubmodule.currentEulerAngles; transformSubmodule.eulerAnglesDirtyMark = false; diff --git a/Assets/StreamingAssets/AutoSave/world for white/AutoSave_0.json b/Assets/StreamingAssets/AutoSave/world for white/AutoSave_0.json index dafb0636..5e88011a 100644 --- a/Assets/StreamingAssets/AutoSave/world for white/AutoSave_0.json +++ b/Assets/StreamingAssets/AutoSave/world for white/AutoSave_0.json @@ -15081,6 +15081,164 @@ "attachedElementGuid" : { "value" : "980a9635-1798-4711-802f-c961c31b8708" } + },{ + "__type" : "Ichni.RhythmGame.Beatmap.Tap_BM,Assembly-CSharp", + "exactJudgeTime" : 24.783, + "elementName" : "New Tap", + "tags" : [ + + ], + "elementGuid" : { + "value" : "dcf09635-2361-48a5-b167-95074ef6eacf" + }, + "attachedElementGuid" : { + "value" : "748350cd-5cdf-4dbc-9c8b-8d9fa1dfc302" + } + },{ + "__type" : "Ichni.RhythmGame.Beatmap.TimeDurationSubmodule_BM,Assembly-CSharp", + "isOverridingDuration" : false, + "startTime" : -32767, + "endTime" : 32767, + "attachedElementGuid" : { + "value" : "dcf09635-2361-48a5-b167-95074ef6eacf" + } + },{ + "__type" : "Ichni.RhythmGame.Beatmap.NoteAudioSubmodule_BM,Assembly-CSharp", + "generalJudgeAudioList" : [ + "DefaultTap" + ], + "perfectAudioList" : [ + + ], + "goodAudioList" : [ + + ], + "badAudioList" : [ + + ], + "missAudioList" : [ + + ], + "holdStartAudioList" : [ + + ], + "attachedElementGuid" : { + "value" : "dcf09635-2361-48a5-b167-95074ef6eacf" + } + },{ + "__type" : "Ichni.RhythmGame.Beatmap.NoteJudgeSubmodule_BM,Assembly-CSharp", + "judgeUnitList" : [ + { + "__type" : "Ichni.RhythmGame.Beatmap.TouchAreaJudgeUnit_BM,Assembly-CSharp", + "areaRadius" : 500 + } + ], + "attachedElementGuid" : { + "value" : "dcf09635-2361-48a5-b167-95074ef6eacf" + } + },{ + "__type" : "Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse.Beatmap.DTMNoteVisual_BM,Assembly-CSharp", + "isHighlighted" : false, + "themeBundleName" : "departure_to_multiverse", + "objectName" : "DTM_NoteVisualTap", + "elementName" : "New Note Visual", + "tags" : [ + + ], + "elementGuid" : { + "value" : "8a97d4fb-ee8b-49bf-b7b8-240831a1f113" + }, + "attachedElementGuid" : { + "value" : "dcf09635-2361-48a5-b167-95074ef6eacf" + } + },{ + "__type" : "Ichni.RhythmGame.Beatmap.TransformSubmodule_BM,Assembly-CSharp", + "originalPosition" : { + "x" : 0, + "y" : 0, + "z" : 0 + }, + "originalEulerAngles" : { + "x" : 0, + "y" : 0, + "z" : 0 + }, + "originalScale" : { + "x" : 1, + "y" : 1, + "z" : 1 + }, + "attachedElementGuid" : { + "value" : "8a97d4fb-ee8b-49bf-b7b8-240831a1f113" + } + },{ + "__type" : "Ichni.RhythmGame.Beatmap.TimeDurationSubmodule_BM,Assembly-CSharp", + "isOverridingDuration" : false, + "startTime" : -32767, + "endTime" : 32767, + "attachedElementGuid" : { + "value" : "8a97d4fb-ee8b-49bf-b7b8-240831a1f113" + } + },{ + "__type" : "Ichni.RhythmGame.Beatmap.ColorSubmodule_BM,Assembly-CSharp", + "originalBaseColor" : { + "r" : 1, + "g" : 1, + "b" : 1, + "a" : 1 + }, + "emissionEnabled" : false, + "originalEmissionColor" : { + "r" : 0, + "g" : 0, + "b" : 0, + "a" : 1 + }, + "originalEmissionIntensity" : 0, + "attachedElementGuid" : { + "value" : "8a97d4fb-ee8b-49bf-b7b8-240831a1f113" + } + },{ + "__type" : "Ichni.RhythmGame.Beatmap.EffectSubmodule_BM,Assembly-CSharp", + "effectCollection" : {"Generate":[ + { + "__type" : "Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse.Beatmap.DTMNoteGenerateExpand_BM,Assembly-CSharp", + "generateTime" : 1, + "effectTime" : 0.2 + } + ],"GeneralJudge":[ + + ],"StartHold":[ + + ],"Holding":[ + + ],"Perfect":[ + { + "__type" : "Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse.Beatmap.DTMNotePerfectBurst_BM,Assembly-CSharp", + "effectTime" : 0 + } + ],"Good":[ + { + "__type" : "Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse.Beatmap.DTMNoteGoodBurst_BM,Assembly-CSharp", + "effectTime" : 0 + } + ],"Bad":[ + { + "__type" : "Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse.Beatmap.DTMNoteBadBurst_BM,Assembly-CSharp", + "effectTime" : 0 + } + ],"Miss":[ + { + "__type" : "Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse.Beatmap.DTMNoteMissTransparent_BM,Assembly-CSharp", + "effectTime" : 0.2 + } + ],"AfterJudge":[ + + ] + }, + "attachedElementGuid" : { + "value" : "8a97d4fb-ee8b-49bf-b7b8-240831a1f113" + } },{ "__type" : "Ichni.RhythmGame.Beatmap.Tap_BM,Assembly-CSharp", "exactJudgeTime" : 27.717, @@ -16102,7 +16260,7 @@ },{ "__type" : "Ichni.RhythmGame.Beatmap.TransformSubmodule_BM,Assembly-CSharp", "originalPosition" : { - "x" : 5, + "x" : 7.990377, "y" : 0, "z" : 0 }, @@ -16734,7 +16892,7 @@ },{ "__type" : "Ichni.RhythmGame.Beatmap.TransformSubmodule_BM,Assembly-CSharp", "originalPosition" : { - "x" : 5, + "x" : 7.99405527, "y" : 0, "z" : 0 }, @@ -35570,7 +35728,7 @@ ], "elementGuid" : { - "value" : "a816cb96-02c9-49cd-ad4f-21338a31ce7e" + "value" : "89360236-9f66-4b73-b581-f55f9ddfdb74" }, "attachedElementGuid" : { "value" : "ff8926ef-e06e-4f85-837f-2b3948290d18" @@ -35593,7 +35751,7 @@ "z" : 1 }, "attachedElementGuid" : { - "value" : "a816cb96-02c9-49cd-ad4f-21338a31ce7e" + "value" : "89360236-9f66-4b73-b581-f55f9ddfdb74" } },{ "__type" : "Ichni.RhythmGame.Beatmap.EffectSubmodule_BM,Assembly-CSharp", @@ -35633,7 +35791,7 @@ ] }, "attachedElementGuid" : { - "value" : "a816cb96-02c9-49cd-ad4f-21338a31ce7e" + "value" : "89360236-9f66-4b73-b581-f55f9ddfdb74" } },{ "__type" : "Ichni.RhythmGame.Beatmap.Tap_BM,Assembly-CSharp", @@ -46018,7 +46176,7 @@ ], "elementGuid" : { - "value" : "529153e3-5021-40af-9d4b-a1b4eea12db6" + "value" : "4d309171-2527-438a-a8a0-ecea6d8d122f" }, "attachedElementGuid" : { "value" : "ff8926ef-e06e-4f85-837f-2b3948290d18" @@ -46041,7 +46199,7 @@ "z" : 1 }, "attachedElementGuid" : { - "value" : "529153e3-5021-40af-9d4b-a1b4eea12db6" + "value" : "4d309171-2527-438a-a8a0-ecea6d8d122f" } },{ "__type" : "Ichni.RhythmGame.Beatmap.EffectSubmodule_BM,Assembly-CSharp", @@ -46111,7 +46269,7 @@ ] }, "attachedElementGuid" : { - "value" : "529153e3-5021-40af-9d4b-a1b4eea12db6" + "value" : "4d309171-2527-438a-a8a0-ecea6d8d122f" } },{ "__type" : "Ichni.RhythmGame.Beatmap.ElementFolder_BM,Assembly-CSharp", @@ -55107,7 +55265,7 @@ ], "elementGuid" : { - "value" : "64db0cc9-e561-48ce-a691-43cb9f54ffa3" + "value" : "8045d2cb-14a0-49d5-88cd-c860ff73b6c6" }, "attachedElementGuid" : { "value" : "ff8926ef-e06e-4f85-837f-2b3948290d18" @@ -55130,7 +55288,7 @@ "z" : 1 }, "attachedElementGuid" : { - "value" : "64db0cc9-e561-48ce-a691-43cb9f54ffa3" + "value" : "8045d2cb-14a0-49d5-88cd-c860ff73b6c6" } },{ "__type" : "Ichni.RhythmGame.Beatmap.EffectSubmodule_BM,Assembly-CSharp", @@ -55170,7 +55328,7 @@ ] }, "attachedElementGuid" : { - "value" : "64db0cc9-e561-48ce-a691-43cb9f54ffa3" + "value" : "8045d2cb-14a0-49d5-88cd-c860ff73b6c6" } },{ "__type" : "Ichni.RhythmGame.Beatmap.ElementFolder_BM,Assembly-CSharp", @@ -77633,164 +77791,6 @@ "attachedElementGuid" : { "value" : "9bccbc37-8ee5-4542-b300-c306d1ea9592" } - },{ - "__type" : "Ichni.RhythmGame.Beatmap.Tap_BM,Assembly-CSharp", - "exactJudgeTime" : 61.9565239, - "elementName" : "New Tap", - "tags" : [ - - ], - "elementGuid" : { - "value" : "7b9da4df-7dd7-46de-ad78-7f3adee46634" - }, - "attachedElementGuid" : { - "value" : "748350cd-5cdf-4dbc-9c8b-8d9fa1dfc302" - } - },{ - "__type" : "Ichni.RhythmGame.Beatmap.TimeDurationSubmodule_BM,Assembly-CSharp", - "isOverridingDuration" : false, - "startTime" : -32767, - "endTime" : 32767, - "attachedElementGuid" : { - "value" : "7b9da4df-7dd7-46de-ad78-7f3adee46634" - } - },{ - "__type" : "Ichni.RhythmGame.Beatmap.NoteJudgeSubmodule_BM,Assembly-CSharp", - "judgeUnitList" : [ - { - "__type" : "Ichni.RhythmGame.Beatmap.TouchAreaJudgeUnit_BM,Assembly-CSharp", - "areaRadius" : 500 - } - ], - "attachedElementGuid" : { - "value" : "7b9da4df-7dd7-46de-ad78-7f3adee46634" - } - },{ - "__type" : "Ichni.RhythmGame.Beatmap.NoteAudioSubmodule_BM,Assembly-CSharp", - "generalJudgeAudioList" : [ - "DefaultTap" - ], - "perfectAudioList" : [ - - ], - "goodAudioList" : [ - - ], - "badAudioList" : [ - - ], - "missAudioList" : [ - - ], - "holdStartAudioList" : [ - - ], - "attachedElementGuid" : { - "value" : "7b9da4df-7dd7-46de-ad78-7f3adee46634" - } - },{ - "__type" : "Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse.Beatmap.DTMNoteVisual_BM,Assembly-CSharp", - "isHighlighted" : false, - "themeBundleName" : "departure_to_multiverse", - "objectName" : "DTM_NoteVisualTap", - "elementName" : "New Note Visual", - "tags" : [ - - ], - "elementGuid" : { - "value" : "77e83827-b9fd-46fe-baa2-f5e059c5370d" - }, - "attachedElementGuid" : { - "value" : "7b9da4df-7dd7-46de-ad78-7f3adee46634" - } - },{ - "__type" : "Ichni.RhythmGame.Beatmap.TransformSubmodule_BM,Assembly-CSharp", - "originalPosition" : { - "x" : 0, - "y" : 0, - "z" : 0 - }, - "originalEulerAngles" : { - "x" : 0, - "y" : 0, - "z" : 0 - }, - "originalScale" : { - "x" : 1, - "y" : 1, - "z" : 1 - }, - "attachedElementGuid" : { - "value" : "77e83827-b9fd-46fe-baa2-f5e059c5370d" - } - },{ - "__type" : "Ichni.RhythmGame.Beatmap.TimeDurationSubmodule_BM,Assembly-CSharp", - "isOverridingDuration" : false, - "startTime" : -32767, - "endTime" : 32767, - "attachedElementGuid" : { - "value" : "77e83827-b9fd-46fe-baa2-f5e059c5370d" - } - },{ - "__type" : "Ichni.RhythmGame.Beatmap.ColorSubmodule_BM,Assembly-CSharp", - "originalBaseColor" : { - "r" : 1, - "g" : 1, - "b" : 1, - "a" : 1 - }, - "emissionEnabled" : false, - "originalEmissionColor" : { - "r" : 0, - "g" : 0, - "b" : 0, - "a" : 1 - }, - "originalEmissionIntensity" : 0, - "attachedElementGuid" : { - "value" : "77e83827-b9fd-46fe-baa2-f5e059c5370d" - } - },{ - "__type" : "Ichni.RhythmGame.Beatmap.EffectSubmodule_BM,Assembly-CSharp", - "effectCollection" : {"Generate":[ - { - "__type" : "Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse.Beatmap.DTMNoteGenerateExpand_BM,Assembly-CSharp", - "generateTime" : 1, - "effectTime" : 0.2 - } - ],"GeneralJudge":[ - - ],"StartHold":[ - - ],"Holding":[ - - ],"Perfect":[ - { - "__type" : "Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse.Beatmap.DTMNotePerfectBurst_BM,Assembly-CSharp", - "effectTime" : 0 - } - ],"Good":[ - { - "__type" : "Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse.Beatmap.DTMNoteGoodBurst_BM,Assembly-CSharp", - "effectTime" : 0 - } - ],"Bad":[ - { - "__type" : "Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse.Beatmap.DTMNoteBadBurst_BM,Assembly-CSharp", - "effectTime" : 0 - } - ],"Miss":[ - { - "__type" : "Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse.Beatmap.DTMNoteMissTransparent_BM,Assembly-CSharp", - "effectTime" : 0.2 - } - ],"AfterJudge":[ - - ] - }, - "attachedElementGuid" : { - "value" : "77e83827-b9fd-46fe-baa2-f5e059c5370d" - } } ], "attachedElementGuid" : {