bopping and new assets

This commit is contained in:
Rapandrasmus 2023-12-25 22:05:46 +01:00
parent 021595ba25
commit ef82eef423
16 changed files with 285 additions and 0 deletions

Binary file not shown.

View file

@ -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:

Binary file not shown.

View file

@ -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:

Binary file not shown.

View file

@ -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:

Binary file not shown.

View file

@ -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:

Binary file not shown.

View file

@ -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:

View file

@ -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: []

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 1e65bfd8d36db3f48a3361506d2b8174
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 7400000
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 302 KiB

After

Width:  |  Height:  |  Size: 518 KiB

View file

@ -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

View file

@ -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)
{

View file

@ -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<BeatAction.Action> 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;