Skip to content

Commit

Permalink
break tap和hold闪烁特效
Browse files Browse the repository at this point in the history
  • Loading branch information
Moying-moe committed Nov 1, 2022
1 parent 72904e9 commit 80f8e27
Show file tree
Hide file tree
Showing 15 changed files with 326 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ AnimationClip:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: slideShine
m_Name: BreakShine
serializedVersion: 6
m_Legacy: 0
m_Compressed: 0
Expand Down Expand Up @@ -102,7 +102,7 @@ AnimationClip:
m_StopTime: 0.53333336
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0.9
m_CycleOffset: 0
m_HasAdditiveReferencePose: 0
m_LoopTime: 1
m_LoopBlend: 0
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ AnimatorStateMachine:
m_ChildStates:
- serializedVersion: 1
m_State: {fileID: -1689803391859848882}
m_Position: {x: 200, y: 0, z: 0}
m_Position: {x: 250, y: 80, z: 0}
m_ChildStateMachines: []
m_AnyStateTransitions: []
m_EntryTransitions: []
Expand All @@ -29,7 +29,7 @@ AnimatorState:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: slideShine
m_Name: BreakShine
m_Speed: 1
m_CycleOffset: 0
m_Transitions: []
Expand All @@ -54,7 +54,7 @@ AnimatorController:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: slideShine
m_Name: BreakShine
serializedVersion: 5
m_AnimatorParameters: []
m_AnimatorLayers:
Expand Down
File renamed without changes.
149 changes: 149 additions & 0 deletions Assets/Animation/HoldShine.anim
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!74 &7400000
AnimationClip:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: HoldShine
serializedVersion: 6
m_Legacy: 0
m_Compressed: 0
m_UseHighQualityCurve: 1
m_RotationCurves: []
m_CompressedRotationCurves: []
m_EulerCurves: []
m_PositionCurves: []
m_ScaleCurves: []
m_FloatCurves:
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.13333334
value: 1.3
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.26666668
value: 1
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: material._Brightness
path:
classID: 212
script: {fileID: 0}
m_PPtrCurves:
- curve:
- time: 0
value: {fileID: 2100000, guid: 6cea13e5ba8275446be27a38daed20c7, type: 2}
attribute: m_Materials.Array.data[0]
path:
classID: 212
script: {fileID: 0}
m_SampleRate: 60
m_WrapMode: 0
m_Bounds:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 0, y: 0, z: 0}
m_ClipBindingConstant:
genericBindings:
- serializedVersion: 2
path: 0
attribute: 2237670731
script: {fileID: 0}
typeID: 212
customType: 22
isPPtrCurve: 0
- serializedVersion: 2
path: 0
attribute: 0
script: {fileID: 0}
typeID: 212
customType: 21
isPPtrCurve: 1
pptrCurveMapping:
- {fileID: 2100000, guid: 6cea13e5ba8275446be27a38daed20c7, type: 2}
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 0.26666668
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
m_HasAdditiveReferencePose: 0
m_LoopTime: 1
m_LoopBlend: 0
m_LoopBlendOrientation: 0
m_LoopBlendPositionY: 0
m_LoopBlendPositionXZ: 0
m_KeepOriginalOrientation: 0
m_KeepOriginalPositionY: 1
m_KeepOriginalPositionXZ: 0
m_HeightFromFeet: 0
m_Mirror: 0
m_EditorCurves:
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.13333334
value: 1.3
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.26666668
value: 1
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: material._Brightness
path:
classID: 212
script: {fileID: 0}
m_EulerEditorCurves: []
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_Events: []
8 changes: 8 additions & 0 deletions Assets/Animation/HoldShine.anim.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

72 changes: 72 additions & 0 deletions Assets/Animation/HoldShine.controller
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1102 &-4638285642364763560
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: HoldShine
m_Speed: 1
m_CycleOffset: 0
m_Transitions: []
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: 24ec1702992b7564688b78bfa29d4eea, type: 2}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!91 &9100000
AnimatorController:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: HoldShine
serializedVersion: 5
m_AnimatorParameters: []
m_AnimatorLayers:
- serializedVersion: 5
m_Name: Base Layer
m_StateMachine: {fileID: 3849808529861094609}
m_Mask: {fileID: 0}
m_Motions: []
m_Behaviours: []
m_BlendingMode: 0
m_SyncedLayerIndex: -1
m_DefaultWeight: 0
m_IKPass: 0
m_SyncedLayerAffectsTiming: 0
m_Controller: {fileID: 9100000}
--- !u!1107 &3849808529861094609
AnimatorStateMachine:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Base Layer
m_ChildStates:
- serializedVersion: 1
m_State: {fileID: -4638285642364763560}
m_Position: {x: 200, y: 0, z: 0}
m_ChildStateMachines: []
m_AnyStateTransitions: []
m_EntryTransitions: []
m_StateMachineTransitions: {}
m_StateMachineBehaviours: []
m_AnyStatePosition: {x: 50, y: 20, z: 0}
m_EntryPosition: {x: 50, y: 120, z: 0}
m_ExitPosition: {x: 800, y: 120, z: 0}
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
m_DefaultState: {fileID: -4638285642364763560}
8 changes: 8 additions & 0 deletions Assets/Animation/HoldShine.controller.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Assets/Scenes/SampleScene.unity
Original file line number Diff line number Diff line change
Expand Up @@ -1022,7 +1022,8 @@ MonoBehaviour:
- {fileID: 796092474901863576, guid: fe567d9733d824344ac702ea96d93a93, type: 3}
- {fileID: 2695972272465249242, guid: 15779da816ed35141891224b0f894832, type: 3}
- {fileID: 3042661451837740866, guid: 266f7f21a3d83ef4593daba2c354d4c5, type: 3}
slideShine: {fileID: 9100000, guid: c28f56116f6dc34408d6f0f544f1e2cc, type: 2}
BreakShine: {fileID: 9100000, guid: c28f56116f6dc34408d6f0f544f1e2cc, type: 2}
HoldShine: {fileID: 9100000, guid: 3fcb4587ef8c7f141969450782191592, type: 2}
diffText: {fileID: 295904848}
levelText: {fileID: 1130077457}
titleText: {fileID: 494240256}
Expand Down
16 changes: 13 additions & 3 deletions Assets/Scripts/JsonDataLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ public class JsonDataLoader : MonoBehaviour
public GameObject notes;
public GameObject star_slidePrefab;
public GameObject[] slidePrefab;
public RuntimeAnimatorController slideShine;
public RuntimeAnimatorController BreakShine;
public RuntimeAnimatorController HoldShine;

public Text diffText;
public Text levelText;
Expand Down Expand Up @@ -91,6 +92,8 @@ public void LoadJson(string json, float ignoreOffset)
NDCompo.exSpr = customSkin.Tap_Ex;
}

NDCompo.BreakShine = BreakShine;

if (timing.noteList.Count > 1) NDCompo.isEach = true;
NDCompo.isBreak = note.isBreak;
NDCompo.isEX = note.isEx;
Expand All @@ -108,6 +111,9 @@ public void LoadJson(string json, float ignoreOffset)
NDCompo.exSpr = customSkin.Hold_Ex;
NDCompo.breakSpr = customSkin.Hold_Break;

NDCompo.HoldShine = HoldShine;
NDCompo.BreakShine = BreakShine;

if (timing.noteList.Count > 1) NDCompo.isEach = true;
NDCompo.time = (float)timing.time;
NDCompo.lastFor = (float)note.holdTime;
Expand Down Expand Up @@ -484,6 +490,8 @@ void InstantiateWifi(SimaiTimingPoint timing, SimaiNote note, bool isGroupPart,
NDCompo.breakSpr_Double = customSkin.Star_Break_Double;
NDCompo.exSpr_Double = customSkin.Star_Ex_Double;

NDCompo.BreakShine = BreakShine;

NDCompo.rotateSpeed = (float)note.slideTime;
NDCompo.isEX = note.isEx;
NDCompo.isBreak = note.isBreak;
Expand All @@ -496,7 +504,7 @@ void InstantiateWifi(SimaiTimingPoint timing, SimaiNote note, bool isGroupPart,
WifiCompo.normalStar = customSkin.Star;
WifiCompo.eachStar = customSkin.Star_Each;
WifiCompo.breakStar = customSkin.Star_Break;
WifiCompo.slideShine = slideShine;
WifiCompo.slideShine = BreakShine;

if (timing.noteList.Count > 1)
{
Expand Down Expand Up @@ -556,6 +564,8 @@ void InstantiateStar(SimaiTimingPoint timing, SimaiNote note, bool isGroupPart,
NDCompo.breakSpr_Double = customSkin.Star_Break_Double;
NDCompo.exSpr_Double = customSkin.Star_Ex_Double;

NDCompo.BreakShine = BreakShine;

NDCompo.rotateSpeed = (float)note.slideTime;
NDCompo.isEX = note.isEx;
NDCompo.isBreak = note.isBreak;
Expand All @@ -575,7 +585,7 @@ void InstantiateStar(SimaiTimingPoint timing, SimaiNote note, bool isGroupPart,
SliCompo.spriteNormal = customSkin.Slide;
SliCompo.spriteEach = customSkin.Slide_Each;
SliCompo.spriteBreak = customSkin.Slide_Break;
SliCompo.slideShine = slideShine;
SliCompo.slideShine = BreakShine;

if (timing.noteList.Count > 1)
{
Expand Down
Loading

0 comments on commit 80f8e27

Please sign in to comment.