two minor changes

This commit is contained in:
Rapandrasmus 2023-11-23 16:50:09 +01:00
parent 2e53d1327f
commit e29ea50307
3 changed files with 2 additions and 21 deletions

View file

@ -71,6 +71,7 @@ namespace HeavenStudio
public event Action<double> onBeatChanged;
public event Action<RiqEntity> onSectionChange;
public event Action<double> onBeatPulse;
public int BeatmapEntities()
{
@ -497,6 +498,7 @@ namespace HeavenStudio
if (cond.songPositionInBeatsAsDouble >= Math.Ceiling(_playStartBeat) + _pulseTally)
{
if (_currentMinigame != null) _currentMinigame.OnBeatPulse(Math.Ceiling(_playStartBeat) + _pulseTally);
onBeatPulse?.Invoke(Math.Ceiling(_playStartBeat) + _pulseTally);
_pulseTally++;
}

View file

@ -69,16 +69,6 @@ namespace HeavenStudio.Games.Loaders
},
resizable = true
},
new GameAction("bop", "Bop")
{
function = delegate { var e = eventCaller.currentEntity; ForkLifter.instance.Bop(e.beat, e.length, e["bop"], e["autoBop"]); },
parameters = new List<Param>()
{
new Param("bop", true, "Keep Bopping", "Should Fork bop for the duration of the block?"),
new Param("autoBop", false, "Keep Bopping (Auto)", "Should Fork bop indefinitely?"),
},
resizable = true,
},
},
new List<string>() {"rvl", "normal"},
"rvlfork", "en",
@ -129,11 +119,6 @@ namespace HeavenStudio.Games
instance = this;
}
public override void OnBeatPulse(double beat)
{
playerInstance.SingleBop();
}
private void Update()
{
BackgroundColorUpdate();

View file

@ -27,7 +27,6 @@ namespace HeavenStudio.Games.Scripts_ForkLifter
public int currentEarlyPeasOnFork;
public int currentPerfectPeasOnFork;
public int currentLatePeasOnFork;
private double lastReportedBeat;
private bool isEating = false;
@ -51,11 +50,6 @@ namespace HeavenStudio.Games.Scripts_ForkLifter
}
}
public void SingleBop()
{
if (anim.IsAnimationNotPlaying() && shouldBop) anim.DoScaledAnimationAsync("Player_Bop", 0.5f);
}
public void Eat()
{
if (currentEarlyPeasOnFork != 0 || currentPerfectPeasOnFork != 0 || currentLatePeasOnFork != 0)