小小改

Signed-off-by: TRADER_FOER <lhf190@outlook.com>
This commit is contained in:
2026-07-18 11:57:29 +08:00
parent db5dbe246a
commit df4d35942a
5 changed files with 61 additions and 66 deletions

View File

@@ -213,7 +213,7 @@ Material:
- _Dst: 10
- _DstBlend: 0
- _DstBlendAlpha: 0
- _EdgeValue: 0.012226982
- _EdgeValue: 0.83361584
- _EnvironmentReflections: 1
- _FNLfanxiangkaiguan: 0
- _Face: 1
@@ -258,7 +258,7 @@ Material:
- _Mask_scale: 1
- _Metallic: 0
- _OcclusionStrength: 1
- _Opacity: 0.987773
- _Opacity: 0.16638416
- _Parallax: 0.005
- _Pass: 0
- _QueueOffset: 0

Binary file not shown.

View File

@@ -26,7 +26,7 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
#region [] Core Effect Logic
private void UpdateHold()
{
noteVisualHold.SetHoldPercentRange(startPercent, endPercent, true);
noteVisualHold.SetHoldPercentRange(startPercent, endPercent, true, false);
}
private void UpdateTargetPercents(float songTime)

View File

@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using Dreamteck.Splines;
@@ -97,6 +97,8 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
private SplineSample offsetSample = new();
private Transform hitPointTransform;
private Vector3 hitPointBaseLocalScale = Vector3.one;
private Transform judgeEffectTransform;
private Vector3 judgeEffectBaseLocalScale = Vector3.one;
private bool isHoldVisualShown = true;
public float holdThickness => Mathf.Max(0f, transformSubmodule?.currentScale.x ?? 1f);
@@ -113,7 +115,8 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
DisableSplineSizeScale(hold?.trackPositioner);
DisableSplineSizeScale(headPoint);
DisableSplineSizeScale(tailPoint);
ApplyHitPointScaleIsolation();
ApplyHitPointScaleIsolation();
ApplyJudgeEffectScaleIsolation();
}
private void DisableSplineSizeScale(SplinePositioner positioner)
@@ -188,7 +191,7 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
{
if (extraPartList == null || extraPartList.Count == 0 || extraPartList[0] == null) return;
extraPartList[0].SetActive(isVisualShown && isHighlighted);
ApplyHitPointScaleIsolation();
ApplyHitPointScaleIsolation();
}
private void CacheHitPointTransform()
@@ -203,18 +206,38 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
private void ApplyHitPointScaleIsolation()
{
CacheHitPointTransform();
if (hitPointTransform == null) return;
ApplyHoldScaledWorldScale(hitPointTransform, hitPointBaseLocalScale);
}
Vector3 targetWorldScale = hitPointBaseLocalScale * holdThickness;
Transform parent = hitPointTransform.parent;
private void CacheJudgeEffectTransform()
{
if (judgeEffectTransform != null) return;
if (judgeEffect == null) return;
judgeEffectTransform = judgeEffect.transform;
judgeEffectBaseLocalScale = judgeEffectTransform.localScale;
}
private void ApplyJudgeEffectScaleIsolation()
{
CacheJudgeEffectTransform();
ApplyHoldScaledWorldScale(judgeEffectTransform, judgeEffectBaseLocalScale);
}
private void ApplyHoldScaledWorldScale(Transform targetTransform, Vector3 baseLocalScale)
{
if (targetTransform == null) return;
Vector3 targetWorldScale = baseLocalScale * holdThickness;
Transform parent = targetTransform.parent;
if (parent == null)
{
hitPointTransform.localScale = targetWorldScale;
targetTransform.localScale = targetWorldScale;
return;
}
Vector3 parentScale = parent.lossyScale;
hitPointTransform.localScale = new Vector3(
targetTransform.localScale = new Vector3(
DivideScaleAxis(targetWorldScale.x, parentScale.x),
DivideScaleAxis(targetWorldScale.y, parentScale.y),
DivideScaleAxis(targetWorldScale.z, parentScale.z)
@@ -298,19 +321,22 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
SetHoldPercentRange(startPercent, endPercent, true);
}
public void SetHoldPercentRange(float startPercent, float endPercent, bool rebuildImmediately)
public void SetHoldPercentRange(float startPercent, float endPercent, bool rebuildImmediately, bool updateTrackPositioner = true)
{
this.startPercent = startPercent;
this.endPercent = endPercent;
if (rebuildImmediately)
if (updateTrackPositioner && rebuildImmediately)
{
hold.trackPositioner.RebuildImmediate();
}
ApplyHoldPositionOffset(positionOffset);
hold.trackPositioner.SetPercent(startPercent);
ApplyPositionerWorldOffset(hold.trackPositioner, startPercent);
if (updateTrackPositioner)
{
hold.trackPositioner.SetPercent(startPercent);
ApplyPositionerWorldOffset(hold.trackPositioner, startPercent);
}
meshGenerator.SetClipRange(startPercent, endPercent);
ApplyHoldThicknessFromScale();
@@ -322,7 +348,8 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
headPoint.SetPercent(startPercent);
ApplyPositionerWorldOffset(headPoint, startPercent);
ApplyHitPointScaleIsolation();
ApplyHitPointScaleIsolation();
ApplyJudgeEffectScaleIsolation();
if (rebuildImmediately)
{
@@ -347,6 +374,7 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
transform.localScale = Vector3.one;
ApplyHoldThicknessFromScale();
ApplyHitPointScaleIsolation();
ApplyJudgeEffectScaleIsolation();
transformSubmodule.scaleDirtyMark = false;
willRefresh = true;
transformSubmodule.scaleOffset = Vector3.zero;
@@ -395,6 +423,7 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
ApplyHoldPositionOffset(GetCurrentPositionOffset());
ApplyHoldThicknessFromScale();
ApplyHitPointScaleIsolation();
ApplyJudgeEffectScaleIsolation();
}
#endregion
}

View File

@@ -23,7 +23,7 @@ MonoBehaviour:
m_MinSize: {x: 300, y: 112}
m_MaxSize: {x: 24288, y: 16192}
vertical: 1
controlID: 40596
controlID: 42237
draggingID: 0
--- !u!114 &2
MonoBehaviour:
@@ -155,7 +155,7 @@ MonoBehaviour:
m_MinSize: {x: 300, y: 112}
m_MaxSize: {x: 24288, y: 16192}
vertical: 0
controlID: 40597
controlID: 42238
draggingID: 0
--- !u!114 &4
MonoBehaviour:
@@ -181,7 +181,7 @@ MonoBehaviour:
m_MinSize: {x: 200, y: 112}
m_MaxSize: {x: 16192, y: 16192}
vertical: 1
controlID: 40598
controlID: 42239
draggingID: 0
--- !u!114 &5
MonoBehaviour:
@@ -207,7 +207,7 @@ MonoBehaviour:
m_MinSize: {x: 200, y: 56}
m_MaxSize: {x: 16192, y: 8096}
vertical: 0
controlID: 40599
controlID: 42240
draggingID: 0
--- !u!114 &6
MonoBehaviour:
@@ -228,8 +228,8 @@ MonoBehaviour:
y: 0
width: 247
height: 526
m_MinSize: {x: 200, y: 200}
m_MaxSize: {x: 4000, y: 4000}
m_MinSize: {x: 201, y: 226}
m_MaxSize: {x: 4001, y: 4026}
m_ActualView: {fileID: 7}
m_Panes:
- {fileID: 7}
@@ -1362,7 +1362,7 @@ MonoBehaviour:
m_SkipHidden: 0
m_SearchArea: 1
m_Folders:
- Assets/Wwise/API/Runtime/Generated/Common
- Assets
m_Globs: []
m_ProductIds:
m_AnyWithAssetOrigin: 0
@@ -1372,28 +1372,24 @@ MonoBehaviour:
m_ViewMode: 1
m_StartGridSize: 16
m_LastFolders:
- Assets/Wwise/API/Runtime/Generated/Common
- Assets
m_LastFoldersGridSize: 16
m_LastProjectPath: C:\ichniOfficial\ichni_Official
m_LockTracker:
m_IsLocked: 0
m_LastLocalAssetsSearchArea: 1
m_FolderTreeState:
scrollPos: {x: 0, y: 555}
scrollPos: {x: 0, y: 79}
m_SelectedIDs:
- m_Data: 198596
- m_Data: 82468
m_LastClickedID:
m_Data: 198596
m_Data: 82468
m_ExpandedIDs:
- m_Data: 0
- m_Data: 82468
- m_Data: 82470
- m_Data: 82472
- m_Data: 82474
- m_Data: 82988
- m_Data: 198598
- m_Data: 198600
- m_Data: 198602
- m_Data: 1000000000
m_RenameOverlay:
m_UserAcceptedRename: 0
@@ -1493,7 +1489,7 @@ MonoBehaviour:
m_Icon: {fileID: 0}
m_ResourceFile:
m_NewAssetIndexInList: -1
m_ScrollPosition: {x: 0, y: 299}
m_ScrollPosition: {x: 0, y: 0}
m_GridSize: 16
m_SkipHiddenPackages: 0
m_DirectoriesAreaWidth: 209
@@ -1876,38 +1872,8 @@ MonoBehaviour:
m_OverlaysVisible: 1
m_DynamicPanelBehavior: 0
m_WidgetStates:
m_Keys:
- Display Stats -> Frame Stats
- Display Stats -> Bottlenecks
- Display Stats -> Detailed Stats
- Frequently Used -> Rendering Debug
- Frequently Used -> Material Filters
- Frequently Used -> Lighting Debug Modes
- Rendering -> Pixel Validation
- Rendering -> HDR Output
- Rendering -> GPU Resident Drawer Settings
- Rendering -> Occlusion Context Stats
- Rendering -> Instance Culler Stats
- Rendering -> Render Graph
- Material -> Material Validation
- Volume -> Camera
- Volume -> Component
m_Values:
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
m_Keys: []
m_Values: []
m_Settings: {fileID: 0}
--- !u!114 &19
MonoBehaviour:
@@ -2059,7 +2025,7 @@ MonoBehaviour:
m_CachedPref: 165.66669
m_ControlHash: 1412526313
m_PrefName: Preview_InspectorPreview
m_LastInspectedObjectInstanceID: 48546
m_LastInspectedObjectInstanceID: -1
m_LastVerticalScrollValue: 0
m_GlobalObjectId:
m_InspectorMode: 0