基础内容11 - SAVE LOAD EXPORT

This commit is contained in:
SoulliesOfficial
2025-02-08 23:09:50 -05:00
parent 7ab738cb68
commit e3a8450a27
61 changed files with 1229 additions and 237 deletions

View File

@@ -39,6 +39,8 @@ namespace Ichni.RhythmGame
private void Update()
{
Debug.Log(timeDurationSubmodule == null);
if (timeDurationSubmodule.CheckTimeInDuration(EditorManager.instance.songModule.songTime))
{
(trackTimeSubmodule as TrackTimeSubmoduleMovable)?.UpdateTrackPart();

View File

@@ -98,7 +98,7 @@ namespace Ichni.RhythmGame
public override void ExecuteBM()
{
CrossTrackPoint.GenerateElement(elementName, elementGuid, tags, false,
matchedElement = CrossTrackPoint.GenerateElement(elementName, elementGuid, tags, false,
GetElement(attachedElementGuid) as ElementFolder, trackSwitch, trackPercent);
}

View File

@@ -71,7 +71,7 @@ namespace Ichni.RhythmGame
public override void ExecuteBM()
{
TrackHeadPoint.GenerateElement(elementName, elementGuid, tags, false,
matchedElement = TrackHeadPoint.GenerateElement(elementName, elementGuid, tags, false,
GetElement(attachedElementGuid) as Track);
}

View File

@@ -98,7 +98,7 @@ namespace Ichni.RhythmGame
public override void ExecuteBM()
{
TrackPercentPoint.GenerateElement(elementName, elementGuid, tags, false,
matchedElement = TrackPercentPoint.GenerateElement(elementName, elementGuid, tags, false,
GetElement(attachedElementGuid) as Track, trackPercent.ConvertToGameType());
}

View File

@@ -19,7 +19,7 @@ namespace Ichni.RhythmGame
public TrackPathSubmodule(Track track, Track.TrackSpaceType trackSpaceType, Track.TrackSamplingType trackSamplingType, bool isClosed) : base(track)
{
this.path = track.AddComponent<SplineComputer>();
track.trackPathSubmodule = this;
this.track.trackPathSubmodule = this;
this.pathNodeList = new List<PathNode>();
this.trackSpaceType = trackSpaceType;
this.trackSamplingType = trackSamplingType;
@@ -100,12 +100,14 @@ namespace Ichni.RhythmGame
attachedElement = GameElement_BM.GetElement(attachedElementGuid);
Track track = attachedElement as Track;
track.trackPathSubmodule = new TrackPathSubmodule(track, trackSpaceType, trackSamplingType, isClosed);
track.submoduleList.Add(track.trackPathSubmodule);
}
public override void DuplicateBM(GameElement attached)
{
Track track = attachedElement as Track;
track.trackPathSubmodule = new TrackPathSubmodule(track, trackSpaceType, trackSamplingType, isClosed);
track.submoduleList.Add(track.trackPathSubmodule);
}
}

View File

@@ -14,7 +14,6 @@ namespace Ichni.RhythmGame
public TrackRendererSubmodule(Track track) : base(track)
{
this.track = track;
this.track.trackRendererSubmodule = this;
}
@@ -78,12 +77,14 @@ namespace Ichni.RhythmGame
attachedElement = GameElement_BM.GetElement(attachedElementGuid);
Track track = attachedElement as Track;
track.trackRendererSubmodule = new TrackRendererSubmodule(track);//TODO: Implement Material
track.submoduleList.Add(track.trackRendererSubmodule);
}
public override void DuplicateBM(GameElement attached)
{
Track track = attached as Track;
track.trackRendererSubmodule = new TrackRendererSubmodule(track);//TODO: Implement Material
track.submoduleList.Add(track.trackRendererSubmodule);
}
}
}

View File

@@ -39,9 +39,7 @@ namespace Ichni.RhythmGame
this.trackTotalTime = trackEndTime - trackStartTime;
this.visibleTrackTimeLength = visibleTrackTimeLength;
this.animationCurveType = animationCurveType;
track.timeDurationSubmodule.startTime = trackStartTime;
track.timeDurationSubmodule.endTime = trackEndTime + visibleTrackTimeLength;
//timeDurationSubmodule 根据下辖Note的时间来设置
}
public void UpdateTrackPart()
@@ -98,12 +96,14 @@ namespace Ichni.RhythmGame
attachedElement = GameElement_BM.GetElement(attachedElementGuid);
Track track = attachedElement as Track;
track.trackTimeSubmodule = new TrackTimeSubmoduleMovable(track, trackStartTime, trackEndTime, visibleTrackTimeLength, animationCurveType);
track.submoduleList.Add(track.trackTimeSubmodule);
}
public override void DuplicateBM(GameElement attached)
{
Track track = attached as Track;
track.trackTimeSubmodule = new TrackTimeSubmoduleMovable(track, trackStartTime, trackEndTime, visibleTrackTimeLength, animationCurveType);
track.submoduleList.Add(track.trackTimeSubmodule);
}
}
}
@@ -123,9 +123,6 @@ namespace Ichni.RhythmGame
this.animationCurveType = animationCurveType;
this.headPercent = 0;
this.tailPercent = 1;
track.timeDurationSubmodule.startTime = -999;
track.timeDurationSubmodule.endTime = 999;
//timeDurationSubmodule 根据下辖Note的时间来设置
}
@@ -158,12 +155,14 @@ namespace Ichni.RhythmGame
attachedElement = GameElement_BM.GetElement(attachedElementGuid);
Track track = attachedElement as Track;
track.trackTimeSubmodule = new TrackTimeSubmoduleStatic(track, trackTotalTime, animationCurveType);
track.submoduleList.Add(track.trackTimeSubmodule);
}
public override void DuplicateBM(GameElement attached)
{
Track track = attached as Track;
track.trackTimeSubmodule = new TrackTimeSubmoduleStatic(track, trackTotalTime, animationCurveType);
track.submoduleList.Add(track.trackTimeSubmodule);
}
}
}