mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-12 21:47:39 +02:00
Basic saving and loading system
This commit is contained in:
@ -96,6 +96,24 @@ namespace RhythmHeavenMania
|
||||
}
|
||||
}
|
||||
|
||||
public void LoadRemix(string json)
|
||||
{
|
||||
SortEventsList();
|
||||
|
||||
Beatmap = JsonConvert.DeserializeObject<Beatmap>(json);
|
||||
Conductor.instance.SetBpm(Beatmap.bpm);
|
||||
|
||||
if (Beatmap.entities.Count >= 1)
|
||||
{
|
||||
SetCurrentGame(Beatmap.entities[0].datamodel.Split(0));
|
||||
SetGame(Beatmap.entities[0].datamodel.Split(0));
|
||||
}
|
||||
else
|
||||
{
|
||||
SetGame("noGame");
|
||||
}
|
||||
}
|
||||
|
||||
// LateUpdate works a bit better but causes a bit of bugs, so remind me to fix those eventually
|
||||
private void Update()
|
||||
{
|
||||
|
Reference in New Issue
Block a user