基础内容-7

Trail
完整Note
This commit is contained in:
SoulliesOfficial
2025-02-02 08:34:54 -05:00
parent 38ec74bfef
commit efca87e9cd
60 changed files with 1503 additions and 228 deletions

View File

@@ -1,3 +1,4 @@
using System;
using System.Collections;
using System.Collections.Generic;
using Lean.Pool;
@@ -10,10 +11,13 @@ namespace Ichni.RhythmGame
public FlexibleFloat totalTime;
public TrackTimeSubmoduleStatic targetTrackTimeSubmoduleStatic;
public static TrackTotalTimeChange GenerateElement(string elementName, Track targetTrack, FlexibleFloat totalTime)
public static TrackTotalTimeChange GenerateElement(string elementName, Guid id,
List<string> tags, Track targetTrack, FlexibleFloat totalTime)
{
TrackTotalTimeChange trackTotalTimeChange = Instantiate(EditorManager.instance.basePrefabs.emptyObject).AddComponent<TrackTotalTimeChange>();
trackTotalTimeChange.NewInitialize(elementName, targetTrack);
trackTotalTimeChange.Initialize(elementName, id, tags);
trackTotalTimeChange.targetObject = targetTrack;
if (targetTrack.trackTimeSubmodule is TrackTimeSubmoduleStatic submoduleStatic)
{
@@ -26,7 +30,9 @@ namespace Ichni.RhythmGame
trackTotalTimeChange.totalTime = totalTime;
trackTotalTimeChange.animationReturnType = FlexibleReturnType.Before;
trackTotalTimeChange.SetTimeDuration(totalTime);
trackTotalTimeChange.timeDurationSubmodule.SetDuration(totalTime);
trackTotalTimeChange.SetParent(targetTrack);
return trackTotalTimeChange;
}