基础内容-9

为次级模块增加存档类,仍在思考框架中
This commit is contained in:
SoulliesOfficial
2025-02-06 23:01:44 -05:00
parent bc1c5d65ef
commit 4cd90eaede
14 changed files with 436 additions and 19 deletions

View File

@@ -1,6 +1,7 @@
using System.Collections;
using System.Collections.Generic;
using Dreamteck.Splines;
using Ichni.RhythmGame.Beatmap;
using Unity.VisualScripting;
using UnityEngine;
@@ -63,4 +64,48 @@ namespace Ichni.RhythmGame
path.SetPoint(point.index, point.node, SplineComputer.Space.Local);
}
}
public partial class TrackPathSubmodule
{
override public void SaveBM()
{
matchedBM = new TrackPathSubmodule_BM(attachedElement, this);
}
}
namespace Beatmap
{
public class TrackPathSubmodule_BM : Submodule_BM
{
public Track.TrackSpaceType trackSpaceType;
public Track.TrackSamplingType trackSamplingType;
public bool isClosed;
public TrackPathSubmodule_BM()
{
}
public TrackPathSubmodule_BM(BaseElement attachedElement, TrackPathSubmodule trackPathSubmodule) : base(
attachedElement)
{
this.trackSpaceType = trackPathSubmodule.trackSpaceType;
this.trackSamplingType = trackPathSubmodule.trackSamplingType;
this.isClosed = trackPathSubmodule.isClosed;
}
public override void ExecuteBM()
{
attachedElement = GetElement(attachedElementGuid);
(attachedElement as Track).trackPathSubmodule = new TrackPathSubmodule(attachedElement as Track, trackSpaceType, trackSamplingType, isClosed);
}
public override void DuplicateBM(BaseElement attached)
{
(attached as Track).trackPathSubmodule = new TrackPathSubmodule(attached as Track, trackSpaceType, trackSamplingType, isClosed);
}
}
}
}