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 4de296b674
commit cf13fd9038
2 changed files with 24 additions and 19 deletions

View file

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

View file

@ -135,6 +135,8 @@ namespace HeavenStudio
#else #else
buildTime = Application.buildGUID.Substring(0, 8) + " " + AppInfo.Date.ToString("dd/MM/yyyy hh:mm:ss"); buildTime = Application.buildGUID.Substring(0, 8) + " " + AppInfo.Date.ToString("dd/MM/yyyy hh:mm:ss");
#endif #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() public void Awake()