Command pattern (Undo/Redo) system began. (Read desc)

I spent about 6 hours trying to fix this one specific bug involving the move undo. Turns out all I had to do was calm down and think logically instead of typing random bullshit for a few hours until it worked. I'm tired and I thank this for ruining my sleep schedule.
This commit is contained in:
Braedon
2022-01-22 05:44:19 -05:00
parent dea5860e95
commit 1ed2291844
26 changed files with 2206 additions and 77 deletions

View File

@ -161,11 +161,11 @@ namespace RhythmHeavenMania.Editor
dragTimes++;
if (currentEventIndex == 0)
{
Timeline.instance.AddEventObject($"gameManager/switchGame/{mg.name}", true, new Vector3(0, 0));
Timeline.instance.AddEventObject($"gameManager/switchGame/{mg.name}", true, new Vector3(0, 0), null, true);
}
else
{
Timeline.instance.AddEventObject(mg.name + "/" + mg.actions[currentEventIndex - 1].actionName, true, new Vector3(0, 0));
Timeline.instance.AddEventObject(mg.name + "/" + mg.actions[currentEventIndex - 1].actionName, true, new Vector3(0, 0), null, true);
}
}
}