diff --git a/Assets/Scripts/GameManager.cs b/Assets/Scripts/GameManager.cs index 0d3b2b17..88f5eea1 100644 --- a/Assets/Scripts/GameManager.cs +++ b/Assets/Scripts/GameManager.cs @@ -60,6 +60,7 @@ namespace HeavenStudio public static GameManager instance { get; private set; } private EventCaller eventCaller; + // average input accuracy (msec) List inputOffsetSamples = new List(); float averageInputOffset = 0; public float AvgInputOffset @@ -75,6 +76,18 @@ namespace HeavenStudio } } + // input accuracy (%) + double totalInputs = 0; + double totalPlayerAccuracy = 0; + public double PlayerAccuracy + { + get + { + if (totalInputs == 0) return 0; + return totalPlayerAccuracy / totalInputs; + } + } + private void Awake() { // autoplay = true; @@ -190,6 +203,14 @@ namespace HeavenStudio } } + public void ScoreInputAccuracy(double accuracy, bool late, double weight = 1) + { + totalInputs += weight; + totalPlayerAccuracy += accuracy * weight; + + // push the hit event to the timing display + } + public void SeekAheadAndPreload(double start, float seekTime = 8f) { //seek ahead to preload games that have assetbundles @@ -369,6 +390,10 @@ namespace HeavenStudio canInput = true; inputOffsetSamples.Clear(); averageInputOffset = 0; + + totalInputs = 0; + totalPlayerAccuracy = 0; + StartCoroutine(PlayCo(beat)); onBeatChanged?.Invoke(beat); } @@ -409,6 +434,7 @@ namespace HeavenStudio KillAllSounds(); Debug.Log($"Average input offset for playthrough: {averageInputOffset}ms"); + Debug.Log($"Accuracy for playthrough: {(PlayerAccuracy * 100) : 0.00}"); if (playOnStart) { diff --git a/Assets/Scripts/Games/ClappyTrio/ClappyTrioPlayer.cs b/Assets/Scripts/Games/ClappyTrio/ClappyTrioPlayer.cs index f4466c28..b7eabdfe 100644 --- a/Assets/Scripts/Games/ClappyTrio/ClappyTrioPlayer.cs +++ b/Assets/Scripts/Games/ClappyTrio/ClappyTrioPlayer.cs @@ -28,6 +28,7 @@ namespace HeavenStudio.Games.Scripts_ClappyTrio if (PlayerInput.Pressed() && !game.IsExpectingInputNow(InputType.STANDARD_DOWN)) { Clap(false); + game.ScoreMiss(); } } diff --git a/Assets/Scripts/Games/CropStomp/Farmer.cs b/Assets/Scripts/Games/CropStomp/Farmer.cs index 7bbb9f4e..8745f822 100644 --- a/Assets/Scripts/Games/CropStomp/Farmer.cs +++ b/Assets/Scripts/Games/CropStomp/Farmer.cs @@ -28,7 +28,10 @@ namespace HeavenStudio.Games.Scripts_CropStomp if (stomp == null && cond.isPlaying) { if (GameManager.instance.currentGame == "cropStomp") + { stomp = game.ScheduleUserInput(nextStompBeat - 1f, 1f, InputType.STANDARD_DOWN, Just, Miss, Out); + stomp.countsForAccuracy = false; + } } if (PlayerInput.Pressed() && !game.IsExpectingInputNow(InputType.STANDARD_DOWN)) @@ -52,6 +55,7 @@ namespace HeavenStudio.Games.Scripts_CropStomp nextStompBeat += 2f; stomp?.Disable(); stomp = game.ScheduleUserInput(nextStompBeat - 1f, 1f, InputType.STANDARD_DOWN, Just, Miss, Out); + stomp.countsForAccuracy = false; } private void Out(PlayerActionEvent caller) {} @@ -73,6 +77,7 @@ namespace HeavenStudio.Games.Scripts_CropStomp nextStompBeat += 2f; stomp?.Disable(); stomp = game.ScheduleUserInput(nextStompBeat - 1f, 1f, InputType.STANDARD_DOWN, Just, Miss, Out); + stomp.countsForAccuracy = false; } } } diff --git a/Assets/Scripts/Games/DJSchool/DJSchool.cs b/Assets/Scripts/Games/DJSchool/DJSchool.cs index 65960238..96829580 100644 --- a/Assets/Scripts/Games/DJSchool/DJSchool.cs +++ b/Assets/Scripts/Games/DJSchool/DJSchool.cs @@ -232,6 +232,7 @@ namespace HeavenStudio.Games { student.OnMissHoldForPlayerInput(); student.isHolding = true; + ScoreMiss(); } else if(PlayerInput.PressedUp() && !IsExpectingInputNow() && student.isHolding) //Let go during hold { diff --git a/Assets/Scripts/Games/FanClub/NtrIdolFan.cs b/Assets/Scripts/Games/FanClub/NtrIdolFan.cs index 117aca86..5f673897 100644 --- a/Assets/Scripts/Games/FanClub/NtrIdolFan.cs +++ b/Assets/Scripts/Games/FanClub/NtrIdolFan.cs @@ -102,6 +102,7 @@ namespace HeavenStudio.Games.Scripts_FanClub if (!FanClub.instance.IsExpectingInputNow(InputType.STANDARD_DOWN)) { ClapStart(false); + FanClub.instance.ScoreMiss(); } } if (PlayerInput.Pressing()) @@ -118,6 +119,7 @@ namespace HeavenStudio.Games.Scripts_FanClub if (clappingStartTime != Single.MinValue && cond.songPositionInBeats > clappingStartTime + 2f && stopCharge && !FanClub.instance.IsExpectingInputNow(InputType.STANDARD_UP)) { JumpStart(false); + FanClub.instance.ScoreMiss(); } else { diff --git a/Assets/Scripts/Games/KarateMan/KarateManJoe.cs b/Assets/Scripts/Games/KarateMan/KarateManJoe.cs index 3529a781..6ae31f3a 100644 --- a/Assets/Scripts/Games/KarateMan/KarateManJoe.cs +++ b/Assets/Scripts/Games/KarateMan/KarateManJoe.cs @@ -152,6 +152,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan { //start a forced-fail combo sequence ForceFailCombo(cond.songPositionInBeats); + KarateMan.instance.ScoreMiss(2); } } else if (PlayerInput.AltPressedUp()) diff --git a/Assets/Scripts/Games/Lockstep/Lockstep.cs b/Assets/Scripts/Games/Lockstep/Lockstep.cs index 5eea7f81..fc7f1a9c 100644 --- a/Assets/Scripts/Games/Lockstep/Lockstep.cs +++ b/Assets/Scripts/Games/Lockstep/Lockstep.cs @@ -156,6 +156,7 @@ namespace HeavenStudio.Games var stepPlayerAnim = (beatAnimCheck % 2 != 0 ? "OffbeatMarch" : "OnbeatMarch"); Jukebox.PlayOneShotGame("lockstep/miss"); stepswitcherP.DoScaledAnimationAsync(stepPlayerAnim, 0.5f); + ScoreMiss(); } } diff --git a/Assets/Scripts/Games/MarchingOrders/MarchingOrders.cs b/Assets/Scripts/Games/MarchingOrders/MarchingOrders.cs index ba87b782..431a9ee6 100644 --- a/Assets/Scripts/Games/MarchingOrders/MarchingOrders.cs +++ b/Assets/Scripts/Games/MarchingOrders/MarchingOrders.cs @@ -154,6 +154,7 @@ namespace HeavenStudio.Games Jukebox.PlayOneShot("miss"); Sarge.DoScaledAnimationAsync("Anger", 0.5f); Steam.DoScaledAnimationAsync("Steam", 0.5f); + ScoreMiss(); marchPlayerCount += 1; var marchPlayerAnim = (marchPlayerCount % 2 != 0 ? "MarchR" : "MarchL"); diff --git a/Assets/Scripts/Games/Minigame.cs b/Assets/Scripts/Games/Minigame.cs index 7fc05f89..a9a41552 100644 --- a/Assets/Scripts/Games/Minigame.cs +++ b/Assets/Scripts/Games/Minigame.cs @@ -9,6 +9,7 @@ namespace HeavenStudio.Games public class Minigame : MonoBehaviour { public static float earlyTime = 0.07f, perfectTime = 0.04f, aceEarlyTime = 0.01f, aceLateTime = 0.01f, lateTime = 0.04f, endTime = 0.07f; + public static float rankHiThreshold = 0.8f, rankOkThreshold = 0.6f; [SerializeField] public SoundSequence.SequenceKeyValue[] SoundSequences; public List EligibleHits = new List(); @@ -171,7 +172,7 @@ namespace HeavenStudio.Games public static float AceStartTime() { - return 1f + ScaleTimingMargin(aceEarlyTime); + return 1f - ScaleTimingMargin(aceEarlyTime); } public static float AceEndTime() @@ -250,6 +251,11 @@ namespace HeavenStudio.Games return null; } + public void ScoreMiss(double weight = 1f) + { + GameManager.instance.ScoreInputAccuracy(0, true, weight); + } + private void OnDestroy() { foreach (var evt in scheduledInputs) { diff --git a/Assets/Scripts/Games/PajamaParty/CtrPillowPlayer.cs b/Assets/Scripts/Games/PajamaParty/CtrPillowPlayer.cs index 9ed247a0..aa6106be 100644 --- a/Assets/Scripts/Games/PajamaParty/CtrPillowPlayer.cs +++ b/Assets/Scripts/Games/PajamaParty/CtrPillowPlayer.cs @@ -53,6 +53,7 @@ namespace HeavenStudio.Games.Scripts_PajamaParty { Jukebox.PlayOneShot("miss"); PlayerJump(cond.songPositionInBeats, true, false); + PajamaParty.instance.ScoreMiss(); } if (PlayerInput.AltPressed() && canCharge) { @@ -62,6 +63,7 @@ namespace HeavenStudio.Games.Scripts_PajamaParty { Jukebox.PlayOneShot("miss"); EndCharge(cond.songPositionInBeats, false, false); + PajamaParty.instance.ScoreMiss(); } // mako jumping logic diff --git a/Assets/Scripts/Games/PlayerActionEvent.cs b/Assets/Scripts/Games/PlayerActionEvent.cs index f038b02d..fa51f17a 100644 --- a/Assets/Scripts/Games/PlayerActionEvent.cs +++ b/Assets/Scripts/Games/PlayerActionEvent.cs @@ -11,6 +11,7 @@ namespace HeavenStudio.Games public class PlayerActionEvent : PlayerActionObject { + public static bool EnableAutoplayCheat = false; public delegate void ActionEventCallback(PlayerActionEvent caller); public delegate void ActionEventCallbackState(PlayerActionEvent caller, float state); @@ -33,6 +34,8 @@ namespace HeavenStudio.Games public InputType inputType; //The type of input. Check the InputType class to see a list of all of them public bool perfectOnly = false; //Indicates that the input only recognize perfect inputs. + + public bool countsForAccuracy = true; //Indicates if the input counts for the accuracy or not. If set to false, it'll not be counted in the accuracy calculation public void setHitCallback(ActionEventCallbackState OnHit) { @@ -60,31 +63,27 @@ namespace HeavenStudio.Games if (noAutoplay && autoplayOnly) autoplayOnly = false; if (noAutoplay && triggersAutoplay){ triggersAutoplay = false; } - float normalizedBeat = GetNormalizedTime(); - float stateProg = ((normalizedBeat - Minigame.PerfectTime()) / (Minigame.LateTime() - Minigame.PerfectTime()) - 0.5f) * 2; - StateCheck(normalizedBeat); + double normalizedTime = GetNormalizedTime(); + double stateProg = ((normalizedTime - Minigame.PerfectTime()) / (Minigame.LateTime() - Minigame.PerfectTime()) - 0.5f) * 2; + StateCheck(normalizedTime); //BUGFIX: ActionEvents destroyed too early - if (normalizedBeat > Minigame.EndTime()) Miss(); + if (normalizedTime > Minigame.EndTime()) Miss(); if (IsCorrectInput() && !autoplayOnly) { if (state.perfect) { - Hit(stateProg); - if (normalizedBeat >= Minigame.AceStartTime() && normalizedBeat <= Minigame.AceEndTime()) - { - // push an ace event - } + Hit(stateProg, normalizedTime); } else if (state.early && !perfectOnly) { - Hit(-1f); + Hit(-1f, normalizedTime); } else if (state.late && !perfectOnly) { - Hit(1f); + Hit(1f, normalizedTime); } else { @@ -95,18 +94,18 @@ namespace HeavenStudio.Games public bool IsExpectingInputNow() { - float normalizedBeat = GetNormalizedTime(); + double normalizedBeat = GetNormalizedTime(); return normalizedBeat > Minigame.EarlyTime() && normalizedBeat < Minigame.EndTime(); } - float GetNormalizedTime() + double GetNormalizedTime() { var cond = Conductor.instance; double currTime = cond.GetSongPosFromBeat(cond.songPositionInBeatsAsDouble); double targetTime = cond.GetSongPosFromBeat(startBeat + timer); double min = targetTime - 1f; double max = targetTime + 1f; - return 1f + (float)(((currTime - min) / (max - min))-0.5f)*2; + return 1f + (((currTime - min) / (max - min))-0.5f)*2; } public bool IsCorrectInput() @@ -138,30 +137,88 @@ namespace HeavenStudio.Games //For the Autoplay public override void OnAce() { - float normalizedBeat = Conductor.instance.GetPositionFromBeat(startBeat,timer); - // allows ace detection with this new system - float stateProg = ((normalizedBeat - Minigame.PerfectTime()) / (Minigame.LateTime() - Minigame.PerfectTime()) - 0.5f) * 2; - Hit(stateProg); + if (EnableAutoplayCheat) + { + Hit(0f, 1f); + } + else + { + double normalizedBeat = GetNormalizedTime(); + double stateProg = ((normalizedBeat - Minigame.PerfectTime()) / (Minigame.LateTime() - Minigame.PerfectTime()) - 0.5f) * 2; + Hit(stateProg, normalizedBeat); + } } //The state parameter is either -1 -> Early, 0 -> Perfect, 1 -> Late - public void Hit(float state) + public void Hit(double state, double time) { if (OnHit != null && enabled) { if(canHit) { - float normalized = GetNormalizedTime() - 1f; + double normalized = time - 1f; int offset = Mathf.CeilToInt((float)normalized * 1000); GameManager.instance.AvgInputOffset = offset; - OnHit(this, state); + OnHit(this, (float) state); + CleanUp(); + if (countsForAccuracy && !(noAutoplay || autoplayOnly)) + GameManager.instance.ScoreInputAccuracy(TimeToAccuracy(time), time > 1.0, 1.0); } else { Blank(); } } - + } + + double TimeToAccuracy(double time) + { + if (time >= Minigame.AceStartTime() && time <= Minigame.AceEndTime()) + { + // Ace + Debug.Log("Accuracy (Ace): " + 1.0); + return 1.0; + } + + double state = 0; + if (time >= Minigame.PerfectTime() && time <= Minigame.LateTime()) + { + // Good Hit + if (time > 1.0) + { + // late half of timing window + state = 1.0 - ((time - Minigame.AceEndTime()) / (Minigame.LateTime() - Minigame.AceEndTime())); + state *= 1.0 - Minigame.rankHiThreshold; + state += Minigame.rankHiThreshold; + Debug.Log("Accuracy (Late): " + state); + } + else + { + //early half of timing window + state = ((time - Minigame.PerfectTime()) / (Minigame.AceStartTime() - Minigame.PerfectTime())); + state *= 1.0 - Minigame.rankHiThreshold; + state += Minigame.rankHiThreshold; + Debug.Log("Accuracy (Early): " + state); + } + } + else + { + if (time > 1.0) + { + // late half of timing window + state = 1.0 - ((time - Minigame.LateTime()) / (Minigame.EndTime() - Minigame.LateTime())); + state *= Minigame.rankOkThreshold; + Debug.Log("Accuracy (Late NG): " + state); + } + else + { + //early half of timing window + state = ((time - Minigame.PerfectTime()) / (Minigame.AceStartTime() - Minigame.PerfectTime())); + state *= Minigame.rankOkThreshold; + Debug.Log("Accuracy (Early NG): " + state); + } + } + return state; } public void Miss() @@ -172,6 +229,8 @@ namespace HeavenStudio.Games } CleanUp(); + if (countsForAccuracy && !(noAutoplay || autoplayOnly)) + GameManager.instance.ScoreInputAccuracy(0, true, 1.0); } public void Blank() diff --git a/Assets/Scripts/Games/PlayerActionObject.cs b/Assets/Scripts/Games/PlayerActionObject.cs index fcd8ff64..5ba44e54 100644 --- a/Assets/Scripts/Games/PlayerActionObject.cs +++ b/Assets/Scripts/Games/PlayerActionObject.cs @@ -28,7 +28,7 @@ namespace HeavenStudio.Games autoPlayEnabledOnStart = GameManager.instance.autoplay; } - private void CheckForAce(float normalizedBeat, bool autoPlay = false) + private void CheckForAce(double normalizedBeat, bool autoPlay = false) { if (aceTimes == 0) { @@ -53,7 +53,7 @@ namespace HeavenStudio.Games } // could possibly add support for custom early, perfect, and end times if needed. - public void StateCheck(float normalizedBeat, bool autoPlay = false) + public void StateCheck(double normalizedBeat, bool autoPlay = false) { CheckForAce(normalizedBeat, autoPlay); if (normalizedBeat > Minigame.EarlyTime() && normalizedBeat < Minigame.PerfectTime()) diff --git a/Assets/Scripts/Games/RhythmSomen/RhythmSomen.cs b/Assets/Scripts/Games/RhythmSomen/RhythmSomen.cs index 28a4a837..4ebb2d87 100644 --- a/Assets/Scripts/Games/RhythmSomen/RhythmSomen.cs +++ b/Assets/Scripts/Games/RhythmSomen/RhythmSomen.cs @@ -8,23 +8,24 @@ namespace HeavenStudio.Games.Loaders using static Minigames; public static class PcoSomenLoader { - public static Minigame AddGame(EventCaller eventCaller) { + public static Minigame AddGame(EventCaller eventCaller) + { return new Minigame("rhythmSomen", "Rhythm Sōmen", "99CC34", false, false, new List() { new GameAction("crane (far)", "Far Crane") { - function = delegate { RhythmSomen.instance.DoFarCrane(eventCaller.currentEntity.beat); }, - defaultLength = 4.0f, + function = delegate { RhythmSomen.instance.DoFarCrane(eventCaller.currentEntity.beat); }, + defaultLength = 4.0f, }, new GameAction("crane (close)", "Close Crane") { - function = delegate { RhythmSomen.instance.DoCloseCrane(eventCaller.currentEntity.beat); }, - defaultLength = 3.0f, + function = delegate { RhythmSomen.instance.DoCloseCrane(eventCaller.currentEntity.beat); }, + defaultLength = 3.0f, }, new GameAction("crane (both)", "Both Cranes") { - function = delegate { RhythmSomen.instance.DoBothCrane(eventCaller.currentEntity.beat); }, - defaultLength = 4.0f, + function = delegate { RhythmSomen.instance.DoBothCrane(eventCaller.currentEntity.beat); }, + defaultLength = 4.0f, }, new GameAction("offbeat bell", "Offbeat Warning") { @@ -66,14 +67,15 @@ namespace HeavenStudio.Games var cond = Conductor.instance; if (cond.ReportBeat(ref bop.lastReportedBeat, bop.startBeat % 1)) { - SomenPlayer.Play("HeadBob", -1, 0); + SomenPlayer.Play("HeadBob", -1, 0); } if (PlayerInput.Pressed() && !IsExpectingInputNow()) { - Jukebox.PlayOneShotGame("rhythmSomen/somen_mistake"); - FrontArm.Play("ArmPluck", -1, 0); - EffectSweat.Play("BlobSweating", -1, 0); + Jukebox.PlayOneShotGame("rhythmSomen/somen_mistake"); + FrontArm.Play("ArmPluck", -1, 0); + EffectSweat.Play("BlobSweating", -1, 0); + ScoreMiss(); } } @@ -87,7 +89,7 @@ namespace HeavenStudio.Games new MultiSound.Sound("rhythmSomen/somen_woosh", beat + 1.5f), }); - BeatAction.New(Player, new List() + BeatAction.New(Player, new List() { new BeatAction.Action(beat, delegate { FarCrane.Play("Drop", -1, 0);}), new BeatAction.Action(beat + 1.0f, delegate { FarCrane.Play("Open", -1, 0);}), @@ -106,7 +108,7 @@ namespace HeavenStudio.Games new MultiSound.Sound("rhythmSomen/somen_woosh", beat + 1.5f), }); - BeatAction.New(Player, new List() + BeatAction.New(Player, new List() { new BeatAction.Action(beat, delegate { CloseCrane.Play("DropClose", -1, 0);}), new BeatAction.Action(beat + 1.0f, delegate { CloseCrane.Play("OpenClose", -1, 0);}), @@ -115,7 +117,7 @@ namespace HeavenStudio.Games } - public void DoBothCrane(float beat) + public void DoBothCrane(float beat) { //Both Drop Multisound ScheduleInput(beat, 2f, InputType.STANDARD_DOWN, CatchSuccess, CatchMiss, CatchEmpty); @@ -127,7 +129,7 @@ namespace HeavenStudio.Games new MultiSound.Sound("rhythmSomen/somen_woosh", beat + 1.5f), }); - BeatAction.New(Player, new List() + BeatAction.New(Player, new List() { new BeatAction.Action(beat, delegate { CloseCrane.Play("DropClose", -1, 0);}), new BeatAction.Action(beat, delegate { FarCrane.Play("Drop", -1, 0);}), @@ -139,33 +141,33 @@ namespace HeavenStudio.Games } - public void DoBell(float beat) - { - //Bell Sound lol - Jukebox.PlayOneShotGame("rhythmSomen/somen_bell"); + public void DoBell(float beat) + { + //Bell Sound lol + Jukebox.PlayOneShotGame("rhythmSomen/somen_bell"); - BeatAction.New(Player, new List() + BeatAction.New(Player, new List() { new BeatAction.Action(beat, delegate { EffectExclam.Play("ExclamAppear", -1, 0);}), }); - } + } - public void CatchSuccess(PlayerActionEvent caller, float state) - { + public void CatchSuccess(PlayerActionEvent caller, float state) + { Jukebox.PlayOneShotGame("rhythmSomen/somen_catch"); FrontArm.Play("ArmPluck", -1, 0); EffectHit.Play("HitAppear", -1, 0); - } + } - public void CatchMiss(PlayerActionEvent caller) - { + public void CatchMiss(PlayerActionEvent caller) + { EffectShock.Play("ShockAppear", -1, 0); - } + } - public void CatchEmpty(PlayerActionEvent caller) - { + public void CatchEmpty(PlayerActionEvent caller) + { - } + } } } \ No newline at end of file diff --git a/Assets/Scripts/Games/RhythmTweezers/LongHair.cs b/Assets/Scripts/Games/RhythmTweezers/LongHair.cs index f6d94a9a..4c5a5acc 100644 --- a/Assets/Scripts/Games/RhythmTweezers/LongHair.cs +++ b/Assets/Scripts/Games/RhythmTweezers/LongHair.cs @@ -59,7 +59,7 @@ namespace HeavenStudio.Games.Scripts_RhythmTweezers // Auto-release if holding at release time. if (normalizedBeat >= 1f) - endEvent.Hit(0f); + endEvent.Hit(0f, 1f); } loop.transform.localScale = Vector2.one / holder.transform.localScale; diff --git a/Assets/Scripts/Games/SamuraiSliceNtr/NtrSamuraiObject.cs b/Assets/Scripts/Games/SamuraiSliceNtr/NtrSamuraiObject.cs index 856c1ae6..014e1ebe 100644 --- a/Assets/Scripts/Games/SamuraiSliceNtr/NtrSamuraiObject.cs +++ b/Assets/Scripts/Games/SamuraiSliceNtr/NtrSamuraiObject.cs @@ -84,9 +84,9 @@ namespace HeavenStudio.Games.Scripts_NtrSamurai launchProg = SamuraiSliceNtr.instance.ScheduleInput(startBeat, 2f, InputType.STANDARD_ALT_DOWN, LaunchSuccess, LaunchMiss, LaunchThrough); //autoplay: launch anim - SamuraiSliceNtr.instance.ScheduleAutoplayInput(startBeat, 2f, InputType.STANDARD_ALT_DOWN, DoLaunchAutoplay, LaunchThrough, LaunchThrough); + SamuraiSliceNtr.instance.ScheduleAutoplayInput(startBeat, 2f, InputType.STANDARD_ALT_DOWN, DoLaunchAutoplay, LaunchThrough, LaunchThrough).countsForAccuracy = false; //autoplay: unstep - SamuraiSliceNtr.instance.ScheduleAutoplayInput(startBeat, 1.75f, InputType.STANDARD_ALT_UP, DoUnStepAutoplay, LaunchThrough, LaunchThrough); + SamuraiSliceNtr.instance.ScheduleAutoplayInput(startBeat, 1.75f, InputType.STANDARD_ALT_UP, DoUnStepAutoplay, LaunchThrough, LaunchThrough).countsForAccuracy = false; currentCurve = SamuraiSliceNtr.instance.InCurve; transform.rotation = Quaternion.Euler(0, 0, transform.rotation.eulerAngles.z + (360f * startBeat)); @@ -216,9 +216,9 @@ namespace HeavenStudio.Games.Scripts_NtrSamurai { flyProg = 2; launchProg = SamuraiSliceNtr.instance.ScheduleInput(startBeat + 2f, 2f, InputType.STANDARD_ALT_DOWN, LaunchSuccess, LaunchMiss, LaunchThrough); - SamuraiSliceNtr.instance.ScheduleAutoplayInput(startBeat + 2f, 2f, InputType.STANDARD_ALT_DOWN, DoLaunchAutoplay, LaunchThrough, LaunchThrough); + SamuraiSliceNtr.instance.ScheduleAutoplayInput(startBeat + 2f, 2f, InputType.STANDARD_ALT_DOWN, DoLaunchAutoplay, LaunchThrough, LaunchThrough).countsForAccuracy = false; //autoplay: unstep - SamuraiSliceNtr.instance.ScheduleAutoplayInput(startBeat + 2f, 1.75f, InputType.STANDARD_ALT_UP, DoUnStepAutoplay, LaunchThrough, LaunchThrough); + SamuraiSliceNtr.instance.ScheduleAutoplayInput(startBeat + 2f, 1.75f, InputType.STANDARD_ALT_UP, DoUnStepAutoplay, LaunchThrough, LaunchThrough).countsForAccuracy = false; currentCurve = null; Jukebox.PlayOneShotGame("samuraiSliceNtr/holy_mackerel" + UnityEngine.Random.Range(1, 4), pitch: UnityEngine.Random.Range(0.95f, 1.05f), volume: 0.8f); @@ -227,13 +227,13 @@ namespace HeavenStudio.Games.Scripts_NtrSamurai case (int) SamuraiSliceNtr.ObjectType.Demon: flyProg = 1; hitProg = SamuraiSliceNtr.instance.ScheduleInput(startBeat + 2f, 4f, InputType.STANDARD_DOWN, HitSuccess, HitMiss, LaunchThrough); - SamuraiSliceNtr.instance.ScheduleAutoplayInput(startBeat + 2f, 4f, InputType.STANDARD_DOWN, DoSliceAutoplay, LaunchThrough, LaunchThrough); + SamuraiSliceNtr.instance.ScheduleAutoplayInput(startBeat + 2f, 4f, InputType.STANDARD_DOWN, DoSliceAutoplay, LaunchThrough, LaunchThrough).countsForAccuracy = false; currentCurve = SamuraiSliceNtr.instance.LaunchHighCurve; break; default: flyProg = 1; hitProg = SamuraiSliceNtr.instance.ScheduleInput(startBeat + 2f, 2f, InputType.STANDARD_DOWN, HitSuccess, HitMiss, LaunchThrough); - SamuraiSliceNtr.instance.ScheduleAutoplayInput(startBeat + 2f, 2f, InputType.STANDARD_DOWN, DoSliceAutoplay, LaunchThrough, LaunchThrough); + SamuraiSliceNtr.instance.ScheduleAutoplayInput(startBeat + 2f, 2f, InputType.STANDARD_DOWN, DoSliceAutoplay, LaunchThrough, LaunchThrough).countsForAccuracy = false; currentCurve = SamuraiSliceNtr.instance.LaunchCurve; break; } diff --git a/Assets/Scripts/Games/Tambourine/Tambourine.cs b/Assets/Scripts/Games/Tambourine/Tambourine.cs index f0b165a9..7c67fd52 100644 --- a/Assets/Scripts/Games/Tambourine/Tambourine.cs +++ b/Assets/Scripts/Games/Tambourine/Tambourine.cs @@ -162,6 +162,7 @@ namespace HeavenStudio.Games Jukebox.PlayOneShotGame($"tambourine/player/shake/{UnityEngine.Random.Range(1, 6)}"); sweatAnimator.Play("Sweating", 0, 0); SummonFrog(); + ScoreMiss(); if (!intervalStarted) { sadFace.SetActive(true); @@ -173,6 +174,7 @@ namespace HeavenStudio.Games Jukebox.PlayOneShotGame($"tambourine/player/hit/{UnityEngine.Random.Range(1, 6)}"); sweatAnimator.Play("Sweating", 0, 0); SummonFrog(); + ScoreMiss(); if (!intervalStarted) { sadFace.SetActive(true);