mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-12 08:57:37 +02:00
Basic saving and loading system
This commit is contained in:
@ -26,12 +26,12 @@ namespace RhythmHeavenMania.Editor.Track
|
||||
Beatmap.TempoChange tempoChange = GameManager.instance.Beatmap.tempoChanges[i];
|
||||
AddTempoChange(false, tempoChange);
|
||||
}
|
||||
|
||||
StartingBPM.GetChild(0).GetComponent<TMP_Text>().text = GameManager.instance.Beatmap.bpm.ToString();
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
StartingBPM.GetChild(0).GetComponent<TMP_Text>().text = GameManager.instance.Beatmap.bpm.ToString();
|
||||
|
||||
if (Timeline.instance.timelineState.tempoChange && !Conductor.instance.NotStopped())
|
||||
{
|
||||
if (RectTransformUtility.RectangleContainsScreenPoint(rectTransform, Input.mousePosition, Camera.main))
|
||||
|
@ -80,9 +80,13 @@ namespace RhythmHeavenMania.Editor.Track
|
||||
|
||||
#region Initializers
|
||||
|
||||
public void Init()
|
||||
public void LoadRemix()
|
||||
{
|
||||
instance = this;
|
||||
for (int i = 0; i < eventObjs.Count; i++)
|
||||
{
|
||||
Destroy(eventObjs[i].gameObject);
|
||||
}
|
||||
eventObjs.Clear();
|
||||
|
||||
for (int i = 0; i < GameManager.instance.Beatmap.entities.Count; i++)
|
||||
{
|
||||
@ -91,6 +95,13 @@ namespace RhythmHeavenMania.Editor.Track
|
||||
|
||||
AddEventObject(e.datamodel, false, new Vector3(e.beat, -e.track * LayerHeight()), e, false, RandomID());
|
||||
}
|
||||
}
|
||||
|
||||
public void Init()
|
||||
{
|
||||
instance = this;
|
||||
|
||||
LoadRemix();
|
||||
|
||||
TimelineSlider.GetChild(0).GetComponent<Image>().color = EditorTheme.theme.properties.BeatMarkerCol.Hex2RGB();
|
||||
TimelineSlider.GetChild(1).GetComponent<Image>().color = EditorTheme.theme.properties.BeatMarkerCol.Hex2RGB();
|
||||
@ -477,7 +488,6 @@ namespace RhythmHeavenMania.Editor.Track
|
||||
}
|
||||
}
|
||||
|
||||
Editor.EventObjs.Add(eventObj);
|
||||
eventObjs.Add(eventObj);
|
||||
|
||||
eventObj.eventObjID = eventId;
|
||||
@ -487,7 +497,7 @@ namespace RhythmHeavenMania.Editor.Track
|
||||
|
||||
public void DestroyEventObject(Beatmap.Entity entity)
|
||||
{
|
||||
Editor.EventObjs.Remove(entity.eventObj);
|
||||
eventObjs.Remove(entity.eventObj);
|
||||
GameManager.instance.Beatmap.entities.Remove(entity);
|
||||
Timeline.instance.eventObjs.Remove(entity.eventObj);
|
||||
|
||||
|
Reference in New Issue
Block a user