diff --git a/Assets/Resources/Sprites/Editor/GameIcons/totemClimb.png b/Assets/Resources/Sprites/Editor/GameIcons/totemClimb.png new file mode 100644 index 000000000..af01e630a Binary files /dev/null and b/Assets/Resources/Sprites/Editor/GameIcons/totemClimb.png differ diff --git a/Assets/Resources/Sprites/Editor/GameIcons/totemClimb.png.meta b/Assets/Resources/Sprites/Editor/GameIcons/totemClimb.png.meta new file mode 100644 index 000000000..fd7ad5909 --- /dev/null +++ b/Assets/Resources/Sprites/Editor/GameIcons/totemClimb.png.meta @@ -0,0 +1,123 @@ +fileFormatVersion: 2 +guid: 677ab5743215f2549890713845698c06 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 1 + enableMipMap: 1 + 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 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 8 + 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 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 256 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Sprites/Editor/GameIcons/totemClimb_mask.png b/Assets/Resources/Sprites/Editor/GameIcons/totemClimb_mask.png new file mode 100644 index 000000000..181c0eeb7 Binary files /dev/null and b/Assets/Resources/Sprites/Editor/GameIcons/totemClimb_mask.png differ diff --git a/Assets/Resources/Sprites/Editor/GameIcons/totemClimb_mask.png.meta b/Assets/Resources/Sprites/Editor/GameIcons/totemClimb_mask.png.meta new file mode 100644 index 000000000..f9e56820c --- /dev/null +++ b/Assets/Resources/Sprites/Editor/GameIcons/totemClimb_mask.png.meta @@ -0,0 +1,123 @@ +fileFormatVersion: 2 +guid: ee8850e76cafc77448ed900b9de4c966 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 1 + enableMipMap: 1 + 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 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMasterTextureLimit: 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 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 256 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Sprites/Games/TotemClimb/Animations/Frog/Wings.anim b/Assets/Resources/Sprites/Games/TotemClimb/Animations/Frog/Wings.anim index fed38afa3..ae84345c9 100644 --- a/Assets/Resources/Sprites/Games/TotemClimb/Animations/Frog/Wings.anim +++ b/Assets/Resources/Sprites/Games/TotemClimb/Animations/Frog/Wings.anim @@ -29,15 +29,6 @@ AnimationClip: weightedMode: 0 inWeight: 0 outWeight: 0 - - serializedVersion: 3 - time: 0.25 - value: 1 - inSlope: Infinity - outSlope: Infinity - tangentMode: 103 - weightedMode: 0 - inWeight: 0 - outWeight: 0 m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 @@ -57,15 +48,6 @@ AnimationClip: weightedMode: 0 inWeight: 0 outWeight: 0 - - serializedVersion: 3 - time: 0.25 - value: 1 - inSlope: Infinity - outSlope: Infinity - tangentMode: 103 - weightedMode: 0 - inWeight: 0 - outWeight: 0 m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 @@ -76,22 +58,14 @@ AnimationClip: m_PPtrCurves: - curve: - time: 0 - value: {fileID: -591290891, guid: 82ecf7d34cdde82478c1c03c649f7827, type: 3} - - time: 0.11666667 value: {fileID: -470877788, guid: 82ecf7d34cdde82478c1c03c649f7827, type: 3} - - time: 0.25 - value: {fileID: -591290891, guid: 82ecf7d34cdde82478c1c03c649f7827, type: 3} attribute: m_Sprite path: right/frog/wingright (1) classID: 212 script: {fileID: 0} - curve: - time: 0 - value: {fileID: -591290891, guid: 82ecf7d34cdde82478c1c03c649f7827, type: 3} - - time: 0.11666667 value: {fileID: -470877788, guid: 82ecf7d34cdde82478c1c03c649f7827, type: 3} - - time: 0.25 - value: {fileID: -591290891, guid: 82ecf7d34cdde82478c1c03c649f7827, type: 3} attribute: m_Sprite path: left/frog/wingright classID: 212 @@ -132,18 +106,14 @@ AnimationClip: customType: 23 isPPtrCurve: 1 pptrCurveMapping: - - {fileID: -591290891, guid: 82ecf7d34cdde82478c1c03c649f7827, type: 3} - {fileID: -470877788, guid: 82ecf7d34cdde82478c1c03c649f7827, type: 3} - - {fileID: -591290891, guid: 82ecf7d34cdde82478c1c03c649f7827, type: 3} - - {fileID: -591290891, guid: 82ecf7d34cdde82478c1c03c649f7827, type: 3} - {fileID: -470877788, guid: 82ecf7d34cdde82478c1c03c649f7827, type: 3} - - {fileID: -591290891, guid: 82ecf7d34cdde82478c1c03c649f7827, type: 3} m_AnimationClipSettings: serializedVersion: 2 m_AdditiveReferencePoseClip: {fileID: 0} m_AdditiveReferencePoseTime: 0 m_StartTime: 0 - m_StopTime: 0.26666668 + m_StopTime: 0.016666668 m_OrientationOffsetY: 0 m_Level: 0 m_CycleOffset: 0 @@ -171,15 +141,6 @@ AnimationClip: weightedMode: 0 inWeight: 0 outWeight: 0 - - serializedVersion: 3 - time: 0.25 - value: 1 - inSlope: Infinity - outSlope: Infinity - tangentMode: 103 - weightedMode: 0 - inWeight: 0 - outWeight: 0 m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 @@ -199,15 +160,6 @@ AnimationClip: weightedMode: 0 inWeight: 0 outWeight: 0 - - serializedVersion: 3 - time: 0.25 - value: 1 - inSlope: Infinity - outSlope: Infinity - tangentMode: 103 - weightedMode: 0 - inWeight: 0 - outWeight: 0 m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 diff --git a/Assets/Scripts/Games/TotemClimb/TCBackgroundManager.cs b/Assets/Scripts/Games/TotemClimb/TCBackgroundManager.cs index 2d142d0a0..1f1c14fff 100644 --- a/Assets/Scripts/Games/TotemClimb/TCBackgroundManager.cs +++ b/Assets/Scripts/Games/TotemClimb/TCBackgroundManager.cs @@ -62,9 +62,9 @@ namespace HeavenStudio.Games.Scripts_TotemClimb { b.localPosition += new Vector3(-Time.deltaTime * moveSpeed, 0); - if (b.localPosition.x <= _xDistance * -BACKGROUND_OBJECT_AMOUNT / 2) + if (b.localPosition.x <= _xDistance * -(BACKGROUND_OBJECT_AMOUNT + 2) / 2) { - b.localPosition = new Vector3(_xDistance * BACKGROUND_OBJECT_AMOUNT / 2, b.localPosition.y, b.localPosition.z); + b.localPosition = new Vector3(_xDistance * (BACKGROUND_OBJECT_AMOUNT + 2) / 2, b.localPosition.y, b.localPosition.z); } } } diff --git a/Assets/Scripts/Games/TotemClimb/TCJumper.cs b/Assets/Scripts/Games/TotemClimb/TCJumper.cs index 9e5340402..fb2923e97 100644 --- a/Assets/Scripts/Games/TotemClimb/TCJumper.cs +++ b/Assets/Scripts/Games/TotemClimb/TCJumper.cs @@ -151,6 +151,7 @@ namespace HeavenStudio.Games.Scripts_TotemClimb normalizedBeat = Conductor.instance.GetPositionFromBeat(beat, _path.positions[0].duration); yield return null; } + transform.position = GetPathPositionFromBeat(_path, beat + _path.positions[0].duration, beat); _anim.Play("Idle", 0, 0); if (beat + 1 >= _onPlayBeat && _game.EndBeat <= beat + 1) { @@ -264,6 +265,7 @@ namespace HeavenStudio.Games.Scripts_TotemClimb normalizedBeat = Conductor.instance.GetPositionFromBeat(beat, _path.positions[0].duration); yield return null; } + transform.position = GetPathPositionFromBeat(_path, beat + _path.positions[0].duration, beat); _anim.Play("Idle", 0, 0); _highParticle.Stop(); _highMissParticle.Stop(); diff --git a/Assets/Scripts/Games/TotemClimb/TCPillarManager.cs b/Assets/Scripts/Games/TotemClimb/TCPillarManager.cs index a2b4cb050..b7ca6de3f 100644 --- a/Assets/Scripts/Games/TotemClimb/TCPillarManager.cs +++ b/Assets/Scripts/Games/TotemClimb/TCPillarManager.cs @@ -50,13 +50,13 @@ namespace HeavenStudio.Games.Scripts_TotemClimb _pillars[0].Add(_pillarSecond); _pillars[1].Add(_pillarUp); - if (_pillarFirst.localPosition.y >= _endDistance) + if (_pillarFirst.localPosition.y + _pillarDistanceY >= _endDistance) { _pillarFirst.GetChild(0).gameObject.SetActive(true); _pillarSecond.GetChild(0).gameObject.SetActive(true); _pillarUp.gameObject.SetActive(false); } - else if (_pillarUp.localPosition.y >= _endDistance) + else if (_pillarUp.localPosition.y + _pillarDistanceY >= _endDistance) { _pillarUp.GetChild(0).gameObject.SetActive(true); } @@ -71,7 +71,7 @@ namespace HeavenStudio.Games.Scripts_TotemClimb spawnedPillar.localPosition = new Vector3(_pillarStartX + (_pillarDistanceX * j), spawnedPillar.localPosition.y + (_pillarDistanceY * i)); _pillars[i].Add(spawnedPillar); - if (spawnedPillar.localPosition.y >= _endDistance) + if (spawnedPillar.localPosition.y + _pillarDistanceY >= _endDistance) { spawnedPillar.GetChild(0).gameObject.SetActive(true); _hasReachedEnd = true; @@ -115,7 +115,7 @@ namespace HeavenStudio.Games.Scripts_TotemClimb if (p == null) continue; p.localPosition = new Vector3(p.localPosition.x, p.localPosition.y + (_pillarDistanceY * PILLAR_AMOUNT_Y)); - if (currentDistanceY >= _endDistance) + if (currentDistanceY + _pillarDistanceY >= _endDistance) { p.GetChild(0).gameObject.SetActive(true); _hasReachedEnd = true; diff --git a/Assets/Scripts/Games/TotemClimb/TCTotemManager.cs b/Assets/Scripts/Games/TotemClimb/TCTotemManager.cs index 61f61dd3f..c5ec7eb8e 100644 --- a/Assets/Scripts/Games/TotemClimb/TCTotemManager.cs +++ b/Assets/Scripts/Games/TotemClimb/TCTotemManager.cs @@ -19,9 +19,6 @@ namespace HeavenStudio.Games.Scripts_TotemClimb [SerializeField] private float _yDistance; [SerializeField] private int _totemAmount = 12; - [SerializeField] private Transform _pillarFirst; - [SerializeField] private Transform _pillarSecond; - private Transform _scrollTransform; private float _totemStartX; private float _totemStartY; @@ -47,11 +44,9 @@ namespace HeavenStudio.Games.Scripts_TotemClimb _totemStartX = _totemTransform.localPosition.x; _totemStartY = _totemTransform.localPosition.y; - var pillarYStart = _pillarFirst.localPosition.y; - var pillarYDistance = _pillarSecond.localPosition.y - _pillarFirst.localPosition.y; var pillarEnd = GetPillarEndBeatDistance(); - _pillarEndDistance = pillarEnd + pillarYStart + ((pillarEnd + pillarYStart) % pillarYDistance); + _pillarEndDistance = pillarEnd; _totems.Add(_totemTransform.GetComponent()); @@ -72,6 +67,7 @@ namespace HeavenStudio.Games.Scripts_TotemClimb _totems[i].transform.gameObject.SetActive(_totems[i].beat - (_usingEndTotem ? 0 : 1) < _game.EndBeat && !_game.IsTripleOrHighBeat(_totems[i].beat)); } + bool startBeatParam = GetStartBeatParam(); foreach (var e in _game._tripleEvents) { for (int i = 0; i < e.length; i += 2) @@ -79,7 +75,7 @@ namespace HeavenStudio.Games.Scripts_TotemClimb double beat = e.beat + i; Transform spawnedFrog = Instantiate(_frogTransform, transform); spawnedFrog.transform.localPosition += new Vector3(_xDistance * (float)(beat - startBeat), _yDistance * (float)(beat - startBeat)); - if (spawnedFrog.transform.localPosition.y >= _pillarEndDistance) spawnedFrog.GetComponent().SetHasWings(); + if (spawnedFrog.transform.localPosition.y >= _pillarEndDistance || startBeatParam) spawnedFrog.GetComponent().SetHasWings(); spawnedFrog.gameObject.SetActive(true); spawnedFrog.GetComponent().beat = beat; _frogs.Add(spawnedFrog.GetComponent()); @@ -230,6 +226,25 @@ namespace HeavenStudio.Games.Scripts_TotemClimb if (allPillarEnds.Count == 0) return float.MaxValue; return (float)(allPillarEnds[0].beat - startBeat) * 1.45f; } + + private bool GetStartBeatParam() + { + var allGameSwitches = EventCaller.GetAllInGameManagerList("gameManager", new string[] { "switchGame" }).FindAll(x => x.beat <= Conductor.instance.songPositionInBeatsAsDouble && x.datamodel is "gameManager/switchGame/totemClimb"); + double lastGameSwitchBeat = 0; + if (allGameSwitches.Count > 0) lastGameSwitchBeat = allGameSwitches[^1].beat; + + var nextGameSwitches = EventCaller.GetAllInGameManagerList("gameManager", new string[] { "switchGame" }).FindAll(x => x.beat > lastGameSwitchBeat && x.datamodel != "gameManager/switchGame/totemClimb"); + double nextGameSwitchBeat = double.MaxValue; + if (nextGameSwitches.Count > 0) + { + nextGameSwitchBeat = nextGameSwitches[0].beat; + } + + var allStarts = EventCaller.GetAllInGameManagerList("totemClimb", new string[] { "start" }).FindAll(x => x.beat >= lastGameSwitchBeat && x.beat < nextGameSwitchBeat); + if (allStarts.Count == 0) return false; + + return allStarts[0]["hide"]; + } } } diff --git a/Assets/Scripts/Games/TotemClimb/TotemClimb.cs b/Assets/Scripts/Games/TotemClimb/TotemClimb.cs index c4e4aa010..b24bdc8e1 100644 --- a/Assets/Scripts/Games/TotemClimb/TotemClimb.cs +++ b/Assets/Scripts/Games/TotemClimb/TotemClimb.cs @@ -20,14 +20,23 @@ namespace HeavenStudio.Games.Loaders { parameters = new List() { - new("hide", false, "Hide Pillars") + new("hide", false, "Hide Fence") } }, new("triple", "Triple Jumping") { - preFunction = delegate { TotemClimb.TripleJumpSound(eventCaller.currentEntity.beat, eventCaller.currentEntity.length); }, + preFunction = delegate + { + var e = eventCaller.currentEntity; + TotemClimb.TripleJumpSound(e.beat, e.length, e["enter"], e["exit"]); + }, defaultLength = 2f, - resizable = true + resizable = true, + parameters = new() + { + new("enter", true, "Enter Cue Sound"), + new("exit", true, "Exit Cue Sound"), + } }, new("high", "High Jump") { @@ -57,7 +66,7 @@ namespace HeavenStudio.Games.Loaders new("amount", new EntityTypes.Integer(1, 3, 1), "Amount") } }, - new("above", "Pillar End") + new("above", "Fences End") { }, @@ -377,8 +386,9 @@ namespace HeavenStudio.Games public Transform EndJumperPoint => _totemManager.EndJumperPoint; - public static void TripleJumpSound(double beat, float length) + public static void TripleJumpSound(double beat, float length, bool enterSound, bool exitSound) { + if (!enterSound && !exitSound) return; List triplesGlobal = new(); List highsGlobal = new(); @@ -391,12 +401,6 @@ namespace HeavenStudio.Games new("totemClimb/beatchange", beat - 1f), }; - List soundsExit = new() - { - new("totemClimb/beatchange", beat + length - 2), - new("totemClimb/beatchange", beat + length - 1), - }; - List soundsToPlay = new(); var allGameSwitches = EventCaller.GetAllInGameManagerList("gameManager", new string[] { "switchGame" }).FindAll(x => x.beat <= beat && x.datamodel is "gameManager/switchGame/totemClimb"); @@ -405,7 +409,7 @@ namespace HeavenStudio.Games SetUpEvents(lastGameSwitchBeat); - if (triplesGlobal.Count == 0 || highsGlobal.Count == 0) return; + if (triplesGlobal.Count == 0) return; bool doEnterSound = true; double checkBeatEnter = beat - 1; @@ -418,7 +422,7 @@ namespace HeavenStudio.Games doEnterSound = false; } } - if (doEnterSound) soundsToPlay.AddRange(soundsEnter); + if (doEnterSound && enterSound) soundsToPlay.AddRange(soundsEnter); bool doExitSound = true; double checkBeatExit = beat + length; @@ -431,7 +435,14 @@ namespace HeavenStudio.Games doExitSound = false; } } - if (doExitSound) soundsToPlay.AddRange(soundsExit); + + List soundsExit = new() + { + new("totemClimb/beatchange", checkBeatExit - 2), + new("totemClimb/beatchange", checkBeatExit - 1), + }; + + if (doExitSound && exitSound) soundsToPlay.AddRange(soundsExit); if (soundsToPlay.Count > 0) MultiSound.Play(soundsToPlay.ToArray(), true, true); @@ -460,24 +471,25 @@ namespace HeavenStudio.Games } var highs = EventCaller.GetAllInGameManagerList("totemClimb", new string[] { "high" }).FindAll(x => x.beat >= startBeat && x.beat < endBeat); - if (highs.Count == 0) return; - - highs.Sort((x, y) => x.beat.CompareTo(y.beat)); - - var tempHighs = new List(); - - double goodAfterBeat = startBeat; - - foreach (var h in highs) + if (highs.Count > 0) { - if (h.beat >= goodAfterBeat && IsOnBeat(startBeat, h.beat)) - { - tempHighs.Add(h); - goodAfterBeat = h.beat + 4; - } - } + highs.Sort((x, y) => x.beat.CompareTo(y.beat)); - highsGlobal = tempHighs; + var tempHighs = new List(); + + double goodAfterBeat = startBeat; + + foreach (var h in highs) + { + if (h.beat >= goodAfterBeat && IsOnBeat(startBeat, h.beat)) + { + tempHighs.Add(h); + goodAfterBeat = h.beat + 4; + } + } + + highsGlobal = tempHighs; + } var triples = EventCaller.GetAllInGameManagerList("totemClimb", new string[] { "triple" }).FindAll(x => x.beat >= startBeat && x.beat + x.length <= endBeat); if (triples.Count == 0) return;