water speed
finally fixed this once and for all i think
This commit is contained in:
parent
58b844c3f0
commit
30564a9c68
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
BIN
Assets/Resources/Sfx/games/chargingChicken/inputJust.ogg
Normal file
BIN
Assets/Resources/Sfx/games/chargingChicken/inputJust.ogg
Normal file
Binary file not shown.
|
@ -0,0 +1,22 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 26ab1cf6d1db6bd408a5ca6bee1b3cc6
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 6
|
||||
defaultSettings:
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 1
|
||||
conversionMode: 0
|
||||
platformSettingOverrides: {}
|
||||
forceToMono: 0
|
||||
normalize: 1
|
||||
preloadAudioData: 1
|
||||
loadInBackground: 0
|
||||
ambisonic: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -48,6 +48,32 @@ AnimatorController:
|
|||
m_IKPass: 0
|
||||
m_SyncedLayerAffectsTiming: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
--- !u!1102 &181333935702724361
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: AntiScroll
|
||||
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: 1a494cc2a7c7a424a8eca3b016a4b0a2, type: 2}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1107 &592504463933430062
|
||||
AnimatorStateMachine:
|
||||
serializedVersion: 6
|
||||
|
@ -63,6 +89,9 @@ AnimatorStateMachine:
|
|||
- serializedVersion: 1
|
||||
m_State: {fileID: 7933384837640181812}
|
||||
m_Position: {x: 300, y: 100, z: 0}
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: 181333935702724361}
|
||||
m_Position: {x: 300, y: 200, z: 0}
|
||||
m_ChildStateMachines: []
|
||||
m_AnyStateTransitions: []
|
||||
m_EntryTransitions: []
|
||||
|
|
|
@ -0,0 +1,116 @@
|
|||
%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: WaterScrollRev
|
||||
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.97
|
||||
inSlope: 118.20011
|
||||
outSlope: 5.91
|
||||
tangentMode: 69
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 0.33333334
|
||||
value: 0
|
||||
inSlope: 5.91
|
||||
outSlope: 118.20011
|
||||
tangentMode: 69
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_AnchoredPosition.x
|
||||
path:
|
||||
classID: 224
|
||||
script: {fileID: 0}
|
||||
m_PPtrCurves: []
|
||||
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: 1460864421
|
||||
script: {fileID: 0}
|
||||
typeID: 224
|
||||
customType: 28
|
||||
isPPtrCurve: 0
|
||||
pptrCurveMapping: []
|
||||
m_AnimationClipSettings:
|
||||
serializedVersion: 2
|
||||
m_AdditiveReferencePoseClip: {fileID: 0}
|
||||
m_AdditiveReferencePoseTime: 0
|
||||
m_StartTime: 0
|
||||
m_StopTime: 0.33333334
|
||||
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.97
|
||||
inSlope: 118.20011
|
||||
outSlope: 5.91
|
||||
tangentMode: 69
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 0.33333334
|
||||
value: 0
|
||||
inSlope: 5.91
|
||||
outSlope: 118.20011
|
||||
tangentMode: 69
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_AnchoredPosition.x
|
||||
path:
|
||||
classID: 224
|
||||
script: {fileID: 0}
|
||||
m_EulerEditorCurves: []
|
||||
m_HasGenericRootTransform: 0
|
||||
m_HasMotionFloatCurves: 0
|
||||
m_Events: []
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 1a494cc2a7c7a424a8eca3b016a4b0a2
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 7400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -26851,7 +26851,7 @@ MonoBehaviour:
|
|||
m_HandleRect: {fileID: 1589389271}
|
||||
m_Direction: 2
|
||||
m_Value: 1
|
||||
m_Size: 0.9997105
|
||||
m_Size: 1
|
||||
m_NumberOfSteps: 0
|
||||
m_OnValueChanged:
|
||||
m_PersistentCalls:
|
||||
|
|
|
@ -139,6 +139,8 @@ namespace HeavenStudio.Games
|
|||
bool isInputting = false;
|
||||
bool canBlastOff = false;
|
||||
|
||||
bool flowForward = true;
|
||||
|
||||
double bgColorStartBeat = -1;
|
||||
float bgColorLength = 0;
|
||||
double fgLightStartBeat = -1;
|
||||
|
@ -437,14 +439,30 @@ namespace HeavenStudio.Games
|
|||
isInputting = false; //stops the drums
|
||||
}
|
||||
|
||||
if (nextIsland.isMoving)
|
||||
//chicken/water movement speed
|
||||
{
|
||||
float newAnimScale = Util.EasingFunction.EaseOutQuad(1, 0, nextIsland.value1);
|
||||
ChickenAnim.SetScaledAnimationSpeed((newAnimScale * 0.8f) + 0.2f);
|
||||
WaterAnim.SetScaledAnimationSpeed((nextIsland.speed1) + (nextIsland.speed2) + 0.2f);
|
||||
if (nextIsland.isMoving) ChickenAnim.SetScaledAnimationSpeed((newAnimScale * 0.8f) + 0.4f);
|
||||
float waterFlowSpeed = (nextIsland.speed1 / 5.83f) + ((1f / Conductor.instance.pitchedSecPerBeat) * 0.2f);
|
||||
if ((-waterFlowSpeed) - ((1f / Conductor.instance.pitchedSecPerBeat) * 0.4f) < 0)
|
||||
{
|
||||
if (waterFlowSpeed > 0) WaterAnim.speed = waterFlowSpeed;
|
||||
if (!flowForward)
|
||||
{
|
||||
WaterAnim.DoScaledAnimationAsync("Scroll", waterFlowSpeed);
|
||||
flowForward = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((-waterFlowSpeed) - ((1f / Conductor.instance.pitchedSecPerBeat) * 0.4f) > 0) WaterAnim.speed = (-waterFlowSpeed) - ((1f / Conductor.instance.pitchedSecPerBeat) * 0.4f);
|
||||
if (flowForward)
|
||||
{
|
||||
WaterAnim.DoScaledAnimationAsync("AntiScroll", (-waterFlowSpeed) - ((1f / Conductor.instance.pitchedSecPerBeat) * 0.4f));
|
||||
flowForward = false;
|
||||
}
|
||||
}
|
||||
|
||||
//bubble shrinkage
|
||||
if (bubbleSizeChangeStart < Conductor.instance.songPositionInBeatsAsDouble && Conductor.instance.songPositionInBeatsAsDouble <= bubbleSizeChangeEnd)
|
||||
{
|
||||
float value = (Conductor.instance.GetPositionFromBeat(bubbleSizeChangeStart, bubbleSizeChangeEnd - bubbleSizeChangeStart));
|
||||
|
@ -586,6 +604,7 @@ namespace HeavenStudio.Games
|
|||
{
|
||||
//sound
|
||||
isInputting = true; //starts the drums
|
||||
//SoundByte.PlayOneShotGame("chargingChicken/inputJust", pitch: 0.9f, volume: 0.8f); //TO DO: maybe change this
|
||||
|
||||
//chicken animation
|
||||
ChickenAnim.DoScaledAnimationAsync("Charge", 0.5f);
|
||||
|
@ -601,6 +620,7 @@ namespace HeavenStudio.Games
|
|||
isInputting = true; //starts the drums
|
||||
SoundByte.PlayOneShotGame("chargingChicken/kick");
|
||||
SoundByte.PlayOneShotGame("chargingChicken/hihat");
|
||||
//SoundByte.PlayOneShotGame("chargingChicken/inputJust", pitch: 0.9f, volume: 0.8f); //TO DO: maybe change this
|
||||
|
||||
//chicken animation
|
||||
ChickenAnim.DoScaledAnimationAsync("Charge", 0.5f);
|
||||
|
@ -922,10 +942,10 @@ namespace HeavenStudio.Games
|
|||
BeatAction.New(GameManager.instance, new List<BeatAction.Action>()
|
||||
{
|
||||
new BeatAction.Action(nextIsland.respawnEnd, delegate {
|
||||
staleIsland.isRespawning = false;
|
||||
if (staleIsland != null) staleIsland.isRespawning = false;
|
||||
currentIsland.isRespawning = false;
|
||||
nextIsland.isRespawning = false;
|
||||
staleIsland.FakeChickenAnim.DoScaledAnimationAsync("Idle", 0.5f);
|
||||
if (staleIsland != null) staleIsland.FakeChickenAnim.DoScaledAnimationAsync("Idle", 0.5f);
|
||||
currentIsland.FakeChickenAnim.DoScaledAnimationAsync("Idle", 0.5f);
|
||||
nextIsland.FakeChickenAnim.DoScaledAnimationAsync("Idle", 0.5f);
|
||||
foreach (var a in stonePlatformJourney)
|
||||
|
|
|
@ -54,6 +54,8 @@ namespace HeavenStudio.Games.Scripts_ChargingChicken
|
|||
|
||||
private void Update()
|
||||
{
|
||||
float previousPosition = IslandPos.localPosition.x;
|
||||
|
||||
if (isMoving)
|
||||
{
|
||||
value1 = (Conductor.instance.GetPositionFromBeat(journeyBlastOffTime, journeyLength));
|
||||
|
@ -76,6 +78,9 @@ namespace HeavenStudio.Games.Scripts_ChargingChicken
|
|||
});
|
||||
canFall = false;
|
||||
}
|
||||
|
||||
float currentPosition = IslandPos.localPosition.x;
|
||||
speed1 = (previousPosition - currentPosition) / Time.deltaTime;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
Loading…
Reference in a new issue