diff --git a/Assets/Resources/Sfx/games/totemClimb/intoa.wav b/Assets/Resources/Sfx/games/totemClimb/intoa.wav new file mode 100644 index 000000000..63056d552 Binary files /dev/null and b/Assets/Resources/Sfx/games/totemClimb/intoa.wav differ diff --git a/Assets/Resources/Sfx/games/totemClimb/intoa.wav.meta b/Assets/Resources/Sfx/games/totemClimb/intoa.wav.meta new file mode 100644 index 000000000..bf70bec84 --- /dev/null +++ b/Assets/Resources/Sfx/games/totemClimb/intoa.wav.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 0e89e71edcbeb794083ce7ac4f217b27 +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: diff --git a/Assets/Resources/Sfx/games/totemClimb/intob.wav b/Assets/Resources/Sfx/games/totemClimb/intob.wav new file mode 100644 index 000000000..5ce319a9e Binary files /dev/null and b/Assets/Resources/Sfx/games/totemClimb/intob.wav differ diff --git a/Assets/Resources/Sfx/games/totemClimb/intob.wav.meta b/Assets/Resources/Sfx/games/totemClimb/intob.wav.meta new file mode 100644 index 000000000..df376768e --- /dev/null +++ b/Assets/Resources/Sfx/games/totemClimb/intob.wav.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 4e6227f24ca07b74bbf00ec321a0967e +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: diff --git a/Assets/Resources/Sfx/games/totemClimb/outa.wav b/Assets/Resources/Sfx/games/totemClimb/outa.wav new file mode 100644 index 000000000..3bb1c1a9a Binary files /dev/null and b/Assets/Resources/Sfx/games/totemClimb/outa.wav differ diff --git a/Assets/Resources/Sfx/games/totemClimb/outa.wav.meta b/Assets/Resources/Sfx/games/totemClimb/outa.wav.meta new file mode 100644 index 000000000..5610495c2 --- /dev/null +++ b/Assets/Resources/Sfx/games/totemClimb/outa.wav.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: b5b7c591a7c8c1f4cb53eb5153b33033 +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: diff --git a/Assets/Resources/Sfx/games/totemClimb/outb.wav b/Assets/Resources/Sfx/games/totemClimb/outb.wav new file mode 100644 index 000000000..6253e770f Binary files /dev/null and b/Assets/Resources/Sfx/games/totemClimb/outb.wav differ diff --git a/Assets/Resources/Sfx/games/totemClimb/outb.wav.meta b/Assets/Resources/Sfx/games/totemClimb/outb.wav.meta new file mode 100644 index 000000000..7cbd05563 --- /dev/null +++ b/Assets/Resources/Sfx/games/totemClimb/outb.wav.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 6e3f859a92751884abdd001657e7a3d5 +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: diff --git a/Assets/Resources/Sfx/games/totemClimb/totemlandb.wav b/Assets/Resources/Sfx/games/totemClimb/totemlandb.wav new file mode 100644 index 000000000..99bc6a55a Binary files /dev/null and b/Assets/Resources/Sfx/games/totemClimb/totemlandb.wav differ diff --git a/Assets/Resources/Sfx/games/totemClimb/totemlandb.wav.meta b/Assets/Resources/Sfx/games/totemClimb/totemlandb.wav.meta new file mode 100644 index 000000000..1844f032b --- /dev/null +++ b/Assets/Resources/Sfx/games/totemClimb/totemlandb.wav.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 2d3b5d4a64b9ea84b92eff58435881d7 +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: diff --git a/Assets/Resources/Sprites/Games/TotemClimb/Animations/Jumper/Bop.anim b/Assets/Resources/Sprites/Games/TotemClimb/Animations/Jumper/Bop.anim new file mode 100644 index 000000000..2dbe2c2da --- /dev/null +++ b/Assets/Resources/Sprites/Games/TotemClimb/Animations/Jumper/Bop.anim @@ -0,0 +1,53 @@ +%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: Bop + serializedVersion: 6 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: [] + m_PositionCurves: [] + m_ScaleCurves: [] + m_FloatCurves: [] + 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: [] + pptrCurveMapping: [] + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 1 + 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: [] + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 0 + m_HasMotionFloatCurves: 0 + m_Events: [] diff --git a/Assets/Resources/Sprites/Games/TotemClimb/Animations/Jumper/Bop.anim.meta b/Assets/Resources/Sprites/Games/TotemClimb/Animations/Jumper/Bop.anim.meta new file mode 100644 index 000000000..cc5e2b5b4 --- /dev/null +++ b/Assets/Resources/Sprites/Games/TotemClimb/Animations/Jumper/Bop.anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1e65bfd8d36db3f48a3361506d2b8174 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 7400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Sprites/Games/TotemClimb/totemclimb.png b/Assets/Resources/Sprites/Games/TotemClimb/totemclimb.png index d731d4554..98218527e 100644 Binary files a/Assets/Resources/Sprites/Games/TotemClimb/totemclimb.png and b/Assets/Resources/Sprites/Games/TotemClimb/totemclimb.png differ diff --git a/Assets/Resources/Sprites/Games/TotemClimb/totemclimb.png.meta b/Assets/Resources/Sprites/Games/TotemClimb/totemclimb.png.meta index 45f65803c..5c0b9249b 100644 --- a/Assets/Resources/Sprites/Games/TotemClimb/totemclimb.png.meta +++ b/Assets/Resources/Sprites/Games/TotemClimb/totemclimb.png.meta @@ -293,6 +293,69 @@ TextureImporter: indices: edges: [] weights: [] + - serializedVersion: 2 + name: frog0 + rect: + serializedVersion: 2 + x: 1139 + y: 1476 + width: 511 + height: 634 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: 4b012e8e4fbff8d4a85f0ab091cfdc71 + internalID: -1549223093 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: frog1 + rect: + serializedVersion: 2 + x: 1741 + y: 1595 + width: 433 + height: 655 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: 5cc21a368d8dba547b4f2d4f4bbaa124 + internalID: -1752908610 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: frog2 + rect: + serializedVersion: 2 + x: 2252 + y: 1484 + width: 509 + height: 886 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: aa5f0fe89391f2e45a5a46fe0f46dd0c + internalID: -1228472510 + vertices: [] + indices: + edges: [] + weights: [] outline: [] physicsShape: [] bones: [] @@ -306,6 +369,9 @@ TextureImporter: nameFileIdTable: foot0: -774751624 foot1: 2050925680 + frog0: -1549223093 + frog1: -1752908610 + frog2: -1228472510 jumper0: -477173263 jumper1: -825022746 totem0: 1921032003 diff --git a/Assets/Scripts/Games/TotemClimb/TCJumper.cs b/Assets/Scripts/Games/TotemClimb/TCJumper.cs index c500b7970..b3f5102c3 100644 --- a/Assets/Scripts/Games/TotemClimb/TCJumper.cs +++ b/Assets/Scripts/Games/TotemClimb/TCJumper.cs @@ -42,6 +42,10 @@ namespace HeavenStudio.Games.Scripts_TotemClimb _game.ScheduleInput(beat, 1, Minigame.InputAction_BasicPress, Just, Miss, Empty); } + public void Bop() + { + _anim.DoScaledAnimationAsync("Bop", 0.5f); + } private IEnumerator JumpCo(double beat) { diff --git a/Assets/Scripts/Games/TotemClimb/TotemClimb.cs b/Assets/Scripts/Games/TotemClimb/TotemClimb.cs index ef9d661a2..ace39d990 100644 --- a/Assets/Scripts/Games/TotemClimb/TotemClimb.cs +++ b/Assets/Scripts/Games/TotemClimb/TotemClimb.cs @@ -17,10 +17,21 @@ namespace HeavenStudio.Games.Loaders new("start", "Start Jumping") { + }, + new("triple", "Triple Jumping") + { + defaultLength = 2f, + resizable = true }, new("stop", "Stop Jumping") { + }, + new("bop", "Bop") + { + function = delegate { TotemClimb.instance.Bop(eventCaller.currentEntity.beat, eventCaller.currentEntity.length, eventCaller.currentEntity.beat); }, + resizable = true, + defaultLength = 4f } }); } @@ -55,6 +66,7 @@ namespace HeavenStudio.Games public override void OnGameSwitch(double beat) { CalculateStartAndEndBeat(beat); + HandleBopsOnStart(beat); } public override void OnPlay(double beat) @@ -64,6 +76,7 @@ namespace HeavenStudio.Games if (allGameSwitches.Count > 0) lastGameSwitchBeat = allGameSwitches[^1].beat; CalculateStartAndEndBeat(lastGameSwitchBeat); + HandleBopsOnStart(beat); } private void CalculateStartAndEndBeat(double beat) @@ -93,6 +106,14 @@ namespace HeavenStudio.Games _totemManager.InitBeats(_startBeat); } + private void HandleBopsOnStart(double beat) + { + var e = EventCaller.GetAllInGameManagerList("totemClimb", new string[] { "bop" }).Find(x => x.beat < beat && x.beat + x.length > beat); + if (e == null) return; + + Bop(e.beat, e.length, beat); + } + private void Update() { var cond = Conductor.instance; @@ -105,6 +126,29 @@ namespace HeavenStudio.Games _totemManager.BopTotemAtBeat(beat); } + public void Bop(double beat, float length, double callBeat) + { + List actions = new(); + + for (int i = 0; i < length; i++) + { + double bopBeat = beat + i; + if (bopBeat < callBeat) continue; + actions.Add(new(bopBeat, delegate + { + BopJumper(bopBeat); + })); + } + + if (actions.Count > 0) BeatAction.New(this, actions); + } + + private void BopJumper(double beat) + { + if (beat >= _startBeat && beat < _endBeat) return; + _jumper.Bop(); + } + private void ScrollUpdate(Conductor cond) { if (_startBeat == double.MaxValue) return;