fix that one lockstep bug

print program build string to log
This commit is contained in:
minenice55 2024-05-13 01:22:11 -04:00
parent f2b565b00e
commit 908f757420
2 changed files with 24 additions and 19 deletions

View file

@ -117,9 +117,9 @@ namespace HeavenStudio.Games.Loaders
defaultLength = 4
}
},
new List<string>() {"ntr", "keep"},
new List<string>() { "ntr", "keep" },
"ntrbackbeat", "en",
new List<string>() {},
new List<string>() { },
chronologicalSortKey: 27
);
@ -346,7 +346,8 @@ namespace HeavenStudio.Games
}
}
void Start() {
void Start()
{
stepperMaterial.SetColor("_ColorAlpha", stepperOut);
stepperMaterial.SetColor("_ColorBravo", stepperDark);
stepperMaterial.SetColor("_ColorDelta", stepperLight);
@ -407,8 +408,7 @@ namespace HeavenStudio.Games
private void Update()
{
var cond = Conductor.instance;
if (cond.isPlaying && !cond.isPaused)
if (conductor.isPlaying && !conductor.isPaused)
{
if (queuedInputs.Count > 0)
{
@ -428,7 +428,7 @@ namespace HeavenStudio.Games
if (PlayerInput.GetIsAction(InputAction_BasicPress) && !IsExpectingInputNow(InputAction_BasicPress))
{
currentMissStage = HowMissed.NotMissed;
double beatAnimCheck = cond.songPositionInBeatsAsDouble - 0.25;
double beatAnimCheck = conductor.songPositionInBeatsAsDouble - 0.25;
if (beatAnimCheck % 1.0 >= 0.5)
{
stepswitcherPlayer.DoScaledAnimationAsync("OnbeatMarch", 0.5f);
@ -722,11 +722,12 @@ namespace HeavenStudio.Games
if (NextStepIsSwitch(beat)) beat -= 0.5;
bool offBeat = beat % 1 != 0;
bool bachOnBeat = BachOnBeat(beat);
ScheduleInput(beat - 1, 1, InputAction_BasicPress, offBeat ? JustOff : JustOn, offBeat ? MissOff : MissOn, Nothing);
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate
{
if (gameManager.currentGame != "lockstep") return;
ScheduleInput(beat - 1, 1, InputAction_BasicPress, offBeat ? JustOff : JustOn, offBeat ? MissOff : MissOn, Nothing);
EvaluateMarch(offBeat);
MarchRecursive(beat + 1);
if (bachOnBeat) bach.DoScaledAnimationAsync(offBeat ? "BachOff" : "BachOn", 0.5f);
@ -779,8 +780,9 @@ namespace HeavenStudio.Games
private void MissOn(PlayerActionEvent caller)
{
if (gameManager.currentGame != "lockstep") return;
if (currentMissStage == HowMissed.MissedOn) return;
if (stepswitcherPlayer is not null)
if (stepswitcherPlayer is not null && stepswitcherPlayer.isActiveAndEnabled)
{
stepswitcherPlayer?.Play("OnbeatMiss", 0, 0);
}
@ -790,8 +792,9 @@ namespace HeavenStudio.Games
private void MissOff(PlayerActionEvent caller)
{
if (gameManager.currentGame != "lockstep") return;
if (currentMissStage == HowMissed.MissedOff) return;
if (stepswitcherPlayer is not null)
if (stepswitcherPlayer is not null && stepswitcherPlayer.isActiveAndEnabled)
{
stepswitcherPlayer?.Play("OffbeatMiss", 0, 0);
}
@ -836,6 +839,6 @@ namespace HeavenStudio.Games
playerMaterial.SetColor("_ColorDelta", lightColor);
}
public void Nothing(PlayerActionEvent caller) {}
public void Nothing(PlayerActionEvent caller) { }
}
}

View file

@ -135,6 +135,8 @@ namespace HeavenStudio
#else
buildTime = Application.buildGUID.Substring(0, 8) + " " + AppInfo.Date.ToString("dd/MM/yyyy hh:mm:ss");
#endif
Debug.Log($"Started Heaven Studio {buildTime} on {Application.platform}");
Debug.Log($"We hope you enjoy as much as we did making it!");
}
public void Awake()