QuickCopy & fix NoteEffects
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user