基础内容-7
Trail 完整Note
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user