Clappy trio input problem fixed

This commit is contained in:
Braedon 2022-02-05 15:28:04 -05:00
parent 245c88253d
commit 7f68ad28c2
3 changed files with 11 additions and 37 deletions

View file

@ -197,7 +197,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 54588eb7ee0680643aeaf61dcf609903, type: 3} m_Script: {fileID: 11500000, guid: 54588eb7ee0680643aeaf61dcf609903, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
time: 0.04 time: 0.01
--- !u!1 &2570987087158414682 --- !u!1 &2570987087158414682
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View file

@ -38,36 +38,10 @@ namespace RhythmHeavenMania.Games.ClappyTrio
private void Update() private void Update()
{ {
if (PlayerInput.Pressed())
{
Clap(false);
}
if (clapVacant == true) if (clapVacant == true)
{ {
float normalizedBeat = (Conductor.instance.GetPositionFromBeat(lastClapBeat, lastClapLength)); float normalizedBeat = (Conductor.instance.GetPositionFromBeat(lastClapBeat, lastClapLength));
/*if (normalizedBeat > Minigame.EarlyTime() && normalizedBeat < Minigame.PerfectTime() && lastIndex == 0)
{
SetEligibility(true, false, false);
lastIndex++;
}
else if (normalizedBeat > Minigame.PerfectTime() && normalizedBeat < Minigame.LateTime() && lastIndex == 1)
{
SetEligibility(false, true, false);
// Clap();
lastIndex++;
}
else if (normalizedBeat > Minigame.LateTime() && lastIndex == 2)
{
SetEligibility(false, false, true);
clapVacant = false;
lastIndex = 0;
lastClapLength = 0;
lastClapBeat = 0;
hit = false;
}*/
StateCheck(normalizedBeat); StateCheck(normalizedBeat);
if (normalizedBeat > Minigame.LateTime()) if (normalizedBeat > Minigame.LateTime())
@ -78,15 +52,13 @@ namespace RhythmHeavenMania.Games.ClappyTrio
lastClapBeat = 0; lastClapBeat = 0;
} }
} }
}
/*public void ClearLog() if (PlayerInput.Pressed())
{ {
var assembly = System.Reflection.Assembly.GetAssembly(typeof(UnityEditor.Editor)); Clap(false);
var type = assembly.GetType("UnityEditor.LogEntries"); }
var method = type.GetMethod("Clear");
method.Invoke(new object(), null); }
}*/
public void SetClapAvailability(float startBeat, float length) public void SetClapAvailability(float startBeat, float length)
{ {

View file

@ -44,7 +44,7 @@ namespace RhythmHeavenMania.Games.DJSchool
{ {
Hold(true); Hold(true);
} }
else if (state.notPerfect()) else
{ {
Hold(false); Hold(false);
} }
@ -64,7 +64,7 @@ namespace RhythmHeavenMania.Games.DJSchool
{ {
Swipe(); Swipe();
} }
else if (state.notPerfect()) else
{ {
UnHold(); UnHold();
} }
@ -89,6 +89,8 @@ namespace RhythmHeavenMania.Games.DJSchool
public void UnHold() public void UnHold()
{ {
isHolding = false;
anim.speed = -1; anim.speed = -1;
anim.Play("Hold", 0, 0); anim.Play("Hold", 0, 0);