diff --git a/Assets/Resources/Prefabs/Games/AnimalAcrobat/Elephant.prefab b/Assets/Resources/Prefabs/Games/AnimalAcrobat/Elephant.prefab index c22eafcc0..8bd34bb98 100644 --- a/Assets/Resources/Prefabs/Games/AnimalAcrobat/Elephant.prefab +++ b/Assets/Resources/Prefabs/Games/AnimalAcrobat/Elephant.prefab @@ -563,7 +563,8 @@ MonoBehaviour: m_EditorClassIdentifier: _fullRotRange: 160 _holdLength: 2 - _ease: 22 + _ease: 4 + _holdPadding: 1 _rotateRoot: {fileID: 2616646720197201304} _gripPoint: {fileID: 2131794628642567477} --- !u!114 &-4645702950898394595 diff --git a/Assets/Resources/Prefabs/Games/AnimalAcrobat/Giraffe.prefab b/Assets/Resources/Prefabs/Games/AnimalAcrobat/Giraffe.prefab index 31590f38d..d84efa6cf 100644 --- a/Assets/Resources/Prefabs/Games/AnimalAcrobat/Giraffe.prefab +++ b/Assets/Resources/Prefabs/Games/AnimalAcrobat/Giraffe.prefab @@ -305,6 +305,7 @@ MonoBehaviour: _fullRotRange: 160 _holdLength: 4 _ease: 4 + _holdPadding: 1 _rotateRoot: {fileID: 4208995891253938729} _gripPoint: {fileID: 8714220451416272075} --- !u!114 &3253363150451868373 diff --git a/Assets/Resources/Prefabs/Games/AnimalAcrobat/WhiteMonkey.prefab b/Assets/Resources/Prefabs/Games/AnimalAcrobat/WhiteMonkey.prefab index fa44dd869..b6cd0ddac 100644 --- a/Assets/Resources/Prefabs/Games/AnimalAcrobat/WhiteMonkey.prefab +++ b/Assets/Resources/Prefabs/Games/AnimalAcrobat/WhiteMonkey.prefab @@ -163,7 +163,8 @@ MonoBehaviour: m_EditorClassIdentifier: _fullRotRange: 160 _holdLength: 1 - _ease: 22 + _ease: 10 + _holdPadding: 0.25 _rotateRoot: {fileID: 2068126119450832752} _gripPoint: {fileID: 8286548847234487440} --- !u!114 &3772265357728581139 diff --git a/Assets/Resources/Prefabs/Games/AnimalAcrobat/WhiteMonkeys.prefab b/Assets/Resources/Prefabs/Games/AnimalAcrobat/WhiteMonkeys.prefab index a2501d567..263987e78 100644 --- a/Assets/Resources/Prefabs/Games/AnimalAcrobat/WhiteMonkeys.prefab +++ b/Assets/Resources/Prefabs/Games/AnimalAcrobat/WhiteMonkeys.prefab @@ -649,7 +649,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 3530077400513613063} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 1.649568, y: 0.44255477, z: 0.13394769} + m_LocalPosition: {x: 2.599568, y: 0.44255477, z: 0.13394769} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: @@ -1116,7 +1116,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 5202088941643817628} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 1.65, y: 0.53, z: 0.13394769} + m_LocalPosition: {x: 2.6, y: 0.53, z: 0.13394769} m_LocalScale: {x: 0.75091, y: 0.75091, z: 0.75091} m_ConstrainProportionsScale: 0 m_Children: [] @@ -1932,9 +1932,11 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 2f9ee457016acdc4eb5dbfdc03be0d6f, type: 3} m_Name: m_EditorClassIdentifier: - _fullRotRange: 160 + _fullRotRange: 170 _holdLength: 3 - _ease: 22 + _ease: 10 + _holdPadding: 0.5 + _holdPaddingStart: 0.5 _rotateRoot: {fileID: 3903953954711634507} _gripPoint: {fileID: 3800820123473635694} --- !u!114 &3068772248330600904 @@ -1965,8 +1967,8 @@ MonoBehaviour: m_EditorClassIdentifier: _anim: {fileID: 8483464683545527156} _animLength: 0.6785714 - _beatLength: 3 - _ease: 22 + _beatLength: 2.5 + _ease: 0 --- !u!1 &8302616130811808557 GameObject: m_ObjectHideFlags: 0 @@ -1992,7 +1994,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 8302616130811808557} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 1.914, y: 1.959, z: 0.13394769} + m_LocalPosition: {x: 2.864, y: 1.959, z: 0.13394769} m_LocalScale: {x: 0.75091, y: 0.75091, z: 0.75091} m_ConstrainProportionsScale: 0 m_Children: [] diff --git a/Assets/Scripts/Games/AnimalAcrobat/AcrobatObstacle.cs b/Assets/Scripts/Games/AnimalAcrobat/AcrobatObstacle.cs index a2701b9e6..9ad06835d 100644 --- a/Assets/Scripts/Games/AnimalAcrobat/AcrobatObstacle.cs +++ b/Assets/Scripts/Games/AnimalAcrobat/AcrobatObstacle.cs @@ -15,6 +15,8 @@ namespace HeavenStudio.Games.Scripts_AnimalAcrobat [SerializeField] private float _fullRotRange; [SerializeField] private double _holdLength; [SerializeField] private EasingFunction.Ease _ease = EasingFunction.Ease.EaseInOutQuad; + [SerializeField] private double _holdPadding = 0.5; + [SerializeField] private double _holdPaddingStart = 0; private double _startBeat; private double _expirationBeat = -1; @@ -57,7 +59,7 @@ namespace HeavenStudio.Games.Scripts_AnimalAcrobat var cond = Conductor.instance; if (!cond.isPlaying) return; - float normalNoMod = Mathf.Abs(cond.GetPositionFromBeat(_startBeat, _holdLength)); + float normalNoMod = Mathf.Abs(cond.GetPositionFromBeat(_startBeat - _holdPaddingStart, _holdLength + _holdPadding + _holdPaddingStart)); float normalizedBeat = normalNoMod % 1; @@ -68,11 +70,6 @@ namespace HeavenStudio.Games.Scripts_AnimalAcrobat float newAngleZ = _func(-_halfRotRange, _halfRotRange, normalizedBeat); _rotateRoot.localEulerAngles = new Vector3(0, 0, newAngleZ); - - if (cond.songPositionInBeatsAsDouble >= _expirationBeat) - { - gameObject.SetActive(false); - } } public bool IsAvailableAtBeat(double beat)