基础内容-3

Swirl Scale动画
四种Note代码建立
Note Judge Submodule构思中
This commit is contained in:
SoulliesOfficial
2025-01-27 22:11:24 -05:00
parent 8d887d5a7c
commit 70d06c6334
43 changed files with 2084 additions and 94 deletions

View File

@@ -30,3 +30,5 @@ MonoBehaviour:
type: 3}
defaultTrackMaterial: {fileID: 2100000, guid: 2424431729f1047c4b42f971c2cdd2b6,
type: 2}
bloomShake: {fileID: 845605030242152257, guid: 1ea739ef6f1bf4e87835b0f554587451,
type: 3}

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: b7dbc730863d34b7fbefb3be71413176
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,289 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &845605030242152257
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2859209460979211711}
- component: {fileID: 5676301476469219168}
m_Layer: 0
m_Name: BloomShake
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2859209460979211711
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 845605030242152257}
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!114 &5676301476469219168
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 845605030242152257}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 6da43522623d4704e979466dc7650b65, type: 3}
m_Name:
m_EditorClassIdentifier:
Feedbacks: []
InitializationMode: 2
AutoInitialization: 1
SafeMode: 3
Direction: 0
AutoChangeDirectionOnEnd: 0
AutoPlayOnStart: 0
AutoPlayOnEnable: 0
ForceTimescaleMode: 0
ForcedTimescaleMode: 1
DurationMultiplier: 1
TimescaleMultiplier: 1
RandomizeDuration: 0
RandomDurationMultiplier: {x: 0.5, y: 1.5}
DisplayFullDurationDetails: 0
PlayerTimescaleMode: 1
OnlyPlayIfWithinRange: 0
RangeCenter: {fileID: 0}
RangeDistance: 5
UseRangeFalloff: 0
RangeFalloff:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 1
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
RemapRangeFalloff: {x: 0, y: 1}
IgnoreRangeEvents: 0
CooldownDuration: 0
InitialDelay: 0
CanPlay: 1
CanPlayWhileAlreadyPlaying: 1
ChanceToPlay: 100
FeedbacksIntensity: 1
Events:
TriggerMMFeedbacksEvents: 0
TriggerUnityEvents: 1
OnPlay:
m_PersistentCalls:
m_Calls: []
OnPause:
m_PersistentCalls:
m_Calls: []
OnResume:
m_PersistentCalls:
m_Calls: []
OnRevert:
m_PersistentCalls:
m_Calls: []
OnComplete:
m_PersistentCalls:
m_Calls: []
OnRestoreInitialValues:
m_PersistentCalls:
m_Calls: []
OnSkipToTheEnd:
m_PersistentCalls:
m_Calls: []
OnInitializationComplete:
m_PersistentCalls:
m_Calls: []
OnEnable:
m_PersistentCalls:
m_Calls: []
OnDisable:
m_PersistentCalls:
m_Calls: []
DebugActive: 0
FeedbacksList:
- rid: 6334994102664298496
KeepPlayModeChanges: 0
PerformanceMode: 0
StopFeedbacksOnDisable: 0
PlayCount: 0
references:
version: 2
RefIds:
- rid: 6334994102664298496
type: {class: MMF_Bloom_URP, ns: MoreMountains.FeedbacksForThirdParty, asm: MoreMountains.Tools}
data:
Active: 1
UniqueID: -1883237936
Label: Bloom URP
ChannelMode: 0
Channel: 0
MMChannelDefinition: {fileID: 0}
Chance: 100
DisplayColor: {r: 0, g: 0, b: 0, a: 1}
Timing:
TimescaleMode: 0
ExcludeFromHoldingPauses: 0
ContributeToTotalDuration: 1
InitialDelay: 0
CooldownDuration: 0
InterruptsOnStop: 1
NumberOfRepeats: 0
RepeatForever: 0
DelayBetweenRepeats: 1
PlayCount: 0
LimitPlayCount: 0
MaxPlayCount: 3
SetPlayCountToZeroOnReset: 0
MMFeedbacksDirectionCondition: 0
PlayDirection: 0
ConstantIntensity: 0
UseIntensityInterval: 0
IntensityIntervalMin: 0
IntensityIntervalMax: 0
Sequence: {fileID: 0}
TrackID: 0
Quantized: 0
TargetBPM: 120
AutomatedTargetAcquisition:
Mode: 0
ChildIndex: 0
RandomizeOutput: 0
RandomMultiplier: {x: 0.8, y: 1}
RandomizeDuration: 0
RandomDurationMultiplier: {x: 0.5, y: 2}
UseRange: 0
RangeDistance: 5
UseRangeFalloff: 0
RangeFalloff:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 1
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
RemapRangeFalloff: {x: 0, y: 1}
AutomaticShakerSetupButton:
ButtonText: Automatic Shaker Setup
Owner: {fileID: 5676301476469219168}
DebugActive: 0
ShakeDuration: 0.2
ResetShakerValuesAfterShake: 1
ResetTargetValuesAfterShake: 1
RelativeValues: 1
ShakeIntensity:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 0.5
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 1
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
RemapIntensityZero: 0
RemapIntensityOne: 10
ShakeThreshold:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 0.5
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 1
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
RemapThresholdZero: 0
RemapThresholdOne: 0

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 1ea739ef6f1bf4e87835b0f554587451
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,223 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &5030288017655597913
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6794014747502131782}
- component: {fileID: 2505559936379693214}
m_Layer: 0
m_Name: CameraShake
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &6794014747502131782
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5030288017655597913}
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!114 &2505559936379693214
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5030288017655597913}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 6da43522623d4704e979466dc7650b65, type: 3}
m_Name:
m_EditorClassIdentifier:
Feedbacks: []
InitializationMode: 2
AutoInitialization: 1
SafeMode: 3
Direction: 0
AutoChangeDirectionOnEnd: 0
AutoPlayOnStart: 0
AutoPlayOnEnable: 0
ForceTimescaleMode: 0
ForcedTimescaleMode: 1
DurationMultiplier: 1
TimescaleMultiplier: 1
RandomizeDuration: 0
RandomDurationMultiplier: {x: 0.5, y: 1.5}
DisplayFullDurationDetails: 0
PlayerTimescaleMode: 1
OnlyPlayIfWithinRange: 0
RangeCenter: {fileID: 0}
RangeDistance: 5
UseRangeFalloff: 0
RangeFalloff:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 1
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
RemapRangeFalloff: {x: 0, y: 1}
IgnoreRangeEvents: 0
CooldownDuration: 0
InitialDelay: 0
CanPlay: 1
CanPlayWhileAlreadyPlaying: 1
ChanceToPlay: 100
FeedbacksIntensity: 1
Events:
TriggerMMFeedbacksEvents: 0
TriggerUnityEvents: 1
OnPlay:
m_PersistentCalls:
m_Calls: []
OnPause:
m_PersistentCalls:
m_Calls: []
OnResume:
m_PersistentCalls:
m_Calls: []
OnRevert:
m_PersistentCalls:
m_Calls: []
OnComplete:
m_PersistentCalls:
m_Calls: []
OnRestoreInitialValues:
m_PersistentCalls:
m_Calls: []
OnSkipToTheEnd:
m_PersistentCalls:
m_Calls: []
OnInitializationComplete:
m_PersistentCalls:
m_Calls: []
OnEnable:
m_PersistentCalls:
m_Calls: []
OnDisable:
m_PersistentCalls:
m_Calls: []
DebugActive: 0
FeedbacksList:
- rid: 6334994104641650688
KeepPlayModeChanges: 0
PerformanceMode: 0
StopFeedbacksOnDisable: 0
PlayCount: 0
references:
version: 2
RefIds:
- rid: 6334994104641650688
type: {class: MMF_CameraShake, ns: MoreMountains.Feedbacks, asm: MoreMountains.Tools}
data:
Active: 1
UniqueID: -611614127
Label: Camera Shake
ChannelMode: 0
Channel: 0
MMChannelDefinition: {fileID: 0}
Chance: 100
DisplayColor: {r: 0, g: 0, b: 0, a: 1}
Timing:
TimescaleMode: 0
ExcludeFromHoldingPauses: 0
ContributeToTotalDuration: 1
InitialDelay: 0
CooldownDuration: 0
InterruptsOnStop: 1
NumberOfRepeats: 0
RepeatForever: 0
DelayBetweenRepeats: 1
PlayCount: 0
LimitPlayCount: 0
MaxPlayCount: 3
SetPlayCountToZeroOnReset: 0
MMFeedbacksDirectionCondition: 0
PlayDirection: 0
ConstantIntensity: 0
UseIntensityInterval: 0
IntensityIntervalMin: 0
IntensityIntervalMax: 0
Sequence: {fileID: 0}
TrackID: 0
Quantized: 0
TargetBPM: 120
AutomatedTargetAcquisition:
Mode: 0
ChildIndex: 0
RandomizeOutput: 0
RandomMultiplier: {x: 0.8, y: 1}
RandomizeDuration: 0
RandomDurationMultiplier: {x: 0.5, y: 2}
UseRange: 0
RangeDistance: 5
UseRangeFalloff: 0
RangeFalloff:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 1
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
RemapRangeFalloff: {x: 0, y: 1}
AutomaticShakerSetupButton:
ButtonText: Automatic Shaker Setup
Owner: {fileID: 2505559936379693214}
DebugActive: 0
RepeatUntilStopped: 0
CameraShakeProperties:
Duration: 0.1
Amplitude: 0
Frequency: 40
AmplitudeX: 0
AmplitudeY: 1
AmplitudeZ: 0

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 46175bea33f87445bbec1389a53da172
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -122,6 +122,84 @@ NavMeshSettings:
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1001 &151772093
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 2505559936379693214, guid: 46175bea33f87445bbec1389a53da172,
type: 3}
propertyPath: managedReferences[6334994104641650688].CameraShakeProperties.Amplitude
value: 10
objectReference: {fileID: 0}
- target: {fileID: 2505559936379693214, guid: 46175bea33f87445bbec1389a53da172,
type: 3}
propertyPath: managedReferences[6334994104641650688].CameraShakeProperties.AmplitudeY
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5030288017655597913, guid: 46175bea33f87445bbec1389a53da172,
type: 3}
propertyPath: m_Name
value: CameraShake
objectReference: {fileID: 0}
- target: {fileID: 6794014747502131782, guid: 46175bea33f87445bbec1389a53da172,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6794014747502131782, guid: 46175bea33f87445bbec1389a53da172,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6794014747502131782, guid: 46175bea33f87445bbec1389a53da172,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6794014747502131782, guid: 46175bea33f87445bbec1389a53da172,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6794014747502131782, guid: 46175bea33f87445bbec1389a53da172,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6794014747502131782, guid: 46175bea33f87445bbec1389a53da172,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6794014747502131782, guid: 46175bea33f87445bbec1389a53da172,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6794014747502131782, guid: 46175bea33f87445bbec1389a53da172,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6794014747502131782, guid: 46175bea33f87445bbec1389a53da172,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6794014747502131782, guid: 46175bea33f87445bbec1389a53da172,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 46175bea33f87445bbec1389a53da172, type: 3}
--- !u!1 &330585543
GameObject:
m_ObjectHideFlags: 0
@@ -134,6 +212,9 @@ GameObject:
- component: {fileID: 330585545}
- component: {fileID: 330585544}
- component: {fileID: 330585547}
- component: {fileID: 330585550}
- component: {fileID: 330585549}
- component: {fileID: 330585548}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
@@ -209,7 +290,7 @@ Transform:
m_GameObject: {fileID: 330585543}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1, z: -10}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
@@ -259,6 +340,367 @@ MonoBehaviour:
m_MipBias: 0
m_VarianceClampScale: 0.9
m_ContrastAdaptiveSharpening: 0
--- !u!114 &330585548
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 330585543}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 531894cbc68d4bf49a71825ad87c3305, type: 3}
m_Name:
m_EditorClassIdentifier:
ChannelMode: 0
Channel: 0
MMChannelDefinition: {fileID: 0}
CooldownBetweenShakes: 0
--- !u!114 &330585549
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 330585543}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 6bf8e915527fa424a8b17dc168fe20eb, type: 3}
m_Name:
m_EditorClassIdentifier:
ChannelMode: 0
Channel: 0
MMChannelDefinition: {fileID: 0}
CooldownBetweenShakes: 0
--- !u!114 &330585550
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 330585543}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 347013242dca7c44fb5001793033ea59, type: 3}
m_Name:
m_EditorClassIdentifier:
UpdateMode: 0
PositionActive: 0
RotationActive: 0
ScaleActive: 0
PositionWiggleProperties:
WigglePermitted: 1
WiggleType: 1
UseUnscaledTime: 0
TimeMultiplier: 1
StartWigglingAutomatically: 1
SmoothPingPong: 1
UseSpeedCurve: 0
SpeedCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 1
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 1
value: 1
inSlope: 1
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
FrequencyMin: 0
FrequencyMax: 1
AmplitudeMin: {x: 0, y: 0, z: 0}
AmplitudeMax: {x: 1, y: 1, z: 1}
RelativeAmplitude: 1
UniformValues: 0
ForceVectorLength: 0
ForcedVectorLength: 1
Curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 1
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 1
value: 1
inSlope: 1
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
RemapCurveZeroMin: {x: 0, y: 0, z: 0}
RemapCurveZeroMax: {x: 0, y: 0, z: 0}
RemapCurveOneMin: {x: 1, y: 1, z: 1}
RemapCurveOneMax: {x: 1, y: 1, z: 1}
RelativeCurveAmplitude: 1
CurvePingPong: 0
PauseMin: 0
PauseMax: 0
LimitedTime: 0
LimitedTimeTotal: 0
LimitedTimeFalloff:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: -1
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 1
value: 0
inSlope: -1
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
LimitedTimeResetValue: 1
LimitedTimeLeft: 0
NoiseFrequencyMin: {x: 0, y: 0, z: 0}
NoiseFrequencyMax: {x: 1, y: 1, z: 1}
NoiseShiftMin: {x: 0, y: 0, z: 0}
NoiseShiftMax: {x: 0, y: 0, z: 0}
RotationWiggleProperties:
WigglePermitted: 1
WiggleType: 1
UseUnscaledTime: 0
TimeMultiplier: 1
StartWigglingAutomatically: 1
SmoothPingPong: 1
UseSpeedCurve: 0
SpeedCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 1
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 1
value: 1
inSlope: 1
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
FrequencyMin: 0
FrequencyMax: 1
AmplitudeMin: {x: 0, y: 0, z: 0}
AmplitudeMax: {x: 1, y: 1, z: 1}
RelativeAmplitude: 1
UniformValues: 0
ForceVectorLength: 0
ForcedVectorLength: 1
Curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 1
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 1
value: 1
inSlope: 1
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
RemapCurveZeroMin: {x: 0, y: 0, z: 0}
RemapCurveZeroMax: {x: 0, y: 0, z: 0}
RemapCurveOneMin: {x: 1, y: 1, z: 1}
RemapCurveOneMax: {x: 1, y: 1, z: 1}
RelativeCurveAmplitude: 1
CurvePingPong: 0
PauseMin: 0
PauseMax: 0
LimitedTime: 0
LimitedTimeTotal: 0
LimitedTimeFalloff:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: -1
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 1
value: 0
inSlope: -1
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
LimitedTimeResetValue: 1
LimitedTimeLeft: 0
NoiseFrequencyMin: {x: 0, y: 0, z: 0}
NoiseFrequencyMax: {x: 1, y: 1, z: 1}
NoiseShiftMin: {x: 0, y: 0, z: 0}
NoiseShiftMax: {x: 0, y: 0, z: 0}
ScaleWiggleProperties:
WigglePermitted: 1
WiggleType: 1
UseUnscaledTime: 0
TimeMultiplier: 1
StartWigglingAutomatically: 1
SmoothPingPong: 1
UseSpeedCurve: 0
SpeedCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 1
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 1
value: 1
inSlope: 1
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
FrequencyMin: 0
FrequencyMax: 1
AmplitudeMin: {x: 0, y: 0, z: 0}
AmplitudeMax: {x: 1, y: 1, z: 1}
RelativeAmplitude: 1
UniformValues: 0
ForceVectorLength: 0
ForcedVectorLength: 1
Curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 1
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 1
value: 1
inSlope: 1
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
RemapCurveZeroMin: {x: 0, y: 0, z: 0}
RemapCurveZeroMax: {x: 0, y: 0, z: 0}
RemapCurveOneMin: {x: 1, y: 1, z: 1}
RemapCurveOneMax: {x: 1, y: 1, z: 1}
RelativeCurveAmplitude: 1
CurvePingPong: 0
PauseMin: 0
PauseMax: 0
LimitedTime: 0
LimitedTimeTotal: 0
LimitedTimeFalloff:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: -1
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 1
value: 0
inSlope: -1
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
LimitedTimeResetValue: 1
LimitedTimeLeft: 0
NoiseFrequencyMin: {x: 0, y: 0, z: 0}
NoiseFrequencyMax: {x: 1, y: 1, z: 1}
NoiseShiftMin: {x: 0, y: 0, z: 0}
NoiseShiftMax: {x: 0, y: 0, z: 0}
DebugWiggleDuration: 2
--- !u!1 &410087039
GameObject:
m_ObjectHideFlags: 0
@@ -387,6 +829,9 @@ GameObject:
m_Component:
- component: {fileID: 832575519}
- component: {fileID: 832575518}
- component: {fileID: 832575522}
- component: {fileID: 832575521}
- component: {fileID: 832575520}
m_Layer: 0
m_Name: Global Volume
m_TagString: Untagged
@@ -426,6 +871,270 @@ Transform:
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &832575520
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 832575517}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2d01154bce0123949a8800d85a063092, type: 3}
m_Name:
m_EditorClassIdentifier:
ChannelMode: 0
Channel: 0
MMChannelDefinition: {fileID: 0}
ShakeDuration: 0.2
PlayOnAwake: 0
PermanentShake: 0
Interruptible: 1
AlwaysResetTargetValuesAfterShake: 0
OnlyUseShakerValues: 0
CooldownBetweenShakes: 0
Shaking: 0
ForwardDirection: 1
TimescaleMode: 0
RelativeIntensity: 0
ShakeIntensity:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 0.5
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 1
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
RemapIntensityZero: 0
RemapIntensityOne: 1
--- !u!114 &832575521
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 832575517}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 94df1ffae0c2c7d4ba695b68267eea10, type: 3}
m_Name:
m_EditorClassIdentifier:
ChannelMode: 0
Channel: 0
MMChannelDefinition: {fileID: 0}
ShakeDuration: 0.2
PlayOnAwake: 0
PermanentShake: 0
Interruptible: 1
AlwaysResetTargetValuesAfterShake: 0
OnlyUseShakerValues: 0
CooldownBetweenShakes: 0
Shaking: 0
ForwardDirection: 1
TimescaleMode: 0
RelativeIntensity: 0
ShakeIntensity:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 0.5
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 1
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
RemapIntensityZero: 0
RemapIntensityOne: 1
InterpolateColor: 0
ColorCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 0.05
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 0.95
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 1
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
RemapColorZero: 0
RemapColorOne: 1
TargetColor: {r: 1, g: 0, b: 0, a: 1}
--- !u!114 &832575522
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 832575517}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 485e02e02c638cf4b9ca8344fd6213a9, type: 3}
m_Name:
m_EditorClassIdentifier:
ChannelMode: 0
Channel: 0
MMChannelDefinition: {fileID: 0}
ShakeDuration: 0.2
PlayOnAwake: 0
PermanentShake: 0
Interruptible: 1
AlwaysResetTargetValuesAfterShake: 0
OnlyUseShakerValues: 0
CooldownBetweenShakes: 0
Shaking: 0
ForwardDirection: 1
TimescaleMode: 0
RelativeValues: 1
ShakeIntensity:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 0.5
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 1
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
RemapIntensityZero: 0
RemapIntensityOne: 1
ShakeThreshold:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 0.5
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 1
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
RemapThresholdZero: 0
RemapThresholdOne: 0
--- !u!1 &1197505577
GameObject:
m_ObjectHideFlags: 0
@@ -436,6 +1145,7 @@ GameObject:
m_Component:
- component: {fileID: 1197505579}
- component: {fileID: 1197505578}
- component: {fileID: 1197505580}
m_Layer: 0
m_Name: EditorManager
m_TagString: Untagged
@@ -492,6 +1202,166 @@ Transform:
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1197505580
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1197505577}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: af21e649d109b416aa81541349c26926, type: 3}
m_Name:
m_EditorClassIdentifier:
serializationData:
SerializedFormat: 2
SerializedBytes:
ReferencedUnityObjects: []
SerializedBytesString:
Prefab: {fileID: 0}
PrefabModificationsReferencedUnityObjects: []
PrefabModifications: []
SerializationNodes:
- Name: timeEffectUnits
Entry: 7
Data: 0|System.Collections.Generic.List`1[[Ichni.RhythmGame.TimeEffectUnit,
Assembly-CSharp]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 1|Ichni.RhythmGame.TimeEffectUnit, Assembly-CSharp
- Name: unitName
Entry: 6
Data:
- Name: unitTime
Entry: 4
Data: 0
- Name: effectSubmodule
Entry: 7
Data: 2|Ichni.RhythmGame.EffectSubmodule, Assembly-CSharp
- Name: effectList
Entry: 6
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 13
Data:
- Name:
Entry: 8
Data:
--- !u!1 &1754040413
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1754040417}
- component: {fileID: 1754040416}
- component: {fileID: 1754040415}
- component: {fileID: 1754040414}
m_Layer: 0
m_Name: Sphere
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!135 &1754040414
SphereCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1754040413}
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_IsTrigger: 0
m_ProvidesContacts: 0
m_Enabled: 1
serializedVersion: 3
m_Radius: 0.5
m_Center: {x: 0, y: 0, z: 0}
--- !u!23 &1754040415
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1754040413}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, 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: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!33 &1754040416
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1754040413}
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
--- !u!4 &1754040417
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1754040413}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 5}
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!1660057539 &9223372036854775807
SceneRoots:
m_ObjectHideFlags: 0
@@ -500,3 +1370,5 @@ SceneRoots:
- {fileID: 410087041}
- {fileID: 832575519}
- {fileID: 1197505579}
- {fileID: 1754040417}
- {fileID: 151772093}

View File

@@ -19,6 +19,33 @@ namespace Ichni.RhythmGame
SetParent(this.targetObject);
}
public abstract void UpdateAnimation(float songTime);
public virtual void SetTimeDuration(params FlexibleFloat[] flexibleFloats)
{
List<float> startTimes = new List<float>();
List<float> endTimes = new List<float>();
foreach (FlexibleFloat flexibleFloat in flexibleFloats)
{
flexibleFloat.Sort();
if (flexibleFloat.animations.Count > 0)
{
startTimes.Add(flexibleFloat.animations[0].startTime);
endTimes.Add(flexibleFloat.animations[^1].endTime);
}
}
timeDurationSubmodule = new TimeDurationSubmodule(startTimes.Min(), endTimes.Max());
}
protected abstract void UpdateAnimation(float songTime);
protected virtual void Update()
{
if (timeDurationSubmodule.CheckTimeInDuration(EditorManager.instance.songModule.songTime))
{
UpdateAnimation(EditorManager.instance.songModule.songTime);
}
}
}
}

View File

@@ -18,7 +18,7 @@ namespace Ichni.RhythmGame
public static Displacement GenerateElement(string elementName, BaseElement targetObject,
FlexibleFloat positionX, FlexibleFloat positionY, FlexibleFloat positionZ)
{
Displacement displacement = LeanPool.Spawn(new GameObject()).AddComponent<Displacement>();//TODO: 替换 new GameObject();
Displacement displacement = LeanPool.Spawn(EditorManager.instance.basePrefabs.emptyObject).AddComponent<Displacement>();
displacement.NewInitialize(elementName, targetObject);
@@ -35,54 +35,13 @@ namespace Ichni.RhythmGame
{
throw new System.Exception("Target object does not have a TransformSubmodule");
}
displacement.SetTimeDuration();
displacement.SetTimeDuration(positionX, positionY, positionZ);
return displacement;
}
public override void SetTimeDuration()
{
positionX.Sort();
positionY.Sort();
positionZ.Sort();
List<float> startTimes = new List<float>();
List<float> endTimes = new List<float>();
if (positionX.animations.Count > 0)
{
startTimes.Add(positionX.animations[0].startTime);
endTimes.Add(positionX.animations[^1].endTime);
}
if (positionY.animations.Count > 0)
{
startTimes.Add(positionY.animations[0].startTime);
endTimes.Add(positionY.animations[^1].endTime);
}
if (positionZ.animations.Count > 0)
{
startTimes.Add(positionZ.animations[0].startTime);
endTimes.Add(positionZ.animations[^1].endTime);
}
float startTime = startTimes.Min();
float endTime = endTimes.Max();
timeDurationSubmodule = new TimeDurationSubmodule(startTime, endTime);
}
protected void Update()
{
if (timeDurationSubmodule.CheckTimeInDuration(EditorManager.instance.songModule.songTime))
{
UpdateAnimation(EditorManager.instance.songModule.songTime);
}
}
public override void UpdateAnimation(float songTime)
protected override void UpdateAnimation(float songTime)
{
positionX.UpdateFlexibleFloat(songTime);
positionY.UpdateFlexibleFloat(songTime);

View File

@@ -0,0 +1,55 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace Ichni.RhythmGame
{
public class Scale : AnimationBase
{
public TransformSubmodule targetTransformSubmodule;
public FlexibleFloat scaleX, scaleY, scaleZ;
public static Scale GenerateElement(string elementName, BaseElement targetObject,
FlexibleFloat scaleX, FlexibleFloat scaleY, FlexibleFloat scaleZ)
{
Scale scale = Lean.Pool.LeanPool.Spawn(EditorManager.instance.basePrefabs.emptyObject).AddComponent<Scale>();
scale.NewInitialize(elementName, targetObject);
scale.scaleX = scaleX;
scale.scaleY = scaleY;
scale.scaleZ = scaleZ;
scale.animationReturnType = FlexibleReturnType.Before;
if (targetObject.transformSubmodule != null)
{
scale.targetTransformSubmodule = targetObject.transformSubmodule;
}
else
{
throw new System.Exception("Target object does not have a TransformSubmodule");
}
scale.SetTimeDuration(scaleX, scaleY, scaleZ);
return scale;
}
protected override void UpdateAnimation(float songTime)
{
scaleX.UpdateFlexibleFloat(songTime);
scaleY.UpdateFlexibleFloat(songTime);
scaleZ.UpdateFlexibleFloat(songTime);
if (scaleX.returnType is FlexibleReturnType.MiddleExecuting ||
scaleY.returnType is FlexibleReturnType.MiddleExecuting ||
scaleZ.returnType is FlexibleReturnType.MiddleExecuting)
{
animationReturnType = FlexibleReturnType.MiddleExecuting;
Vector3 currentScale = new Vector3(scaleX.value, scaleY.value, scaleZ.value);
targetTransformSubmodule.scaleOffset.Add(currentScale);
targetTransformSubmodule.scaleDirtyMark = true;
}
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 1119784540bef4e73b37c7cb9f597065
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,56 @@
using System.Collections;
using System.Collections.Generic;
using Lean.Pool;
using UnityEngine;
namespace Ichni.RhythmGame
{
public class Swirl : AnimationBase
{
public TransformSubmodule targetTransformSubmodule;
public FlexibleFloat eulerAngleX, eulerAngleY, eulerAngleZ;
public static Swirl GenerateElement(string elementName, BaseElement targetObject,
FlexibleFloat eulerAngleX, FlexibleFloat eulerAngleY, FlexibleFloat eulerAngleZ)
{
Swirl swirl = LeanPool.Spawn(EditorManager.instance.basePrefabs.emptyObject).AddComponent<Swirl>();
swirl.NewInitialize(elementName, targetObject);
swirl.eulerAngleX = eulerAngleX;
swirl.eulerAngleY = eulerAngleY;
swirl.eulerAngleZ = eulerAngleZ;
swirl.animationReturnType = FlexibleReturnType.Before;
if (targetObject.transformSubmodule != null)
{
swirl.targetTransformSubmodule = targetObject.transformSubmodule;
}
else
{
throw new System.Exception("Target object does not have a TransformSubmodule");
}
swirl.SetTimeDuration(eulerAngleX, eulerAngleY, eulerAngleZ);
return swirl;
}
protected override void UpdateAnimation(float songTime)
{
eulerAngleX.UpdateFlexibleFloat(songTime);
eulerAngleY.UpdateFlexibleFloat(songTime);
eulerAngleZ.UpdateFlexibleFloat(songTime);
if (eulerAngleX.returnType is FlexibleReturnType.MiddleExecuting ||
eulerAngleY.returnType is FlexibleReturnType.MiddleExecuting ||
eulerAngleZ.returnType is FlexibleReturnType.MiddleExecuting)
{
animationReturnType = FlexibleReturnType.MiddleExecuting;
Vector3 currentEulerAngles = new Vector3(eulerAngleX.value, eulerAngleY.value, eulerAngleZ.value);
targetTransformSubmodule.eulerAnglesOffset.Add(currentEulerAngles);
targetTransformSubmodule.eulerAnglesDirtyMark = true;
}
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: e6daf69621681491bb09cc72e2ff4bdb
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -11,6 +11,64 @@ namespace Ichni.RhythmGame
public abstract class EffectBase
{
public abstract void Execute();
public enum EffectState
{
Before = -1,
Middle = 0,
After = 1,
Error = 100
}
/// <summary>
/// 效果的持续时间如果为0则表示瞬间效果
/// </summary>
public float effectTime;
/// <summary>
/// 是否是瞬间效果
/// </summary>
public bool isInstantEffect => effectTime <= 0;
/// <summary>
/// 效果当前的状态
/// </summary>
public EffectState nowEffectState;
protected EffectBase()
{
this.effectTime = 0;
this.nowEffectState = EffectState.Before;
}
protected EffectBase(float effectTime)
{
this.effectTime = effectTime;
this.nowEffectState = EffectState.Before;
}
/// <summary>
/// 在效果的持续时间内,触发这个方法
/// </summary>
public virtual void Execute()
{
}
/// <summary>
/// 如果是非瞬间效果,在效果完成后,触发这个方法;
/// 如果是瞬间效果则此方法即为Execute。原有的Execute方法不被调用。
/// </summary>
public virtual void Adjust()
{
}
/// <summary>
/// 如果时间轴回退到效果的触发时间之前,则触发这个方法
/// </summary>
public virtual void Recover()
{
}
}
}

View File

@@ -8,16 +8,19 @@ namespace Ichni.RhythmGame
{
public class TimeDurationSubmodule: SubmoduleBase
{
public bool isOverridingDuration; //是否手动设置了时间区间,开启时,子物体的时间区间将被忽略
public float startTime, endTime; //起止时间
public TimeDurationSubmodule()
{
isOverridingDuration = false;
startTime = 0;
endTime = 0;
}
public TimeDurationSubmodule(float startTime, float endTime)
{
this.isOverridingDuration = false;
this.startTime = startTime;
this.endTime = endTime;
}

View File

@@ -14,4 +14,7 @@ public class BasePrefabsCollection : SerializedScriptableObject
public GameObject track;
public GameObject pathNode;
public Material defaultTrackMaterial;
[Title("Effect相关")]
public GameObject bloomShake;
}

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 22d9d055a57b4494a85bf79a857d96ed
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,27 @@
using System;
using System.Collections;
using System.Collections.Generic;
using Lean.Pool;
using MoreMountains.Feedbacks;
using MoreMountains.FeedbacksForThirdParty;
using Sirenix.OdinInspector;
using UnityEngine;
namespace Ichni.RhythmGame
{
public class BloomShake : EffectBase
{
public float bloomTime;
public float bloomPeak;
[Button("Test Bloom Shake")]
public override void Adjust()
{
MMF_Player effect = LeanPool.Spawn(EditorManager.instance.basePrefabs.bloomShake).GetComponent<MMF_Player>();
effect.GetFeedbackOfType<MMF_Bloom_URP>().ShakeDuration = bloomTime;
effect.GetFeedbackOfType<MMF_Bloom_URP>().RemapIntensityOne = bloomPeak;
effect.PlayFeedbacks();
LeanPool.Despawn(effect.gameObject, bloomTime);
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: fbe90f2898886421aa1ecfe2a2aaf4f5
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,19 @@
using System.Collections;
using System.Collections.Generic;
using Sirenix.OdinInspector;
using UnityEngine;
namespace Ichni.RhythmGame
{
public class TimeEffectsCollection : SerializedMonoBehaviour
{
public List<TimeEffectUnit> timeEffectUnits;
}
public class TimeEffectUnit
{
public string unitName;
public float unitTime;
public EffectSubmodule effectSubmodule;
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: af21e649d109b416aa81541349c26926
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,18 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Flick : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: db9afa4209e714d689fc9b15d81c6f50
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,18 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Hold : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 3d86cc42eec2b42e3aa9571c916401e6
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: acc133c3d8ab345e1ac8d703e4ce2f18
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,18 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class FullScreenBalancedJudgeSubmodule : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 0afb3700dadc6439aa12380eba145393
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,18 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class FullScreenNearTimeJudgeSubmodule : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 8bf5b334d67634f4688a5481f1ccc42f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,16 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace Ichni.RhythmGame
{
public class NoteJudgeSubmodule : SubmoduleBase
{
}
public class NoteJudgeUnit
{
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 68da77ce27dec41478846a37c8a491cd
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,18 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class TouchAreaJudgeSubmodule : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: e217631f39751452bad007e0cb075e61
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,18 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class TriggerConnectJudgeSubmodule : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 16de260925efb4951afd63b8dc4a5d6c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -20,11 +20,22 @@ namespace Ichni.RhythmGame
// [Title("NoteVisual")]
// public GeneralNoteVisual noteVisual;
//
// [Title("NoteEffect")]
// public List<NoteEffectGenerate> noteEffectGenerateList;
// public List<NoteEffectPerfect> noteEffectPerfectList;
// public List<NoteEffectGood> noteEffectGoodList;
// public List<NoteEffectMiss> noteEffectMissList;
[Title("NoteEffect")]
[Tooltip("生成Note时的特效")]
public EffectSubmodule generateEffects;
[Tooltip("Note被判定时的特效不包括Miss")]
public EffectSubmodule generalJudgeEffects;
[Tooltip("Note被Perfect判定时的特效")]
public EffectSubmodule perfectJudgeEffects;
[Tooltip("Note被Good判定时的特效")]
public EffectSubmodule goodJudgeEffects;
[Tooltip("Note被Bad判定时的特效")]
public EffectSubmodule badJudgeEffects;
[Tooltip("Note未被判定时的特效即Miss")]
public EffectSubmodule missJudgeEffects;
[Title("Judge Info")]
public NoteJudgeSubmodule noteJudgeSubmodule;
[Title("In-Game Info")]
public Vector2 noteScreenPosition;

View File

@@ -0,0 +1,18 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Stay : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 1ec53002feb264ae7b2bb0386ac37ad2
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,18 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Tap : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 6b1bd7cbcd49b4f0b805e902cd7c3025
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -8,7 +8,6 @@ namespace Ichni.RhythmGame
{
public class TrackRendererSubmodule : TrackSubmodule
{
public Track track;
public MeshGenerator meshGenerator;
public MeshRenderer meshRenderer;
public Material renderMaterial;
@@ -30,7 +29,6 @@ namespace Ichni.RhythmGame
this.splineRenderer.clipFrom = 0;
this.splineRenderer.clipTo = 1;
this.meshRenderer.material = renderMaterial;
Debug.Log(splineRenderer.clipFrom + " " + splineRenderer.clipTo);
this.splineRenderer.color = Color.white;
}

View File

@@ -13,45 +13,40 @@ MonoBehaviour:
m_Name: Bloom
m_EditorClassIdentifier:
active: 1
m_AdvancedMode: 0
threshold:
m_OverrideState: 1
m_Value: 1
min: 0
intensity:
m_OverrideState: 1
m_Value: 1
min: 0
scatter:
m_OverrideState: 0
m_Value: 0.7
min: 0
max: 1
clamp:
m_OverrideState: 0
m_Value: 65472
min: 0
tint:
m_OverrideState: 0
m_Value: {r: 1, g: 1, b: 1, a: 1}
hdr: 0
showAlpha: 0
showEyeDropper: 1
highQualityFiltering:
m_OverrideState: 0
m_Value: 0
skipIterations:
m_OverrideState: 0
m_Value: 1
min: 0
max: 16
threshold:
m_OverrideState: 1
m_Value: 1
intensity:
m_OverrideState: 1
m_Value: 1
scatter:
m_OverrideState: 1
m_Value: 0.8
clamp:
m_OverrideState: 1
m_Value: 65472
tint:
m_OverrideState: 1
m_Value: {r: 1, g: 1, b: 1, a: 1}
highQualityFiltering:
m_OverrideState: 1
m_Value: 1
downscale:
m_OverrideState: 0
m_Value: 0
maxIterations:
m_OverrideState: 0
m_Value: 6
dirtTexture:
m_OverrideState: 0
m_Value: {fileID: 0}
dimension: 1
dirtIntensity:
m_OverrideState: 0
m_Value: 0
min: 0
--- !u!114 &-7011558710299706105
MonoBehaviour:
m_ObjectHideFlags: 3
@@ -65,29 +60,37 @@ MonoBehaviour:
m_Name: Vignette
m_EditorClassIdentifier:
active: 1
m_AdvancedMode: 0
color:
m_OverrideState: 0
m_Value: {r: 0, g: 0, b: 0, a: 1}
hdr: 0
showAlpha: 0
showEyeDropper: 1
center:
m_OverrideState: 0
m_Value: {x: 0.5, y: 0.5}
intensity:
m_OverrideState: 1
m_Value: 0.25
min: 0
max: 1
smoothness:
m_OverrideState: 1
m_Value: 0.4
min: 0.01
max: 1
rounded:
m_OverrideState: 0
m_Value: 0
--- !u!114 &-2021892299009130980
MonoBehaviour:
m_ObjectHideFlags: 3
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 81180773991d8724ab7f2d216912b564, type: 3}
m_Name: ChromaticAberration
m_EditorClassIdentifier:
active: 1
intensity:
m_OverrideState: 1
m_Value: 0
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -104,6 +107,27 @@ MonoBehaviour:
- {fileID: 849379129802519247}
- {fileID: -7893295128165547882}
- {fileID: -7011558710299706105}
- {fileID: -2021892299009130980}
- {fileID: 615367148826518113}
--- !u!114 &615367148826518113
MonoBehaviour:
m_ObjectHideFlags: 3
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fb60a22f311433c4c962b888d1393f88, type: 3}
m_Name: PaniniProjection
m_EditorClassIdentifier:
active: 1
distance:
m_OverrideState: 1
m_Value: 0
cropToFit:
m_OverrideState: 1
m_Value: 1
--- !u!114 &849379129802519247
MonoBehaviour:
m_ObjectHideFlags: 3
@@ -117,7 +141,30 @@ MonoBehaviour:
m_Name: Tonemapping
m_EditorClassIdentifier:
active: 1
m_AdvancedMode: 0
mode:
m_OverrideState: 1
m_Value: 1
neutralHDRRangeReductionMode:
m_OverrideState: 0
m_Value: 2
acesPreset:
m_OverrideState: 0
m_Value: 3
hueShiftAmount:
m_OverrideState: 0
m_Value: 0
detectPaperWhite:
m_OverrideState: 0
m_Value: 0
paperWhite:
m_OverrideState: 0
m_Value: 300
detectBrightnessLimits:
m_OverrideState: 0
m_Value: 1
minNits:
m_OverrideState: 0
m_Value: 0.005
maxNits:
m_OverrideState: 0
m_Value: 1000