hold音符补丁 备份

This commit is contained in:
FloatGaming
2026-03-03 14:07:39 +08:00
parent b8704629a3
commit 9011fa022e
36 changed files with 2721 additions and 256 deletions
-9
View File
@@ -1,9 +0,0 @@
<linker>
<assembly fullname="Unity.Addressables, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null" preserve="all">
<type fullname="UnityEngine.AddressableAssets.Addressables" preserve="all" />
</assembly>
<assembly fullname="Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null" preserve="all">
<type fullname="UnityEngine.ResourceManagement.ResourceProviders.InstanceProvider" preserve="all" />
<type fullname="UnityEngine.ResourceManagement.ResourceProviders.SceneProvider" preserve="all" />
</assembly>
</linker>
@@ -24,7 +24,7 @@ MonoBehaviour:
songDuration: 0
game_enterTimes: 0
time_totalPlayingTime: 0
illustration: {fileID: 21300000, guid: 7c7470553b303ec47a37d165b9abf25b, type: 3}
illustration: {fileID: 21300000, guid: 9732ceca4a8f8ab419584bd34710c04a, type: 3}
backgroudPIC: {fileID: 21300000, guid: 74fa328982601a6408429444ca37ff20, type: 3}
fullscreen_songPicture: {fileID: 21300000, guid: ff00d514e93546640a9bfc0ad90cd1c3, type: 3}
card_profileImage: {fileID: 21300000, guid: e305e86aa87fd224ba9bc6d119714016, type: 3}
@@ -107,6 +107,6 @@ MonoBehaviour:
current_levelProgress: 0
_if_level_is_EASE: 0
max_comboRecord: 0
thisLevel_selectedDifficultyID: 0
thisLevel_selectedDifficultyID: 2
thisLevel_addDateString:
thisLevel_overallDescription: "\u201C\u53F2\u8BD7\u8FDC\u5F81\u201D\u8D5B\u4E8B\u7684\u5F00\u573A\u5E18\u5E55\u88AB\u7F13\u7F13\u62C9\u5F00\uFF0C\u5973\u5B69\u5750\u5728\u8282\u8282\u76F8\u6263\u7684\u9F7F\u8F6E\u8FB9\u4E0A\uFF0C\u800C\u5728\u5979\u7684\u773C\u4E0B\uFF0C\u4FBF\u662F\u65E9\u5DF2\u6253\u5F97\u70ED\u706B\u671D\u5929\u7684\u8D5B\u573A\u3002"
+126
View File
@@ -1329,6 +1329,51 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 623677385}
m_CullTransparentMesh: 1
--- !u!1 &660142306
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 660142308}
- component: {fileID: 660142307}
m_Layer: 0
m_Name: steamCheck
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &660142307
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 660142306}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ed7660afeb4cd124f892e60c28d0cb85, type: 3}
m_Name:
m_EditorClassIdentifier:
welcomeText: {fileID: 1364307997}
--- !u!4 &660142308
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 660142306}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -1.1869494, y: 2.7269337, z: 0.84016913}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &719193750
GameObject:
m_ObjectHideFlags: 0
@@ -2859,6 +2904,7 @@ RectTransform:
- {fileID: 92875213}
- {fileID: 1169972662}
- {fileID: 726773049}
- {fileID: 1364307996}
- {fileID: 308199596}
- {fileID: 719193751}
- {fileID: 1901335929}
@@ -3305,6 +3351,85 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1274601002}
m_CullTransparentMesh: 1
--- !u!1 &1364307995
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1364307996}
- component: {fileID: 1364307998}
- component: {fileID: 1364307997}
m_Layer: 5
m_Name: uid
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1364307996
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1364307995}
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: 1169725030}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 598.74, y: 249}
m_SizeDelta: {x: -1229.79, y: -1050}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1364307997
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1364307995}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, 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_FontData:
m_Font: {fileID: 12800000, guid: bd4be44636ad6c24a9b117a7108a75e9, type: 3}
m_FontSize: 14
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 10
m_MaxSize: 40
m_Alignment: 5
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: uid
--- !u!222 &1364307998
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1364307995}
m_CullTransparentMesh: 1
--- !u!1 &1401636779
GameObject:
m_ObjectHideFlags: 0
@@ -5070,3 +5195,4 @@ SceneRoots:
- {fileID: 1933384116}
- {fileID: 1169725030}
- {fileID: 387952725}
- {fileID: 660142308}
+122 -8
View File
@@ -1599,7 +1599,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
slotIndex: 0
maxHP: 0
currentHP: 1
currentHP: 0
maxMana: 0
currentMana: 0
damageResistance: 0
@@ -14014,6 +14014,7 @@ MonoBehaviour:
type:
judgeConfig: {fileID: 0}
holdWindowMultiplier: 1.3
holdAnimationPrefab: {fileID: 0}
visualSpeedMultiplier: 1
--- !u!61 &359012524
BoxCollider2D:
@@ -14266,7 +14267,7 @@ MonoBehaviour:
flashStartAlpha: 0.5
flashHoldTime: 0.1
flashFadeDuration: 0.2
allySlotIds: f9750000fb750000fa750000f9750000fb750000
allySlotIds: 0000000000000000000000000000000000000000
enemySlotIds: e1790000e2790000000000000000000000000000
recognizedEnemySOs: []
editorSOFolderPath: Assets/Resources/so/ally
@@ -14779,6 +14780,7 @@ MonoBehaviour:
type:
judgeConfig: {fileID: 0}
holdWindowMultiplier: 1.3
holdAnimationPrefab: {fileID: 0}
visualSpeedMultiplier: 1
--- !u!1 &370051274
GameObject:
@@ -15765,6 +15767,8 @@ MonoBehaviour:
spawnOffset: 0.1
static_value_add_to_spawnoffset: 0
globalHitDelay: 0
enableSyncNotePrefab: 0
syncNotePrefab: {fileID: 0}
speedMultiplier: 1
calibrateTolerance: 0.02
calibrateChecks: 2
@@ -15799,6 +15803,7 @@ MonoBehaviour:
type:
judgeConfig: {fileID: 0}
holdWindowMultiplier: 1.3
holdAnimationPrefab: {fileID: 0}
visualSpeedMultiplier: 1
--- !u!61 &397604454
BoxCollider2D:
@@ -15910,7 +15915,8 @@ Transform:
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Children:
- {fileID: 3577031888826609227}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &398515602
@@ -15955,6 +15961,8 @@ MonoBehaviour:
spawnOffset: 0.1
static_value_add_to_spawnoffset: 0.1
globalHitDelay: 0
enableSyncNotePrefab: 1
syncNotePrefab: {fileID: 1500140235766093525, guid: fda9079aef7bc2d4385761036bedce3b, type: 3}
speedMultiplier: 1
calibrateTolerance: 0.02
calibrateChecks: 2
@@ -16417,6 +16425,8 @@ MonoBehaviour:
spawnOffset: 0.1
static_value_add_to_spawnoffset: 0
globalHitDelay: 0
enableSyncNotePrefab: 0
syncNotePrefab: {fileID: 0}
speedMultiplier: 1
calibrateTolerance: 0.02
calibrateChecks: 2
@@ -16497,6 +16507,7 @@ MonoBehaviour:
type:
judgeConfig: {fileID: 0}
holdWindowMultiplier: 1.3
holdAnimationPrefab: {fileID: 0}
visualSpeedMultiplier: 1
--- !u!114 &411632598
MonoBehaviour:
@@ -19486,6 +19497,7 @@ MonoBehaviour:
type:
judgeConfig: {fileID: 0}
holdWindowMultiplier: 1.3
holdAnimationPrefab: {fileID: 0}
visualSpeedMultiplier: 1
--- !u!61 &539645092
BoxCollider2D:
@@ -27573,6 +27585,7 @@ MonoBehaviour:
type:
judgeConfig: {fileID: 0}
holdWindowMultiplier: 1.3
holdAnimationPrefab: {fileID: 0}
visualSpeedMultiplier: 1
--- !u!1 &715955930
GameObject:
@@ -31878,7 +31891,7 @@ MonoBehaviour:
settlementTeamLoader: {fileID: 754636335}
mvp_hero_hd_image: {fileID: 205333303}
moneyToGive_thisLevel: 0
mvp_object: {fileID: 0}
mvp_object: {fileID: 270644561}
mvp_score: {fileID: 1258959120}
mvp_heroIcon: {fileID: 412605241}
mvp_heroName: {fileID: 104530467}
@@ -36969,6 +36982,7 @@ MonoBehaviour:
type:
judgeConfig: {fileID: 0}
holdWindowMultiplier: 1.3
holdAnimationPrefab: {fileID: 0}
visualSpeedMultiplier: 1
--- !u!114 &1090508771
MonoBehaviour:
@@ -36992,6 +37006,8 @@ MonoBehaviour:
spawnOffset: 0.1
static_value_add_to_spawnoffset: 0
globalHitDelay: 0
enableSyncNotePrefab: 0
syncNotePrefab: {fileID: 0}
speedMultiplier: 1
calibrateTolerance: 0.02
calibrateChecks: 2
@@ -37334,6 +37350,7 @@ MonoBehaviour:
type:
judgeConfig: {fileID: 0}
holdWindowMultiplier: 1.3
holdAnimationPrefab: {fileID: 0}
visualSpeedMultiplier: 1
--- !u!61 &1102374851
BoxCollider2D:
@@ -43530,7 +43547,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
slotIndex: 3
maxHP: 0
currentHP: 1
currentHP: 0
maxMana: 0
currentMana: 0
damageResistance: 0
@@ -44695,6 +44712,7 @@ MonoBehaviour:
type:
judgeConfig: {fileID: 0}
holdWindowMultiplier: 1.3
holdAnimationPrefab: {fileID: 0}
visualSpeedMultiplier: 1
--- !u!114 &1370459978
MonoBehaviour:
@@ -44718,6 +44736,8 @@ MonoBehaviour:
spawnOffset: 0.1
static_value_add_to_spawnoffset: 0
globalHitDelay: 0
enableSyncNotePrefab: 0
syncNotePrefab: {fileID: 0}
speedMultiplier: 1
calibrateTolerance: 0.02
calibrateChecks: 2
@@ -47222,6 +47242,8 @@ MonoBehaviour:
spawnOffset: 0.1
static_value_add_to_spawnoffset: 0
globalHitDelay: 0
enableSyncNotePrefab: 0
syncNotePrefab: {fileID: 0}
speedMultiplier: 1
calibrateTolerance: 0.02
calibrateChecks: 2
@@ -47302,6 +47324,7 @@ MonoBehaviour:
type:
judgeConfig: {fileID: 0}
holdWindowMultiplier: 1.3
holdAnimationPrefab: {fileID: 0}
visualSpeedMultiplier: 1
--- !u!114 &1486355887
MonoBehaviour:
@@ -47563,7 +47586,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
slotIndex: 2
maxHP: 0
currentHP: 1
currentHP: 0
maxMana: 0
currentMana: 0
damageResistance: 0
@@ -49072,6 +49095,7 @@ MonoBehaviour:
type:
judgeConfig: {fileID: 0}
holdWindowMultiplier: 1.3
holdAnimationPrefab: {fileID: 0}
visualSpeedMultiplier: 1
--- !u!114 &1572820068
MonoBehaviour:
@@ -49095,6 +49119,8 @@ MonoBehaviour:
spawnOffset: 0.1
static_value_add_to_spawnoffset: 0
globalHitDelay: 0
enableSyncNotePrefab: 0
syncNotePrefab: {fileID: 0}
speedMultiplier: 1
calibrateTolerance: 0.02
calibrateChecks: 2
@@ -49972,7 +49998,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
slotIndex: 1
maxHP: 0
currentHP: 1
currentHP: 0
maxMana: 0
currentMana: 0
damageResistance: 0
@@ -55761,7 +55787,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
slotIndex: 4
maxHP: 0
currentHP: 1
currentHP: 0
maxMana: 0
currentMana: 0
damageResistance: 0
@@ -56951,6 +56977,7 @@ MonoBehaviour:
type:
judgeConfig: {fileID: 0}
holdWindowMultiplier: 1.3
holdAnimationPrefab: {fileID: 0}
visualSpeedMultiplier: 1
--- !u!114 &1938112566
MonoBehaviour:
@@ -56974,6 +57001,8 @@ MonoBehaviour:
spawnOffset: 0.1
static_value_add_to_spawnoffset: 0
globalHitDelay: 0
enableSyncNotePrefab: 0
syncNotePrefab: {fileID: 0}
speedMultiplier: 1
calibrateTolerance: 0.02
calibrateChecks: 2
@@ -59906,6 +59935,7 @@ MonoBehaviour:
type:
judgeConfig: {fileID: 0}
holdWindowMultiplier: 1.3
holdAnimationPrefab: {fileID: 0}
visualSpeedMultiplier: 1
--- !u!114 &2072610046
MonoBehaviour:
@@ -59929,6 +59959,8 @@ MonoBehaviour:
spawnOffset: 0.1
static_value_add_to_spawnoffset: 0
globalHitDelay: 0
enableSyncNotePrefab: 0
syncNotePrefab: {fileID: 0}
speedMultiplier: 1
calibrateTolerance: 0.02
calibrateChecks: 2
@@ -61048,6 +61080,8 @@ MonoBehaviour:
spawnOffset: 0.1
static_value_add_to_spawnoffset: 0
globalHitDelay: 0
enableSyncNotePrefab: 0
syncNotePrefab: {fileID: 0}
speedMultiplier: 1
calibrateTolerance: 0.02
calibrateChecks: 2
@@ -61128,6 +61162,7 @@ MonoBehaviour:
type:
judgeConfig: {fileID: 0}
holdWindowMultiplier: 1.3
holdAnimationPrefab: {fileID: 0}
visualSpeedMultiplier: 1
--- !u!114 &2112693517
MonoBehaviour:
@@ -62344,6 +62379,8 @@ MonoBehaviour:
spawnOffset: 0.1
static_value_add_to_spawnoffset: 0
globalHitDelay: 0
enableSyncNotePrefab: 0
syncNotePrefab: {fileID: 0}
speedMultiplier: 1
calibrateTolerance: 0.02
calibrateChecks: 2
@@ -63371,6 +63408,8 @@ MonoBehaviour:
spawnOffset: 0.1
static_value_add_to_spawnoffset: 0
globalHitDelay: 0
enableSyncNotePrefab: 0
syncNotePrefab: {fileID: 0}
speedMultiplier: 1
calibrateTolerance: 0.02
calibrateChecks: 2
@@ -63451,6 +63490,7 @@ MonoBehaviour:
type:
judgeConfig: {fileID: 0}
holdWindowMultiplier: 1.3
holdAnimationPrefab: {fileID: 0}
visualSpeedMultiplier: 1
--- !u!114 &2411783544221426197
MonoBehaviour:
@@ -63905,6 +63945,11 @@ MonoBehaviour:
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!4 &3577031888826609227 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 1257616023193076660, guid: fda9079aef7bc2d4385761036bedce3b, type: 3}
m_PrefabInstance: {fileID: 6488609446727138723}
m_PrefabAsset: {fileID: 0}
--- !u!114 &3585825429454831658
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -64173,6 +64218,8 @@ MonoBehaviour:
spawnOffset: 0.1
static_value_add_to_spawnoffset: 0
globalHitDelay: 0
enableSyncNotePrefab: 0
syncNotePrefab: {fileID: 0}
speedMultiplier: 1
calibrateTolerance: 0.02
calibrateChecks: 2
@@ -64806,6 +64853,8 @@ MonoBehaviour:
spawnOffset: 0.1
static_value_add_to_spawnoffset: 0
globalHitDelay: 0
enableSyncNotePrefab: 0
syncNotePrefab: {fileID: 0}
speedMultiplier: 1
calibrateTolerance: 0.02
calibrateChecks: 2
@@ -65072,6 +65121,8 @@ MonoBehaviour:
spawnOffset: 0.1
static_value_add_to_spawnoffset: 0
globalHitDelay: 0
enableSyncNotePrefab: 0
syncNotePrefab: {fileID: 0}
speedMultiplier: 1
calibrateTolerance: 0.02
calibrateChecks: 2
@@ -66077,6 +66128,67 @@ RectTransform:
m_AnchoredPosition: {x: 55.959, y: -391.713}
m_SizeDelta: {x: 111.918, y: 111.918}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1001 &6488609446727138723
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 398515601}
m_Modifications:
- target: {fileID: 1257616023193076660, guid: fda9079aef7bc2d4385761036bedce3b, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1257616023193076660, guid: fda9079aef7bc2d4385761036bedce3b, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1257616023193076660, guid: fda9079aef7bc2d4385761036bedce3b, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1257616023193076660, guid: fda9079aef7bc2d4385761036bedce3b, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1257616023193076660, guid: fda9079aef7bc2d4385761036bedce3b, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1257616023193076660, guid: fda9079aef7bc2d4385761036bedce3b, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1257616023193076660, guid: fda9079aef7bc2d4385761036bedce3b, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1257616023193076660, guid: fda9079aef7bc2d4385761036bedce3b, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1257616023193076660, guid: fda9079aef7bc2d4385761036bedce3b, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1257616023193076660, guid: fda9079aef7bc2d4385761036bedce3b, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1500140235766093525, guid: fda9079aef7bc2d4385761036bedce3b, type: 3}
propertyPath: m_Name
value: syncNoteSign
objectReference: {fileID: 0}
- target: {fileID: 1500140235766093525, guid: fda9079aef7bc2d4385761036bedce3b, type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: fda9079aef7bc2d4385761036bedce3b, type: 3}
--- !u!1 &6748722961914189943
GameObject:
m_ObjectHideFlags: 0
@@ -67651,6 +67763,8 @@ MonoBehaviour:
spawnOffset: 0.1
static_value_add_to_spawnoffset: 0
globalHitDelay: 0
enableSyncNotePrefab: 0
syncNotePrefab: {fileID: 0}
speedMultiplier: 1
calibrateTolerance: 0.02
calibrateChecks: 2
+3 -3
View File
@@ -9582,7 +9582,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, y: -269.79}
m_AnchoredPosition: {x: 0, y: -280}
m_SizeDelta: {x: 294.354, y: 96.701}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1479851989
@@ -9767,7 +9767,7 @@ MonoBehaviour:
m_Calls: []
m_FontData:
m_Font: {fileID: 12800000, guid: 8b8373b0af11dca46b89be60dbe469f8, type: 3}
m_FontSize: 16
m_FontSize: 12
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 1
@@ -10000,7 +10000,7 @@ MonoBehaviour:
m_Calls: []
m_FontData:
m_Font: {fileID: 12800000, guid: 8b8373b0af11dca46b89be60dbe469f8, type: 3}
m_FontSize: 16
m_FontSize: 12
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 1
Binary file not shown.

Before

Width:  |  Height:  |  Size: 139 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

@@ -1,10 +1,10 @@
fileFormatVersion: 2
guid: ce87b58f4fda5a44baf043e618efb9ae
guid: 9732ceca4a8f8ab419584bd34710c04a
TextureImporter:
internalIDToNameTable:
- first:
213: 4260502691013242705
second: "\u77E9\u5F62 43_0"
213: -2038485765235370501
second: "\u77E9\u5F62 44_0"
externalObjects: {}
serializedVersion: 13
mipmaps:
@@ -113,7 +113,7 @@ TextureImporter:
serializedVersion: 2
sprites:
- serializedVersion: 2
name: "\u77E9\u5F62 43_0"
name: "\u77E9\u5F62 44_0"
rect:
serializedVersion: 2
x: 0
@@ -128,8 +128,8 @@ TextureImporter:
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 15fa076df98502b30800000000000000
internalID: 4260502691013242705
spriteID: bf594733ff7d5b3e0800000000000000
internalID: -2038485765235370501
vertices: []
indices:
edges: []
@@ -148,7 +148,7 @@ TextureImporter:
spriteCustomMetadata:
entries: []
nameFileIdTable:
"\u77E9\u5F62 43_0": 4260502691013242705
"\u77E9\u5F62 44_0": -2038485765235370501
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

@@ -0,0 +1,208 @@
fileFormatVersion: 2
guid: 43fef83abcb79c14585d8bd891457788
TextureImporter:
internalIDToNameTable:
- first:
213: -9022727688012548700
second: 638da16d2d86a3e3d83bd866354b3da0_0
- first:
213: 5301532198467956497
second: 638da16d2d86a3e3d83bd866354b3da0_1
- first:
213: 2586199416529793481
second: 638da16d2d86a3e3d83bd866354b3da0_2
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites:
- serializedVersion: 2
name: 638da16d2d86a3e3d83bd866354b3da0_0
rect:
serializedVersion: 2
x: 53
y: 6
width: 25
height: 32
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 4a53ee2e8f4d8c280800000000000000
internalID: -9022727688012548700
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: 638da16d2d86a3e3d83bd866354b3da0_1
rect:
serializedVersion: 2
x: 71
y: 6
width: 25
height: 32
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 11f6afe1273d29940800000000000000
internalID: 5301532198467956497
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: 638da16d2d86a3e3d83bd866354b3da0_2
rect:
serializedVersion: 2
x: 89
y: 6
width: 25
height: 32
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 9c1b494caa604e320800000000000000
internalID: 2586199416529793481
vertices: []
indices:
edges: []
weights: []
outline: []
customData:
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable:
638da16d2d86a3e3d83bd866354b3da0_0: -9022727688012548700
638da16d2d86a3e3d83bd866354b3da0_1: 5301532198467956497
638da16d2d86a3e3d83bd866354b3da0_2: 2586199416529793481
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,89 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &1500140235766093525
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1257616023193076660}
- component: {fileID: 4469342922229129182}
m_Layer: 0
m_Name: syncNoteSign
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1257616023193076660
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1500140235766093525}
serializedVersion: 2
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: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!212 &4469342922229129182
SpriteRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1500140235766093525}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 0
m_RayTraceProcedural: 0
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 6
m_Sprite: {fileID: 21300000, guid: 43fef83abcb79c14585d8bd891457788, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 1.64, y: 0.44}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
@@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: c977f2a7bf7c2c246adf066311df6065
TextScriptImporter:
guid: fda9079aef7bc2d4385761036bedce3b
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
@@ -55,6 +55,7 @@ public class delayTapperPrefab : MonoBehaviour
private bool isPaused = false;
private bool isRunning = false;
private float currentElapsed = 0f;
private Dictionary<AudioSource, bool> originalMuteStates = new Dictionary<AudioSource, bool>();
private const string DELAY_PREFS_KEY = "UserGlobalDelaySeconds";
@@ -147,6 +148,55 @@ public class delayTapperPrefab : MonoBehaviour
// 开始加载音频
StartCoroutine(PrepareAudioAndEnableButton());
// 查找场景中所有的 AudioSource 并将非指定的 AudioSource 静音
MuteOtherAudioSources();
}
private void OnDestroy()
{
// 销毁时恢复音频源状态
RestoreAudioSources();
}
private void MuteOtherAudioSources()
{
originalMuteStates.Clear();
// 查找场景中所有的 AudioSource (包括非激活的)
AudioSource[] allAudioSources = FindObjectsOfType<AudioSource>(true);
foreach (var asrc in allAudioSources)
{
// 如果是指定的两个音频源之一,不静音
if (asrc == audioSource || asrc == hit_sfx_as)
{
// 确保它们是取消静音的,以便能听到声音
asrc.mute = false;
continue;
}
// 记录原始静音状态
if (!originalMuteStates.ContainsKey(asrc))
{
originalMuteStates[asrc] = asrc.mute;
asrc.mute = true; // 静音
}
}
Debug.Log($"[delayTapperPrefab] 已静音 {originalMuteStates.Count} 个音频源");
}
private void RestoreAudioSources()
{
int restoredCount = 0;
foreach (var kvp in originalMuteStates)
{
if (kvp.Key != null)
{
kvp.Key.mute = kvp.Value;
restoredCount++;
}
}
originalMuteStates.Clear();
Debug.Log($"[delayTapperPrefab] 已恢复 {restoredCount} 个音频源的静音状态");
}
public void OnResetButtonClicked()
+75 -17
View File
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
@@ -153,6 +153,22 @@ public class AllyCombatant : MonoBehaviour, ICombatant
public AppliedEffect(EffectType t, float a) { effectType = t; amount = a; }
}
private List<(iNumberPrefabController.InstantNumberType type, int val)> _queuedPopups = new List<(iNumberPrefabController.InstantNumberType, int)>();
public void QueueDamagePopup(iNumberPrefabController.InstantNumberType type, int val)
{
_queuedPopups.Add((type, val));
}
public void TriggerQueuedPopups()
{
foreach (var p in _queuedPopups)
{
iNumberPrefabController.SpawnForAllyStatic(slotIndex, p.type, p.val);
}
_queuedPopups.Clear();
}
private void Awake()
{
// ensure GameObject name matches pattern so EffectSystem can find it
@@ -236,10 +252,9 @@ public class AllyCombatant : MonoBehaviour, ICombatant
if (allowOverwriteFromSO)
InitializeStatsFromData();
// Documentation text normalized.
// Documentation text normalized.
isDead = false;
currentHP = Mathf.Max(1, maxHP);
// Initialize status
isDead = (maxHP <= 0);
currentHP = maxHP;
currentMana = 0;
UpdateUIImmediate();
@@ -271,7 +286,8 @@ public class AllyCombatant : MonoBehaviour, ICombatant
if (allowOverwriteFromSO)
{
InitializeStatsFromData();
currentHP = Mathf.Max(1, maxHP);
currentHP = maxHP;
isDead = (maxHP <= 0);
UpdateUIImmediate();
}
@@ -1132,6 +1148,11 @@ public class AllyCombatant : MonoBehaviour, ICombatant
// Public setters that update UI and optionally animate fade bars
public void SetCurrentHP(int hp, bool animateFade = true)
{
SetCurrentHP(hp, animateFade, false);
}
public void SetCurrentHP(int hp, bool animateFade, bool skipPopup)
{
if (isDead) return; // dead characters cannot change HP
int old = currentHP;
@@ -1141,7 +1162,7 @@ public class AllyCombatant : MonoBehaviour, ICombatant
// Trigger HP changed events
int delta = currentHP - old;
if (delta != 0)
if (delta != 0 && !skipPopup)
{
if (iNumberPrefabController.Instance != null)
{
@@ -1180,16 +1201,26 @@ public class AllyCombatant : MonoBehaviour, ICombatant
// Internal HP modifier that does NOT apply heal multipliers (used by ReceiveHeal to avoid double rounding).
private void ModifyHPRaw(int delta, bool animateFade = true)
{
ModifyHPRaw(delta, animateFade, false);
}
private void ModifyHPRaw(int delta, bool animateFade, bool skipPopup)
{
if (isDead && delta > 0)
{
// cannot heal a dead unit
return;
}
SetCurrentHP(currentHP + delta, animateFade);
SetCurrentHP(currentHP + delta, animateFade, skipPopup);
}
public void ModifyHP(int delta, bool animateFade = true)
{
ModifyHP(delta, animateFade, false);
}
public void ModifyHP(int delta, bool animateFade, bool skipPopup)
{
if (isDead && delta > 0)
{
@@ -1207,7 +1238,7 @@ public class AllyCombatant : MonoBehaviour, ICombatant
delta = Mathf.CeilToInt(delta * mult);
}
}
ModifyHPRaw(delta, animateFade);
ModifyHPRaw(delta, animateFade, skipPopup);
}
public void SetMaxHP(int newMax, bool keepCurrentRatio = true)
@@ -1528,12 +1559,12 @@ public class AllyCombatant : MonoBehaviour, ICombatant
fadeManaImage.fillAmount = targetFill;
}
public void ReceiveDamage(float amount, GameObject source)
public void ReceiveDamage(float amount, GameObject source, bool deferPopup = false)
{
ReceiveDamageInternal(amount, source, true);
ReceiveDamageInternal(amount, source, true, deferPopup);
}
private void ReceiveDamageInternal(float amount, GameObject source, bool allowRedirect)
private void ReceiveDamageInternal(float amount, GameObject source, bool allowRedirect, bool deferPopup)
{
if (IsDead) return; // dead characters cannot be hit
if (allowRedirect && TryGetGlobalRedirectTargetForReceiverDamage(this, out var redirector))
@@ -1541,7 +1572,7 @@ public class AllyCombatant : MonoBehaviour, ICombatant
ConsumeGlobalRedirect(redirector);
if (redirector != null && redirector != this)
{
redirector.ReceiveDamageInternal(amount, source, false);
redirector.ReceiveDamageInternal(amount, source, false, deferPopup);
return;
}
// If redirector is self or invalid, consume redirect and continue to take damage normally.
@@ -1555,22 +1586,49 @@ public class AllyCombatant : MonoBehaviour, ICombatant
if (adj != null && adj != this)
{
ConsumeSelfDamageRedirectToAdjacent();
adj.ReceiveDamageInternal(amount, source, false);
adj.ReceiveDamageInternal(amount, source, false, deferPopup);
return;
}
}
int oldHP = currentHP;
float effective = amount * (1f - damageResistance);
int delta = Mathf.CeilToInt(effective);
ModifyHP(-delta, true);
ModifyHP(-delta, true, true);
int actual = oldHP - currentHP;
if (actual != 0)
{
if (deferPopup)
{
QueueDamagePopup(iNumberPrefabController.InstantNumberType.Damage, -actual);
}
else
{
iNumberPrefabController.SpawnForAllyStatic(slotIndex, iNumberPrefabController.InstantNumberType.Damage, -actual);
}
}
}
public void ReceiveHeal(float amount, GameObject source)
public void ReceiveHeal(float amount, GameObject source, bool deferPopup = false)
{
if (IsDead) return; // dead characters cannot be healed
int oldHP = currentHP;
float mult = GetTotalHealReceivedMultiplier();
int delta = Mathf.CeilToInt(amount * mult);
ModifyHPRaw(delta, true);
ModifyHP(delta, true, true);
int actual = currentHP - oldHP;
if (actual != 0)
{
if (deferPopup)
{
QueueDamagePopup(iNumberPrefabController.InstantNumberType.Heal, actual);
}
else
{
iNumberPrefabController.SpawnForAllyStatic(slotIndex, iNumberPrefabController.InstantNumberType.Heal, actual);
}
}
}
public void ApplyBuff(Buff buff, GameObject source)
+2 -2
View File
@@ -52,8 +52,8 @@ public enum EffectType
public interface ICombatant
{
void ReceiveDamage(float amount, GameObject source);
void ReceiveHeal(float amount, GameObject source);
void ReceiveDamage(float amount, GameObject source, bool deferPopup = false);
void ReceiveHeal(float amount, GameObject source, bool deferPopup = false);
void ApplyBuff(Buff buff, GameObject source);
void RemoveBuff(string buffId);
}
+25 -138
View File
@@ -23,7 +23,6 @@ public class EffectSystem : MonoBehaviour
private readonly List<GameObject> _cachedEnemies = new List<GameObject>(8);
private readonly HashSet<int> _awaitingHitFxTargets = new HashSet<int>();
private readonly Dictionary<int, int> _pendingDamagePopupByTargetId = new Dictionary<int, int>(64);
private void Awake()
{
@@ -322,12 +321,6 @@ public class EffectSystem : MonoBehaviour
{
int before = ally.currentScore;
ally.AddScoreDirect(Mathf.CeilToInt(amount));
int delta = ally.currentScore - before;
if (delta != 0)
{
var type = delta > 0 ? iNumberPrefabController.InstantNumberType.IscorePlus : iNumberPrefabController.InstantNumberType.IscoreMinus;
iNumberPrefabController.SpawnForAllyStatic(ally.slotIndex, type, delta);
}
}
else
{
@@ -372,7 +365,7 @@ public class EffectSystem : MonoBehaviour
if (duration <= 0f)
{
enemy.SetMaxHP(enemy.maxHP + delta, false);
if (delta > 0) enemy.currentHP = Mathf.Clamp(enemy.currentHP + delta, 0, enemy.maxHP);
if (delta > 0) enemy.ModifyHP(delta);
iBudeffPrefabController.Instance?.RefreshEnemyNow(enemy);
iBudeffPrefabController.Instance?.RegisterEnemyTimedEffect(enemy, PlayerBudeffIconType.ot_maxHP_up, delta, 0f);
}
@@ -1083,18 +1076,8 @@ public class EffectSystem : MonoBehaviour
var comp = target.GetComponent<ICombatant>();
if (comp != null)
{
int beforeHP = 0;
if (targetAlly != null) beforeHP = targetAlly.currentHP;
else if (targetEnemy != null) beforeHP = targetEnemy.currentHP;
comp.ReceiveDamage(amount, source);
int afterHP = 0;
if (targetAlly != null) afterHP = targetAlly.currentHP;
else if (targetEnemy != null) afterHP = targetEnemy.currentHP;
int actualDelta = beforeHP - afterHP;
if (actualDelta != 0) QueueOrSpawnDamagePopup(target, targetAlly, targetEnemy, actualDelta);
// Use deferPopup: true for synchronization with hit fx
comp.ReceiveDamage(amount, source, true);
// Record stats if source is an ally
if (source != null && target.GetComponent<EnemyCombatant>() != null)
@@ -1124,26 +1107,8 @@ public class EffectSystem : MonoBehaviour
var comp = target.GetComponent<ICombatant>();
if (comp != null)
{
var targetAlly = target.GetComponent<AllyCombatant>();
var targetEnemy = target.GetComponent<EnemyCombatant>();
int beforeHP = 0;
if (targetAlly != null) beforeHP = targetAlly.currentHP;
else if (targetEnemy != null) beforeHP = targetEnemy.currentHP;
comp.ReceiveHeal(amount, source);
int afterHP = 0;
if (targetAlly != null) afterHP = targetAlly.currentHP;
else if (targetEnemy != null) afterHP = targetEnemy.currentHP;
int actualDelta = afterHP - beforeHP;
if (actualDelta != 0)
{
if (targetAlly != null)
iNumberPrefabController.SpawnForAllyStatic(targetAlly.slotIndex, iNumberPrefabController.InstantNumberType.Heal, Mathf.Abs(actualDelta));
else if (targetEnemy != null)
iNumberPrefabController.SpawnForEnemyStatic(iNumberPrefabController.InstantNumberType.Heal, Mathf.Abs(actualDelta));
}
// Use deferPopup: false for heals (usually immediate)
comp.ReceiveHeal(amount, source, false);
// Record stats if source is an ally
if (source != null)
@@ -1208,7 +1173,9 @@ public class EffectSystem : MonoBehaviour
}
}
comp.ReceiveDamage(totalAmount, source);
comp.ReceiveDamage(totalAmount, source, false);
// No need to call TriggerQueuedPopups manually as deferPopup is false
if (source != null && targetEnemy != null)
{
var ally = source.GetComponent<AllyCombatant>();
@@ -1255,18 +1222,8 @@ public class EffectSystem : MonoBehaviour
}
}
int beforeHP = 0;
if (targetAlly != null) beforeHP = targetAlly.currentHP;
else if (targetEnemy != null) beforeHP = targetEnemy.currentHP;
comp.ReceiveDamage(perTick, source);
int afterHP = 0;
if (targetAlly != null) afterHP = targetAlly.currentHP;
else if (targetEnemy != null) afterHP = targetEnemy.currentHP;
int actualDelta = beforeHP - afterHP;
if (actualDelta != 0) QueueOrSpawnDamagePopup(target, targetAlly, targetEnemy, actualDelta);
comp.ReceiveDamage(perTick, source, false);
// No need to call TriggerQueuedPopups manually as deferPopup is false
if (source != null && targetEnemy != null)
{
@@ -1306,20 +1263,8 @@ public class EffectSystem : MonoBehaviour
if (targetAlly != null) beforeHP = targetAlly.currentHP;
else if (targetEnemy != null) beforeHP = targetEnemy.currentHP;
comp.ReceiveHeal(totalAmount, source);
int afterHP = 0;
if (targetAlly != null) afterHP = targetAlly.currentHP;
else if (targetEnemy != null) afterHP = targetEnemy.currentHP;
int actualDelta = afterHP - beforeHP;
if (actualDelta != 0)
{
if (targetAlly != null)
iNumberPrefabController.SpawnForAllyStatic(targetAlly.slotIndex, iNumberPrefabController.InstantNumberType.Heal, Mathf.Abs(actualDelta));
else if (targetEnemy != null)
iNumberPrefabController.SpawnForEnemyStatic(iNumberPrefabController.InstantNumberType.Heal, Mathf.Abs(actualDelta));
}
comp.ReceiveHeal(totalAmount, source, false);
// No need to call TriggerQueuedPopups manually as deferPopup is false
// Record stats
if (source != null)
@@ -1339,24 +1284,8 @@ public class EffectSystem : MonoBehaviour
{
if (target == null) yield break;
int beforeHP = 0;
if (targetAllyHot != null) beforeHP = targetAllyHot.currentHP;
else if (targetEnemyHot != null) beforeHP = targetEnemyHot.currentHP;
comp.ReceiveHeal(perTick, source);
int afterHP = 0;
if (targetAllyHot != null) afterHP = targetAllyHot.currentHP;
else if (targetEnemyHot != null) afterHP = targetEnemyHot.currentHP;
int actualDelta = afterHP - beforeHP;
if (actualDelta != 0)
{
if (targetAllyHot != null)
iNumberPrefabController.SpawnForAllyStatic(targetAllyHot.slotIndex, iNumberPrefabController.InstantNumberType.Heal, Mathf.Abs(actualDelta));
else if (targetEnemyHot != null)
iNumberPrefabController.SpawnForEnemyStatic(iNumberPrefabController.InstantNumberType.Heal, Mathf.Abs(actualDelta));
}
comp.ReceiveHeal(perTick, source, false);
// No need to call TriggerQueuedPopups manually as deferPopup is false
// Record stats
if (source != null)
@@ -1382,47 +1311,19 @@ public class EffectSystem : MonoBehaviour
int id = target.GetInstanceID();
if (_awaitingHitFxTargets.Contains(id)) _awaitingHitFxTargets.Remove(id);
if (!_pendingDamagePopupByTargetId.TryGetValue(id, out var signedValue) || signedValue == 0) return;
_pendingDamagePopupByTargetId.Remove(id);
var ally = target.GetComponent<AllyCombatant>();
if (ally != null)
// Trigger any queued damage/heal popups now that the hit FX is playing
var enemy = target.GetComponent<EnemyCombatant>();
if (enemy != null)
{
iNumberPrefabController.SpawnForAllyStatic(ally.slotIndex, iNumberPrefabController.InstantNumberType.Damage, signedValue);
return;
enemy.TriggerQueuedPopups();
}
if (target.GetComponent<EnemyCombatant>() != null)
else
{
iNumberPrefabController.SpawnForEnemyStatic(iNumberPrefabController.InstantNumberType.Damage, signedValue);
}
}
private void QueueOrSpawnDamagePopup(GameObject target, AllyCombatant targetAlly, EnemyCombatant targetEnemy, int actualDelta)
{
if (target == null) return;
if (actualDelta == 0) return;
int id = target.GetInstanceID();
int signedValue = -Mathf.Abs(actualDelta);
if (_awaitingHitFxTargets.Contains(id))
{
if (_pendingDamagePopupByTargetId.TryGetValue(id, out var prev))
_pendingDamagePopupByTargetId[id] = prev + signedValue;
else
_pendingDamagePopupByTargetId[id] = signedValue;
return;
}
if (targetAlly != null)
{
iNumberPrefabController.SpawnForAllyStatic(targetAlly.slotIndex, iNumberPrefabController.InstantNumberType.Damage, signedValue);
return;
}
if (targetEnemy != null)
{
iNumberPrefabController.SpawnForEnemyStatic(iNumberPrefabController.InstantNumberType.Damage, signedValue);
var ally = target.GetComponent<AllyCombatant>();
if (ally != null)
{
ally.TriggerQueuedPopups();
}
}
}
@@ -1443,14 +1344,7 @@ public class EffectSystem : MonoBehaviour
// immediate add totalAmount to mana if ally present
if (ally != null)
{
int before = ally.currentMana;
ally.ModifyMana(Mathf.CeilToInt(totalAmount), true, true);
int delta = ally.currentMana - before;
if (delta != 0)
{
var type = delta > 0 ? iNumberPrefabController.InstantNumberType.ManaPlus : iNumberPrefabController.InstantNumberType.ManaMinus;
iNumberPrefabController.SpawnForAllyStatic(ally.slotIndex, type, delta);
}
// Record stats
if (totalAmount > 0f && source != null)
{
@@ -1469,14 +1363,7 @@ public class EffectSystem : MonoBehaviour
if (target == null) yield break;
if (ally != null)
{
int before = ally.currentMana;
ally.ModifyMana(Mathf.CeilToInt(perTick), true, true);
int delta = ally.currentMana - before;
if (delta != 0)
{
var type = delta > 0 ? iNumberPrefabController.InstantNumberType.ManaPlus : iNumberPrefabController.InstantNumberType.ManaMinus;
iNumberPrefabController.SpawnForAllyStatic(ally.slotIndex, type, delta);
}
// Record stats
if (perTick > 0f && source != null)
{
@@ -1641,7 +1528,7 @@ public class EffectSystem : MonoBehaviour
{
if (enemy == null) yield break;
enemy.SetMaxHP(Mathf.Max(1, enemy.maxHP + delta), false);
if (delta > 0) enemy.currentHP = Mathf.Clamp(enemy.currentHP + delta, 0, enemy.maxHP);
if (delta > 0) enemy.ModifyHP(delta);
iBudeffPrefabController.Instance?.RefreshEnemyNow(enemy);
yield return new WaitForSeconds(duration);
if (enemy == null) yield break;
+71 -6
View File
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using UnityEngine;
@@ -133,7 +133,7 @@ public class EnemyCombatant : MonoBehaviour, ICombatant
}
}
public void ReceiveDamage(float amount, GameObject source)
public void ReceiveDamage(float amount, GameObject source, bool deferPopup = false)
{
if (isDead) return;
@@ -144,9 +144,23 @@ public class EnemyCombatant : MonoBehaviour, ICombatant
}
_lastAttacker = source;
int before = currentHP;
float effective = amount * (1f - damageResistance);
int delta = Mathf.CeilToInt(effective);
currentHP = Mathf.Clamp(currentHP - delta, 0, maxHP);
ModifyHP(-delta, true);
int actual = before - currentHP;
if (actual != 0)
{
if (deferPopup)
{
QueueDamagePopup(iNumberPrefabController.InstantNumberType.Damage, -actual);
}
else
{
iNumberPrefabController.SpawnForEnemyStatic(iNumberPrefabController.InstantNumberType.Damage, -actual);
}
}
// grant mana based on sourceData setting
if (sourceData != null && sourceData.manaGainOnDamagePercent > 0f && maxMana > 0)
@@ -162,12 +176,25 @@ public class EnemyCombatant : MonoBehaviour, ICombatant
}
}
public void ReceiveHeal(float amount, GameObject source)
public void ReceiveHeal(float amount, GameObject source, bool deferPopup = false)
{
if (isDead) return;
int before = currentHP;
float mult = GetTotalHealReceivedMultiplier();
int delta = Mathf.CeilToInt(amount * mult);
currentHP = Mathf.Clamp(currentHP + delta, 0, maxHP);
ModifyHP(delta, true);
int actual = currentHP - before;
if (actual != 0)
{
if (deferPopup)
{
QueueDamagePopup(iNumberPrefabController.InstantNumberType.Heal, actual);
}
else
{
iNumberPrefabController.SpawnForEnemyStatic(iNumberPrefabController.InstantNumberType.Heal, actual);
}
}
}
public void ApplyBuff(Buff buff, GameObject source)
@@ -255,10 +282,38 @@ public class EnemyCombatant : MonoBehaviour, ICombatant
RecalculateAttackFromBuffs();
}
private List<(iNumberPrefabController.InstantNumberType type, int val)> _queuedPopups = new List<(iNumberPrefabController.InstantNumberType, int)>();
public void QueueDamagePopup(iNumberPrefabController.InstantNumberType type, int val)
{
_queuedPopups.Add((type, val));
}
public void TriggerQueuedPopups()
{
foreach (var p in _queuedPopups)
{
iNumberPrefabController.SpawnForEnemyStatic(p.type, p.val);
}
_queuedPopups.Clear();
}
public void ModifyHP(int delta)
{
ModifyHP(delta, false);
}
public void ModifyHP(int delta, bool skipPopup)
{
if (isDead && delta > 0) return;
int before = currentHP;
currentHP = Mathf.Clamp(currentHP + delta, 0, maxHP);
int actual = currentHP - before;
if (actual != 0 && !skipPopup)
{
var type = actual > 0 ? iNumberPrefabController.InstantNumberType.Heal : iNumberPrefabController.InstantNumberType.Damage;
iNumberPrefabController.SpawnForEnemyStatic(type, actual);
}
if (currentHP <= 0) Die();
}
@@ -267,6 +322,16 @@ public class EnemyCombatant : MonoBehaviour, ICombatant
if (maxMana <= 0) return;
int old = currentMana;
currentMana = Mathf.Clamp(currentMana + delta, 0, maxMana);
int actual = currentMana - old;
if (actual != 0)
{
if (iNumberPrefabController.Instance != null)
{
var type = actual > 0 ? iNumberPrefabController.InstantNumberType.ManaPlus : iNumberPrefabController.InstantNumberType.ManaMinus;
iNumberPrefabController.SpawnForEnemyStatic(type, actual);
}
}
// If mana reached full, trigger primary skill and reset mana
if (currentMana >= maxMana && maxMana > 0 && Application.isPlaying)
@@ -283,7 +348,7 @@ public class EnemyCombatant : MonoBehaviour, ICombatant
}
// reset mana after casting
currentMana = 0;
ModifyMana(-currentMana, false);
}
}
+10 -2
View File
@@ -380,8 +380,8 @@ public class ScoreManager : MonoBehaviour
if (idolScoreSums[trackIndex] > int.MaxValue - 1) idolScoreSums[trackIndex] = int.MaxValue - 1;
int idolActualDelta = idolScoreSums[trackIndex] - idolBefore;
// Only spawn popup if it is skill-related
if (isSkillRelated && idolActualDelta != 0)
// Spawn floating number popup for idol score change
if (idolActualDelta != 0)
{
var type = idolActualDelta > 0 ? iNumberPrefabController.InstantNumberType.IscorePlus : iNumberPrefabController.InstantNumberType.IscoreMinus;
iNumberPrefabController.SpawnForAllyStatic(trackIndex, type, idolActualDelta);
@@ -458,9 +458,17 @@ public class ScoreManager : MonoBehaviour
if (trackIndex < 0 || trackIndex >= idolScoreSums.Length) return;
if (idolDelta == 0) return;
int idolBefore = idolScoreSums[trackIndex];
idolScoreSums[trackIndex] += idolDelta;
if (idolScoreSums[trackIndex] < 0) idolScoreSums[trackIndex] = 0;
if (idolScoreSums[trackIndex] > int.MaxValue - 1) idolScoreSums[trackIndex] = int.MaxValue - 1;
int actual = idolScoreSums[trackIndex] - idolBefore;
if (actual != 0)
{
var type = actual > 0 ? iNumberPrefabController.InstantNumberType.IscorePlus : iNumberPrefabController.InstantNumberType.IscoreMinus;
iNumberPrefabController.SpawnForAllyStatic(trackIndex, type, actual);
}
red_idolScore_sum = idolScoreSums[0];
green_idolScore_sum = idolScoreSums[1];
+3 -9
View File
@@ -1,14 +1,8 @@
using System.Collections;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
/// <summary>
/// Documentation text normalized.
/// Documentation text normalized.
/// Documentation text normalized.
/// Documentation text normalized.
///
/// Documentation text normalized.
/// SkillBuilder.Instance.ExecuteSkill("Fireball", EffectType.DamageSingleEnemy, 120f, Selector.CurrentEnemies, caster, target);
/// Documentation text normalized.
/// </summary>
@@ -1003,7 +997,7 @@ public class SkillBuilder : MonoBehaviour
else
{
enemy.SetMaxHP(Mathf.Max(1, enemy.maxHP + hpDelta), false);
if (hpDelta > 0) enemy.currentHP = Mathf.Clamp(enemy.currentHP + hpDelta, 0, enemy.maxHP);
if (hpDelta > 0) enemy.ModifyHP(hpDelta);
}
int newHP = ally != null ? ally.maxHP : enemy.maxHP;
CheckLimitAndWarnInt(targetName, "最大生命值", oldHP, newHP, hpDelta);
@@ -1595,7 +1589,7 @@ ResolvedGroup:
{
int d = Mathf.CeilToInt(amountTotal);
enemy.SetMaxHP(enemy.maxHP + d, false);
if (d > 0) enemy.currentHP = Mathf.Clamp(enemy.currentHP + d, 0, enemy.maxHP);
if (d > 0) enemy.ModifyHP(d);
iBudeffPrefabController.Instance?.RegisterEnemyTimedEffect(enemy, PlayerBudeffIconType.ot_maxHP_up, d, 0f);
}
break;
+77 -17
View File
@@ -60,6 +60,11 @@ public class HoldNote : BaseNote
[Range(1f, 2f)]
public float holdWindowMultiplier = 1.3f;
[Header("Custom Animation")]
public GameObject holdAnimationPrefab;
private GameObject activeHoldAnimationInstance;
private Coroutine delayedHoldAnimationCoroutine;
public float visualSpeedMultiplier = 1f; // injected from NoteSpawner to adapt windows when visual speed changes
// track when the hold actually started (real-time) so we can compute held fraction
@@ -317,6 +322,58 @@ public class HoldNote : BaseNote
}
}
private void StartHoldEffects()
{
StopHoldEffects(); // cleanup any existing
if (gameObject.activeInHierarchy)
{
delayedHoldAnimationCoroutine = StartCoroutine(DelayedStartHoldEffects());
}
}
private void StopHoldEffects()
{
if (delayedHoldAnimationCoroutine != null)
{
StopCoroutine(delayedHoldAnimationCoroutine);
delayedHoldAnimationCoroutine = null;
}
if (activeHoldAnimationInstance != null)
{
Destroy(activeHoldAnimationInstance);
activeHoldAnimationInstance = null;
}
AnimationController.Global?.StopHoldParticles();
}
private IEnumerator DelayedStartHoldEffects()
{
yield return new WaitForSeconds(0.1f);
// Start standard particles
AnimationController.Global?.StartHoldParticles(noteColor);
// Instantiate custom prefab if assigned
if (holdAnimationPrefab != null)
{
// find spawn position: prefer the track effect position if available from AnimationController
Vector3 spawnPos = transform.position;
var ac = AnimationController.Global;
if (ac != null)
{
// Logic to find slot position (simplified: use ac's position or the note's)
// In AnimationController.PlayDestroyAnimation, it uses redEffect.transform.position etc.
// We don't have direct access to those private fields, but we can assume
// the note is at the judge line when this starts.
}
activeHoldAnimationInstance = Instantiate(holdAnimationPrefab, spawnPos, Quaternion.identity);
// Optionally parent to the note or track
// activeHoldAnimationInstance.transform.SetParent(this.transform, false);
}
}
private IEnumerator DelayedDisableAnimation(GameObject animationObject, float delay)
{
// No-op: we used to disable the shared AnimationController here which stopped coroutines.
@@ -440,7 +497,7 @@ public class HoldNote : BaseNote
if (!isHoldActive && jm != null && jm.IsStartJudged(noteID) && !jm.HasNoteReleased(noteID) && keyHeld)
{
isHoldActive = true;
AnimationController.Global?.StartHoldParticles(noteColor);
StartHoldEffects();
if (debugEnabled) Debug.Log($"[HoldNote] Start particles started for {noteID} color={noteColor} at time={now:F3}");
}
@@ -474,7 +531,7 @@ public class HoldNote : BaseNote
if (isHoldActive && keyUp)
{
isHoldActive = false;
AnimationController.Global?.StopHoldParticles();
StopHoldEffects();
if (debugEnabled) Debug.Log($"[HoldNote] KeyUp {keyToPress} detected. NoteID: {noteID}, Segment: {segment}, Type: {type}");
if (!hasReleased)
@@ -649,7 +706,7 @@ public class HoldNote : BaseNote
JudgeManager.Instance.RegisterStartJudged(noteID, true);
isHoldActive = true;
PlayHitAnimation();
AnimationController.Global?.StartHoldParticles(noteColor);
StartHoldEffects();
holdStartTime = pressTime;
HoldNoteJudgePool.RegisterStart(noteID, pressTime, hitTime, scheduledEndTime, noteColor, trackIndex, (object)noteData);
@@ -695,17 +752,17 @@ public class HoldNote : BaseNote
// Autoplay must ignore physical input to guarantee Perfect at scheduledEndTime.
if (!GameConfig.autoPlayEnabled && Input.GetKey(keyToPress) && JudgeManager.Instance.IsStartJudged(noteID) && !isJudged)
{
if (JudgeManager.IsDebugEnabled) Debug.Log($"[HoldNote] End entered while key still held: {noteColor}, calculating result immediately");
if (JudgeManager.IsDebugEnabled) Debug.Log($"[HoldNote] End entered while key still held: {noteColor}, forcing Perfect");
// Record release time as current time (player is still holding)
releaseTime = Time.time;
hasReleased = true;
JudgeManager.Instance?.RegisterNoteReleased(noteID, true);
// Evaluate and judge the hold end
EvaluateHoldEnd(releaseTime, false);
// Evaluate and judge the hold end - force Perfect since we reached the end while holding
EvaluateHoldEnd(releaseTime, false, true);
isJudged = true;
// Terminate input - mark key as released
isHoldActive = false;
AnimationController.Global?.StopHoldParticles();
StopHoldEffects();
return;
}
@@ -875,7 +932,7 @@ public class HoldNote : BaseNote
JudgeManager.Instance.RegisterStartJudged(noteID, true);
isHoldActive = true;
PlayHitAnimation();
AnimationController.Global?.StartHoldParticles(noteColor);
StartHoldEffects();
// record when the hold started so we can compute held fraction later
holdStartTime = pressTime;
@@ -891,7 +948,7 @@ public class HoldNote : BaseNote
JudgeManager.Instance.RegisterStartJudged(noteID, true);
isHoldActive = true;
PlayHitAnimation();
AnimationController.Global?.StartHoldParticles(noteColor);
StartHoldEffects();
holdStartTime = pressTime;
@@ -905,7 +962,7 @@ public class HoldNote : BaseNote
JudgeManager.Instance.RegisterStartJudged(noteID, true);
isHoldActive = true;
PlayHitAnimation();
AnimationController.Global?.StartHoldParticles(noteColor);
StartHoldEffects();
holdStartTime = pressTime;
@@ -986,7 +1043,7 @@ public class HoldNote : BaseNote
}
// central evaluation for hold end, given an actual releaseTime (real-time) or forceMiss
private void EvaluateHoldEnd(float actualReleaseTime, bool forceMiss)
private void EvaluateHoldEnd(float actualReleaseTime, bool forceMiss, bool forcePerfect = false)
{
if (isJudged) return; // already evaluated
@@ -1001,7 +1058,7 @@ public class HoldNote : BaseNote
hasReleased = true;
JudgeManager.Instance.RegisterNoteReleased(noteID, true);
if (JudgeManager.IsDebugEnabled) Debug.Log($"[HoldNote] EvaluateHoldEnd: noteID={noteID} releaseTime={releaseTime:F3} scheduledEnd={scheduledEndTime:F3} forceMiss={forceMiss}");
if (JudgeManager.IsDebugEnabled) Debug.Log($"[HoldNote] EvaluateHoldEnd: noteID={noteID} releaseTime={releaseTime:F3} scheduledEnd={scheduledEndTime:F3} forceMiss={forceMiss} forcePerfect={forcePerfect}");
string result;
@@ -1028,13 +1085,13 @@ public class HoldNote : BaseNote
float playerHeld = Mathf.Clamp(releaseTime - info.pressTime, 0f, info.length);
float frac = info.length <= 0f ? 0f : (playerHeld / info.length);
if (frac > 0.8f)
if (forcePerfect || frac > 0.7f)
{
result = "Perfect";
ScoreManager.Instance.countPerfect += 1;
if (trackIndex >= 0 && trackIndex < 5) ScoreManager.Instance.trackPerfectCounts[trackIndex]++;
}
else if (frac > 0.5f)
else if (frac > 0.4f)
{
result = "Great";
ScoreManager.Instance.countGreat += 1;
@@ -1069,13 +1126,13 @@ public class HoldNote : BaseNote
float held = Mathf.Clamp(actualReleaseTime - hitTime, 0f, holdRequired);
float frac = holdRequired <= 0f ? 0f : (held / holdRequired);
if (frac > 0.8f)
if (forcePerfect || frac > 0.7f)
{
result = "Perfect";
ScoreManager.Instance.countPerfect += 1;
if (trackIndex >= 0 && trackIndex < 5) ScoreManager.Instance.trackPerfectCounts[trackIndex]++;
}
else if (frac > 0.5f)
else if (frac > 0.4f)
{
result = "Great";
ScoreManager.Instance.countGreat += 1;
@@ -1193,7 +1250,7 @@ public class HoldNote : BaseNote
if (JudgeManager.IsDebugEnabled) Debug.Log($"[HoldNote] Hold end NotifyNoteHit called: TrackIndex={TrackIndex} trackIndexField={trackIndex} result={result} triggeredHold={triggeredHold} triggeredTap={triggeredTap}");
}
AnimationController.Global?.StopHoldParticles();
StopHoldEffects();
// Release the track lock immediately after end evaluation so the next hold can start on time
ReleaseTrackJudgeLockSafe();
@@ -1315,6 +1372,9 @@ public class HoldNote : BaseNote
// Restore materials before returning to pool/reusing
RestoreOriginalMaterials();
// Stop any active hold animations or delayed starts
StopHoldEffects();
hasReleased = false;
segment = NoteSegment.None;
keyToPress = KeyCode.None;
@@ -12,7 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 088ed1ed6b6731f43ad3166781e3e931, type: 3}
m_Name: NoteJudgeConfig
m_EditorClassIdentifier:
perfectRange: 0.15
greatRange: 0.2
goodRange: 0.25
missRange: 0.3
perfectRange: 0.05
greatRange: 0.1
goodRange: 0.15
missRange: 0.2
+3
View File
@@ -55,6 +55,9 @@ public class Note : BaseNote
private static int ComputePmDeltaFromJudge(string judgeResult, AllyCombatant ally)
{
// If current character slot has no ally or is dead, then this corresponding track will also not get idol score
if (ally == null || ally.IsDead) return 0;
int baseScore = 0;
var bmm = ally != null ? ally.bmm : null;
@@ -27,6 +27,12 @@ public class NoteSpawner : MonoBehaviour
[Tooltip("Global additional realtime offset (seconds) added to hit times for all notes. Use to test input latency or adjust judgement timing. Default 0. Can be negative to make notes arrive earlier.")]
public float globalHitDelay = 0f;
[Header("Sync Note Detection")]
[Tooltip("Whether to spawn a special prefab for notes that appear within 0.05s of each other.")]
public bool enableSyncNotePrefab = false;
[Tooltip("The prefab to instantiate under the note when a sync is detected.")]
public GameObject syncNotePrefab;
// Documentation text normalized.
[Tooltip("Multiplier applied to visual fall speed. Changing this will automatically adjust spawn timing so notes still arrive at their original beat times.")]
[Range(0.5f, 2f)]
@@ -131,6 +137,10 @@ public class NoteSpawner : MonoBehaviour
spawnOffset = savedDelay + static_value_add_to_spawnoffset;
if (JudgeManager.IsDebugEnabled) Debug.Log($"[NoteSpawner] Applied spawnOffset={spawnOffset} (Saved={savedDelay} + Static={static_value_add_to_spawnoffset})");
// 读取 PlayerPrefs 中的同步音符开关状态
enableSyncNotePrefab = PlayerPrefs.GetInt("EnableSyncNotePrefab", 1) == 1;
if (JudgeManager.IsDebugEnabled) Debug.Log($"[NoteSpawner] Applied enableSyncNotePrefab={enableSyncNotePrefab}");
// restore animations active state on Start
if (animations != null)
{
@@ -254,6 +264,27 @@ public class NoteSpawner : MonoBehaviour
NoteData note = beatmap.notes[i];
// Check if this is a sync note (within 0.05s of any other note)
bool isSync = false;
if (enableSyncNotePrefab)
{
// Check previous notes (optimized assuming sorted beatmap)
for (int j = i - 1; j >= 0; j--)
{
if (Mathf.Abs(note.time - beatmap.notes[j].time) <= 0.05f) { isSync = true; break; }
if (note.time - beatmap.notes[j].time > 0.05f) break;
}
if (!isSync)
{
// Check next notes (optimized assuming sorted beatmap)
for (int j = i + 1; j < beatmap.notes.Length; j++)
{
if (Mathf.Abs(note.time - beatmap.notes[j].time) <= 0.05f) { isSync = true; break; }
if (beatmap.notes[j].time - note.time > 0.05f) break;
}
}
}
float travelTime = GetLaneTravelTimeSeconds(laneTravelTimes, note.trackIndex);
float spawnTime = note.time - travelTime;
float delay = spawnTime - (Time.time - startTime) + spawnOffset;
@@ -272,12 +303,12 @@ public class NoteSpawner : MonoBehaviour
if (note.type == "hold")
{
// create the hold note once and record its id mapping
int hid = SpawnHoldNote(note, sm, travelTime, noteSpeed, segmentInterval);
int hid = SpawnHoldNote(note, sm, travelTime, noteSpeed, segmentInterval, isSync);
noteIndexToHoldId[i] = hid;
}
else
{
SpawnNote(note, sm, travelTime, noteSpeed);
SpawnNote(note, sm, travelTime, noteSpeed, isSync);
}
}
@@ -299,7 +330,7 @@ public class NoteSpawner : MonoBehaviour
return key;
}
public void SpawnNote(NoteData noteData, float sm, float travelTime, float noteSpeed)
public void SpawnNote(NoteData noteData, float sm, float travelTime, float noteSpeed, bool isSync = false)
{
if (noteData.trackIndex < 0 || noteData.trackIndex >= spawnPoints.Length)
{
@@ -321,6 +352,23 @@ public class NoteSpawner : MonoBehaviour
return;
}
if (enableSyncNotePrefab && syncNotePrefab != null)
{
// Clean up any existing sync prefab from previous use in pool
foreach (Transform child in note.transform)
{
if (child.name.StartsWith(syncNotePrefab.name))
{
Destroy(child.gameObject);
}
}
if (isSync)
{
Instantiate(syncNotePrefab, note.transform);
}
}
Transform spawnPoint = spawnPoints[noteData.trackIndex];
// Calculate hit time (realtime when note should be judged)
@@ -354,7 +402,7 @@ public class NoteSpawner : MonoBehaviour
}
// Modified: return generated holdNoteId so callers can map notes to ids
public int SpawnHoldNote(NoteData noteData, float sm, float travelTime, float noteSpeed, float segmentInterval)
public int SpawnHoldNote(NoteData noteData, float sm, float travelTime, float noteSpeed, float segmentInterval, bool isSync = false)
{
if (noteData.trackIndex < 0 || noteData.trackIndex >= spawnPoints.Length)
{
@@ -398,6 +446,23 @@ public class NoteSpawner : MonoBehaviour
return -1;
}
if (enableSyncNotePrefab && syncNotePrefab != null)
{
// Clean up any existing sync prefab from previous use in pool
foreach (Transform child in startObj.transform)
{
if (child.name.StartsWith(syncNotePrefab.name))
{
Destroy(child.gameObject);
}
}
if (isSync)
{
Instantiate(syncNotePrefab, startObj.transform);
}
}
// Hold segments use absolute positioning; spawn at the lane origin.
startObj.transform.position = spawnPoint.position;
startObj.transform.rotation = Quaternion.identity;
@@ -1228,11 +1228,11 @@ public class settlementController : MonoBehaviour
if (sm != null)
{
scores[0] = sm.red_pmScore_sum;
scores[1] = sm.green_pmScore_sum;
scores[2] = sm.yellow_pmScore_sum;
scores[3] = sm.purple_pmScore_sum;
scores[4] = sm.blue_pmScore_sum;
scores[0] = sm.red_idolScore_sum;
scores[1] = sm.green_idolScore_sum;
scores[2] = sm.yellow_idolScore_sum;
scores[3] = sm.purple_idolScore_sum;
scores[4] = sm.blue_idolScore_sum;
}
else
{
@@ -1262,9 +1262,13 @@ public class settlementController : MonoBehaviour
if (topIndex < 0 || max <= 0)
{
Debug.Log("[SettlementController] No top scorer found or scores are all zero");
// hide image
mvp_hero_hd_image.sprite = null;
mvp_hero_hd_image.color = new Color(mvp_hero_hd_image.color.r, mvp_hero_hd_image.color.g, mvp_hero_hd_image.color.b, 0f);
// hide image and mvp object
if (mvp_object != null) mvp_object.SetActive(false);
if (mvp_hero_hd_image != null)
{
mvp_hero_hd_image.sprite = null;
mvp_hero_hd_image.color = new Color(mvp_hero_hd_image.color.r, mvp_hero_hd_image.color.g, mvp_hero_hd_image.color.b, 0f);
}
return;
}
@@ -1297,6 +1301,8 @@ public class settlementController : MonoBehaviour
}
// final fallback: try direct Resources lookup by scanning all and picking first non-null for slot
// REMOVED: This fallback causes a default character to appear when no hero is selected.
/*
if (heroSO == null)
{
if (_cachedAllyHeroSOs == null || _cachedAllyHeroSOs.Length == 0)
@@ -1309,6 +1315,7 @@ public class settlementController : MonoBehaviour
heroSO = _cachedAllyHeroSOs[0] as AllyHero_SO;
}
}
*/
if (heroSO != null)
{
@@ -1,4 +1,4 @@
using UnityEngine;
using UnityEngine;
using Spine;
using Spine.Unity;
using SmoothShakeFree;
+47
View File
@@ -0,0 +1,47 @@
using UnityEngine;
using UnityEngine.UI;
using TMPro;
public class gameSettings : MonoBehaviour
{
public Toggle multiNoteNoticeToggle;
public Text multiNoteNoticeText; // Using Legacy Text object
private const string PrefKey_EnableSyncNotePrefab = "EnableSyncNotePrefab";
void Start()
{
if (multiNoteNoticeToggle != null)
{
// Initialize toggle state from PlayerPrefs, default to 1 (true)
bool isEnabled = PlayerPrefs.GetInt(PrefKey_EnableSyncNotePrefab, 1) == 1;
multiNoteNoticeToggle.isOn = isEnabled;
// Initialize text based on current toggle value
UpdateText(isEnabled);
// Add listener to save value and update text when changed
multiNoteNoticeToggle.onValueChanged.AddListener((isOn) =>
{
PlayerPrefs.SetInt(PrefKey_EnableSyncNotePrefab, isOn ? 1 : 0);
PlayerPrefs.Save();
UpdateText(isOn);
});
}
}
private void UpdateText(bool isOn)
{
if (multiNoteNoticeText != null)
{
multiNoteNoticeText.text = isOn ? "已启用多押指示器" : "已禁用多押指示器";
}
// Also update the Toggle's own label text if it exists (usually a child object)
Text toggleLabel = multiNoteNoticeToggle.GetComponentInChildren<Text>();
if (toggleLabel != null)
{
toggleLabel.text = isOn ? "启用" : "禁用";
}
}
}
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 689de294fb913594ab2f3185279f7093
File diff suppressed because it is too large Load Diff
@@ -158,6 +158,241 @@ MonoBehaviour:
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: "\u53D1\u884C\u65E5\u671F\uFF1A2026-66-66"
--- !u!1 &1468656698895808366
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5888644841479767732}
- component: {fileID: 2960304788727126542}
- component: {fileID: 5368810222697972913}
m_Layer: 5
m_Name: detail
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5888644841479767732
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1468656698895808366}
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: 1253227257531515220}
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, y: 0}
m_SizeDelta: {x: 323.3198, y: 55.2261}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &2960304788727126542
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1468656698895808366}
m_CullTransparentMesh: 1
--- !u!114 &5368810222697972913
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1468656698895808366}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, 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_FontData:
m_Font: {fileID: 12800000, guid: bd4be44636ad6c24a9b117a7108a75e9, type: 3}
m_FontSize: 14
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 10
m_MaxSize: 40
m_Alignment: 3
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: "\u6682\u672A\u627E\u5230\u7B80\u4ECB\u4FE1\u606F\u3002"
--- !u!1 &2192019250287701500
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1253227257531515220}
- component: {fileID: 5100036912783500580}
- component: {fileID: 4385572967205360590}
m_Layer: 5
m_Name: detail
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!224 &1253227257531515220
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2192019250287701500}
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: 1099650434260541262}
- {fileID: 5888644841479767732}
m_Father: {fileID: 5010078828579475845}
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, y: 73.32225}
m_SizeDelta: {x: 355.2, y: 36.8645}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5100036912783500580
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2192019250287701500}
m_CullTransparentMesh: 1
--- !u!114 &4385572967205360590
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2192019250287701500}
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: 21300000, guid: 7f3b1220317607e44bbb8f0e1998044a, type: 3}
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: 2
--- !u!1 &2238554210802163870
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1099650434260541262}
- component: {fileID: 9202529557900048664}
- component: {fileID: 3423794397929174540}
m_Layer: 5
m_Name: title
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!224 &1099650434260541262
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2238554210802163870}
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: 1253227257531515220}
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: -82.58, y: 22.1}
m_SizeDelta: {x: 160, y: 30}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &9202529557900048664
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2238554210802163870}
m_CullTransparentMesh: 1
--- !u!114 &3423794397929174540
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2238554210802163870}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, 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_FontData:
m_Font: {fileID: 12800000, guid: dfa10de3e2846524089b5073175cd151, type: 3}
m_FontSize: 18
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 1
m_MaxSize: 40
m_Alignment: 0
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: "\u5173\u4E8E\u6B64DLC\u7684\u7B80\u4ECB\uFF1A"
--- !u!1 &2704985786795051223
GameObject:
m_ObjectHideFlags: 0
@@ -272,6 +507,8 @@ RectTransform:
- {fileID: 333634122881333044}
- {fileID: 3306384613169609027}
- {fileID: 4819405071236471537}
- {fileID: 2939871135262439914}
- {fileID: 1253227257531515220}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
@@ -378,8 +615,10 @@ MonoBehaviour:
dlcID: {fileID: 115205934777297662}
dlcProducer: {fileID: 2931296379136689410}
dlcPubliushDate: {fileID: 3713972282091736206}
dlcSongsAmount: {fileID: 6445397485245527728}
dlc_nowSelectedImageBoarder: {fileID: 2824183749825073581}
dlcDescription: {fileID: 0}
dlcDetailParent: {fileID: 2192019250287701500}
dlcDescription: {fileID: 5368810222697972913}
dlcDataSO: {fileID: 0}
dlcContent:
- {fileID: 0}
@@ -397,6 +636,85 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 76ce63b908338a84c8a3aa071b90c46b, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &5437805816395700444
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2939871135262439914}
- component: {fileID: 5911944271956214811}
- component: {fileID: 6445397485245527728}
m_Layer: 5
m_Name: songAmount
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2939871135262439914
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5437805816395700444}
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: 5010078828579475845}
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: 156.45, y: 33.1}
m_SizeDelta: {x: 36.6942, y: 30}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5911944271956214811
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5437805816395700444}
m_CullTransparentMesh: 1
--- !u!114 &6445397485245527728
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5437805816395700444}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, 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_FontData:
m_Font: {fileID: 12800000, guid: c1479b56d8329614e94637b5c5bafc87, type: 3}
m_FontSize: 18
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 1
m_MaxSize: 40
m_Alignment: 5
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: 202
--- !u!1 &6759998237426852132
GameObject:
m_ObjectHideFlags: 0
+60 -3
View File
@@ -1,10 +1,11 @@
using UnityEngine;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.EventSystems;
using System.Collections.Generic;
using System.Collections;
using System.IO;
public class dlcButton : MonoBehaviour
public class dlcButton : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler
{
[Header("Inspector")]
public Image dlc_profileImgae;
@@ -12,8 +13,10 @@ public class dlcButton : MonoBehaviour
public Text dlcID;
public Text dlcProducer;
public Text dlcPubliushDate;
public Text dlcSongsAmount;
public Image dlc_nowSelectedImageBoarder;
[Header("Inspector")]
public GameObject dlcDetailParent;
public Text dlcDescription;
[Header("Inspector")]
@@ -42,8 +45,57 @@ public class dlcButton : MonoBehaviour
private static int selectedIndex = -1;
private const string PlayerPrefsKey = "dlc_selected_index";
// instance index in registration order
private int instanceIndex = -1;
private Coroutine hoverCoroutine;
public void OnPointerEnter(PointerEventData eventData)
{
if (hoverCoroutine != null) StopCoroutine(hoverCoroutine);
hoverCoroutine = StartCoroutine(HandleHover());
}
public void OnPointerExit(PointerEventData eventData)
{
if (hoverCoroutine != null) StopCoroutine(hoverCoroutine);
if (dlcDetailParent != null) dlcDetailParent.SetActive(false);
}
private IEnumerator HandleHover()
{
yield return new WaitForSecondsRealtime(0.5f);
// 尝试从场景中查找 dlcDetailParent (如果自身引用的为空)
if (dlcDetailParent == null)
{
var details = GameObject.FindObjectsByType<dlcButton>(FindObjectsInactive.Include, FindObjectsSortMode.None);
foreach (var b in details)
{
if (b != this && b.dlcDetailParent != null)
{
dlcDetailParent = b.dlcDetailParent;
dlcDescription = b.dlcDescription;
break;
}
}
}
if (dlcDetailParent != null)
{
dlcDetailParent.SetActive(true);
// 更新简介信息
if (dlcDescription != null)
{
if (dlcDataSO != null)
{
dlcDescription.text = string.IsNullOrEmpty(dlcDataSO.dlcDescription) ? "暂无DLC简介信息。" : dlcDataSO.dlcDescription;
}
else
{
dlcDescription.text = "暂无DLC简介信息。";
}
}
}
}
void Awake()
{
@@ -374,6 +426,11 @@ public class dlcButton : MonoBehaviour
if (s != null) dlcContent.Add(s);
}
if (dlcSongsAmount != null)
{
dlcSongsAmount.text = dlcContent.Count.ToString();
}
if (dlcName != null) dlcName.text = so.dlcName ?? dlcName.text;
if (dlcProducer != null) dlcProducer.text = so.dlcProducer ?? dlcProducer.text;
if (dlcDescription != null) dlcDescription.text = so.dlcDescription ?? dlcDescription.text;
+10 -1
View File
@@ -487,7 +487,16 @@ public class selected_songInfo : MonoBehaviour
private void UpdateMusicPlaybackProgress()
{
if (preListenAS == null || preListenAS.clip == null || !preListenAS.isPlaying) return;
if (preListenAS == null || preListenAS.clip == null) return;
// 检查是否自然播放结束
if (!preListenAS.isPlaying && preListenAS.time >= preListenAS.clip.length * 0.99f)
{
StopPlayback();
return;
}
if (!preListenAS.isPlaying) return;
// 如果用户没在拖动,则自动更新进度条
if (!Input.GetMouseButton(0))
+59
View File
@@ -0,0 +1,59 @@
using UnityEngine;
using UnityEngine.UI;
using Steamworks;
public class steamCheck : MonoBehaviour
{
[Header("UI")]
public Text welcomeText;
private const uint APP_ID = 2191270;
void Awake()
{
#if !UNITY_EDITOR
// 如果不是从Steam启动,Steam会自动拉起并重新启动游戏
if (SteamAPI.RestartAppIfNecessary(new AppId_t(APP_ID)))
{
Application.Quit();
return;
}
#endif
// 初始化Steam
if (!SteamAPI.Init())
{
Debug.LogError("SteamAPI 初始化失败");
Application.Quit();
return;
}
SetWelcomeText();
}
void SetWelcomeText()
{
if (welcomeText == null)
return;
if (!SteamUser.BLoggedOn())
return;
string playerName = SteamFriends.GetPersonaName();
CSteamID steamID = SteamUser.GetSteamID();
welcomeText.text = $"欢迎,专员测试1用户 {playerName} ({steamID.m_SteamID})";
}
void Update()
{
if (SteamAPI.IsSteamRunning())
SteamAPI.RunCallbacks();
}
void OnApplicationQuit()
{
if (SteamAPI.IsSteamRunning())
SteamAPI.Shutdown();
}
}
+2
View File
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: ed7660afeb4cd124f892e60c28d0cb85
+10 -4
View File
@@ -792,7 +792,13 @@ PlayerSettings:
XboxOneOverrideIdentityName:
XboxOneOverrideIdentityPublisher:
vrEditorSettings: {}
cloudServicesEnabled: {}
cloudServicesEnabled:
Build: 0
Game Performance: 0
Legacy Analytics: 0
Purchasing: 0
UDP: 0
Unity Ads: 0
luminIcon:
m_Name:
m_ModelFolderPath:
@@ -814,11 +820,11 @@ PlayerSettings:
captureStartupLogs: {}
activeInputHandler: 2
windowsGamepadBackendHint: 0
cloudProjectId:
cloudProjectId: f4d8647c-b28f-47c8-a7b8-c44b98409be0
framebufferDepthMemorylessMode: 0
qualitySettingsNames: []
projectName:
organizationId:
projectName: Bansonic
organizationId: gardeniarabbit
cloudEnabled: 0
legacyClampBlendShapeWeights: 0
hmiLoadingImage: {fileID: 0}
+1 -3
View File
@@ -10,8 +10,6 @@ UnityConnectSettings:
m_EventUrl: https://cdp.cloud.unity3d.com/v1/events
m_ConfigUrl: https://config.uca.cloud.unity3d.com
m_DashboardUrl: https://dashboard.unity3d.com
m_CNEventUrl: https://cdp.cloud.unity.cn/v1/events
m_CNConfigUrl: https://cdp.cloud.unity.cn/config
m_TestInitMode: 0
CrashReportingSettings:
m_EventUrl: https://perf-events.cloud.unity.cn
@@ -22,7 +20,7 @@ UnityConnectSettings:
m_Enabled: 0
m_TestMode: 0
UnityAnalyticsSettings:
m_Enabled: 1
m_Enabled: 0
m_TestMode: 0
m_InitializeOnStartup: 1
m_PackageRequiringCoreStatsPresent: 0