mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-12 11:17:39 +02:00
Added New (CTRL+N) Button
Allows you to call GameManager.LoadRemix("") to initialize a blank remix at bpm 120. The New button (or CTRL+N) calls Editor.NewRemix();
This commit is contained in:
@ -73,9 +73,7 @@ namespace RhythmHeavenMania
|
||||
}
|
||||
else
|
||||
{
|
||||
Beatmap = new Beatmap();
|
||||
Beatmap.bpm = 120f;
|
||||
Beatmap.firstBeatOffset = 0f;
|
||||
NewRemix();
|
||||
}
|
||||
|
||||
SortEventsList();
|
||||
@ -106,11 +104,25 @@ namespace RhythmHeavenMania
|
||||
}
|
||||
}
|
||||
|
||||
public void LoadRemix(string json)
|
||||
public void NewRemix()
|
||||
{
|
||||
Beatmap = new Beatmap();
|
||||
Beatmap.bpm = 120f;
|
||||
Beatmap.firstBeatOffset = 0f;
|
||||
}
|
||||
|
||||
public void LoadRemix(string json = "")
|
||||
{
|
||||
SortEventsList();
|
||||
|
||||
Beatmap = JsonConvert.DeserializeObject<Beatmap>(json);
|
||||
if (json != "")
|
||||
{
|
||||
Beatmap = JsonConvert.DeserializeObject<Beatmap>(json);
|
||||
}
|
||||
else
|
||||
{
|
||||
NewRemix();
|
||||
}
|
||||
Conductor.instance.SetBpm(Beatmap.bpm);
|
||||
Conductor.instance.firstBeatOffset = Beatmap.firstBeatOffset;
|
||||
Stop(0);
|
||||
|
Reference in New Issue
Block a user