mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-12 10:27:37 +02:00
Gameplay: Timing windows use a "smart" BPM scaling system (#86)
* Game: Pajama Party * Pajama Party: bg setup, Mako jump * Pajama Party: mako jumping * Pajama Party: prep landing anim references * Pajama Party: several anims, improved 3d scene * Pajama Party: bg cleanup * Pajama Party: Mako sleeping anims * Pajama Party: All Mako anims, add sounds to fs * Pajama Party: prep monkey prefab * Pajama Party: thrown pillow, prep sequences * Pajama Party: make embarrassed catch not loop whoops * Pajama Party: sound adjust, prefab work * Pajama Party: monkey spawning, basic jumping * Pajama Party: jump sequence no input detection or landing yet * Pajama Party: anims override * Pajama Party: jump cue functional comes with improvements and bugfixes to PlayerActionEvent * Pajama Party: sleep cue functional * Pajama Party: some notes * PlayerActionEvent: more bugfixes * Pajama Party: fully functional throw cue * Pajama Party: start animating sleep cue * Pajama Party: feature-complete * Pajama Party: unfuck layering * Pajama Party: icon also adds Fan Club's concept icon * Pajama Party: cues while unloaded * inverse-scale timing windows based on speed * Fan Club: move to new input system * Fan Club: allow forced animations during calls * Crop Stomp: fix camera shake regression
This commit is contained in:
@ -6,7 +6,7 @@ namespace HeavenStudio.Games
|
||||
{
|
||||
public class Minigame : MonoBehaviour
|
||||
{
|
||||
public static float earlyTime = (1f - 0.1f), perfectTime = (1f - 0.06f), lateTime = (1f + 0.06f), endTime = (1f + 0.1f);
|
||||
public static float earlyTime = 0.1f, perfectTime = 0.06f, lateTime = 0.06f, endTime = 0.1f;
|
||||
public List<Minigame.Eligible> EligibleHits = new List<Minigame.Eligible>();
|
||||
|
||||
[System.Serializable]
|
||||
@ -136,27 +136,35 @@ namespace HeavenStudio.Games
|
||||
return input.IsExpectingInputNow();
|
||||
}
|
||||
|
||||
|
||||
|
||||
// hopefully these will fix the lowbpm problem
|
||||
// now should fix the fast bpm problem
|
||||
public static float EarlyTime()
|
||||
{
|
||||
return earlyTime;
|
||||
return 1f - ScaleTimingMargin(earlyTime);
|
||||
}
|
||||
|
||||
public static float PerfectTime()
|
||||
{
|
||||
return perfectTime;
|
||||
return 1f - ScaleTimingMargin(perfectTime);
|
||||
}
|
||||
|
||||
public static float LateTime()
|
||||
{
|
||||
return lateTime;
|
||||
return 1f + ScaleTimingMargin(lateTime);
|
||||
}
|
||||
|
||||
public static float EndTime()
|
||||
{
|
||||
return endTime;
|
||||
return 1f + ScaleTimingMargin(endTime);
|
||||
}
|
||||
|
||||
//scales timing windows to the BPM in an ""intelligent"" manner
|
||||
static float ScaleTimingMargin(float f)
|
||||
{
|
||||
float bpm = Conductor.instance.songBpm * Conductor.instance.musicSource.pitch;
|
||||
float a = bpm / 120f;
|
||||
float b = (Mathf.Log(a) + 2f) * 0.5f;
|
||||
float r = Mathf.Lerp(a, b, 0.25f);
|
||||
return r * f;
|
||||
}
|
||||
|
||||
public int firstEnable = 0;
|
||||
|
Reference in New Issue
Block a user