Improved inputs (A SHIT MORE DYNAMIC BETWEEN GAMES) and a whole lot cleaner code in general

This commit is contained in:
Braedon
2022-01-17 00:00:26 -05:00
parent e735f1ccaf
commit 6a05f31506
16 changed files with 405 additions and 774 deletions

View File

@ -14,8 +14,6 @@ namespace RhythmHeavenMania.Games.ForkLifter
[Header("References")]
public ForkLifterHand ForkLifterHand;
private GameManager GameManager;
[Header("Objects")]
public Animator handAnim;
@ -25,9 +23,6 @@ namespace RhythmHeavenMania.Games.ForkLifter
public Sprite[] peaSprites;
public Sprite[] peaHitSprites;
private List<Beatmap.Entity> allPlayerActions = new List<Beatmap.Entity>();
private void Awake()
{
instance = this;
@ -38,33 +33,6 @@ namespace RhythmHeavenMania.Games.ForkLifter
ForkLifterHand.CheckNextFlick();
}
private void Start()
{
GameManager = GameManager.instance;
// allPlayerActions = GameManager.Events.FindAll(c => c.eventName != "gulp" && c.eventName != "sigh" && c.eventName != "prepare" && c.eventName != "end");
/*List<Event> temp = new List<Event>();
for (int i = 0; i < allPlayerActions.Count; i++)
{
if (i - 1 > 0)
{
if (Mathp.IsWithin(allPlayerActions[i - 1].spawnTime, allPlayerActions[i].spawnTime - 1f, allPlayerActions[i].spawnTime))
{
// do nothing lul
continue;
}
}
Event e = (Event)allPlayerActions[i].Clone();
e.spawnTime = allPlayerActions[i].spawnTime - 1;
e.eventName = "prepare";
temp.Add(e);
}
string s = JsonConvert.SerializeObject(temp);
print(s);*/
}
public void Flick(float beat, int type)
{
Jukebox.PlayOneShotGame("forkLifter/flick");