QuickCopy & fix NoteEffects

This commit is contained in:
SoulliesOfficial
2025-02-21 14:08:32 -05:00
parent 70eddeb881
commit 187b2efdad
28 changed files with 277 additions and 60 deletions

View File

@@ -8,7 +8,7 @@ using UnityEngine.Serialization;
namespace Ichni.RhythmGame
{
public abstract class AnimationBase : GameElement, IHaveTimeDurationSubmodule
public abstract partial class AnimationBase : GameElement, IHaveTimeDurationSubmodule
{
public GameElement animatedObject;
public FlexibleReturnType animationReturnType;
@@ -21,6 +21,10 @@ namespace Ichni.RhythmGame
submoduleList.Add(timeDurationSubmodule);
}
/// <summary>
/// 更新动画
/// </summary>
/// <param name="songTime">歌曲时间</param>
protected abstract void UpdateAnimation(float songTime);
protected virtual void Update()
@@ -30,6 +34,16 @@ namespace Ichni.RhythmGame
UpdateAnimation(EditorManager.instance.songInformation.songTime);
}
}
/// <summary>
/// 施加时间偏移即移动所有Flexible参数的时间
/// </summary>
/// <param name="offset"></param>
public virtual void ApplyTimeOffset(float offset)
{
timeDurationSubmodule.startTime += offset;
timeDurationSubmodule.endTime += offset;
}
}
namespace Beatmap

View File

@@ -63,6 +63,15 @@ namespace Ichni.RhythmGame
animationReturnType = FlexibleReturnType.MiddleInterval;
}
}
public override void ApplyTimeOffset(float offset)
{
base.ApplyTimeOffset(offset);
colorR.animations.ForEach(anim => anim.ApplyTimeOffset(offset));
colorG.animations.ForEach(anim => anim.ApplyTimeOffset(offset));
colorB.animations.ForEach(anim => anim.ApplyTimeOffset(offset));
colorA.animations.ForEach(anim => anim.ApplyTimeOffset(offset));
}
}
public partial class BaseColorChange

View File

@@ -66,6 +66,15 @@ namespace Ichni.RhythmGame
animationReturnType = FlexibleReturnType.MiddleInterval;
}
}
public override void ApplyTimeOffset(float offset)
{
base.ApplyTimeOffset(offset);
colorR.animations.ForEach(anim => anim.ApplyTimeOffset(offset));
colorG.animations.ForEach(anim => anim.ApplyTimeOffset(offset));
colorB.animations.ForEach(anim => anim.ApplyTimeOffset(offset));
colorI.animations.ForEach(anim => anim.ApplyTimeOffset(offset));
}
}
public partial class EmissionColorChange

View File

@@ -45,6 +45,12 @@ namespace Ichni.RhythmGame
targetTrackTimeSubmoduleStatic.trackTotalTime = totalTime.value;
}
}
public override void ApplyTimeOffset(float offset)
{
base.ApplyTimeOffset(offset);
totalTime.animations.ForEach(anim => anim.ApplyTimeOffset(offset));
}
}
public partial class TrackTotalTimeChange

View File

@@ -59,6 +59,14 @@ namespace Ichni.RhythmGame
animationReturnType = FlexibleReturnType.MiddleInterval;
}
}
public override void ApplyTimeOffset(float offset)
{
base.ApplyTimeOffset(offset);
positionX.animations.ForEach(anim => anim.ApplyTimeOffset(offset));
positionY.animations.ForEach(anim => anim.ApplyTimeOffset(offset));
positionZ.animations.ForEach(anim => anim.ApplyTimeOffset(offset));
}
}
public partial class Displacement

View File

@@ -71,6 +71,12 @@ namespace Ichni.RhythmGame
matchedBM = new LookAt_BM(elementName, elementGuid, tags, parentElement.matchedBM as GameElement_BM,
enabling.ConvertToBM(), lookAtObject.elementGuid);
}
public override void ApplyTimeOffset(float offset)
{
base.ApplyTimeOffset(offset);
enabling.animations.ForEach(anim => anim.ApplyTimeOffset(offset));
}
}
namespace Beatmap

View File

@@ -59,6 +59,14 @@ namespace Ichni.RhythmGame
animationReturnType = FlexibleReturnType.MiddleInterval;
}
}
public override void ApplyTimeOffset(float offset)
{
base.ApplyTimeOffset(offset);
scaleX.animations.ForEach(anim => anim.ApplyTimeOffset(offset));
scaleY.animations.ForEach(anim => anim.ApplyTimeOffset(offset));
scaleZ.animations.ForEach(anim => anim.ApplyTimeOffset(offset));
}
}
public partial class Scale

View File

@@ -61,6 +61,14 @@ namespace Ichni.RhythmGame
animationReturnType = FlexibleReturnType.MiddleInterval;
}
}
public override void ApplyTimeOffset(float offset)
{
base.ApplyTimeOffset(offset);
eulerAngleX.animations.ForEach(anim => anim.ApplyTimeOffset(offset));
eulerAngleY.animations.ForEach(anim => anim.ApplyTimeOffset(offset));
eulerAngleZ.animations.ForEach(anim => anim.ApplyTimeOffset(offset));
}
}
public partial class Swirl