调bug
添加了track的一些refresh(static没做) TrackPercentPoint 在有Movable的前提下添加默认动画
This commit is contained in:
@@ -18,6 +18,7 @@ namespace Ichni.RhythmGame
|
||||
public override void SetDefaultSubmodules()
|
||||
{
|
||||
timeDurationSubmodule = new TimeDurationSubmodule(this);
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -12,34 +12,31 @@ namespace Ichni.RhythmGame
|
||||
{
|
||||
private TransformSubmodule targetTransformSubmodule;
|
||||
public FlexibleFloat eulerAngleX, eulerAngleY, eulerAngleZ;
|
||||
|
||||
public static Swirl GenerateElement(string elementName, Guid id,
|
||||
|
||||
public static Swirl GenerateElement(string elementName, Guid id,
|
||||
List<string> tags, bool isFirstGenerated, GameElement animatedObject,
|
||||
FlexibleFloat eulerAngleX, FlexibleFloat eulerAngleY, FlexibleFloat eulerAngleZ)
|
||||
{
|
||||
Swirl swirl = Instantiate(EditorManager.instance.basePrefabs.emptyObject).AddComponent<Swirl>();
|
||||
|
||||
swirl.Initialize(elementName, id, tags, isFirstGenerated, animatedObject);
|
||||
|
||||
|
||||
swirl.animatedObject = animatedObject;
|
||||
|
||||
|
||||
swirl.eulerAngleX = eulerAngleX;
|
||||
swirl.eulerAngleY = eulerAngleY;
|
||||
swirl.eulerAngleZ = eulerAngleZ;
|
||||
swirl.animationReturnType = FlexibleReturnType.Before;
|
||||
|
||||
|
||||
swirl.targetTransformSubmodule = (animatedObject as IHaveTransformSubmodule).transformSubmodule;
|
||||
|
||||
|
||||
|
||||
|
||||
//swirl.timeDurationSubmodule.SetDuration(eulerAngleX, eulerAngleY, eulerAngleZ);
|
||||
|
||||
|
||||
return swirl;
|
||||
}
|
||||
|
||||
public override void SetDefaultSubmodules()
|
||||
{
|
||||
timeDurationSubmodule = new TimeDurationSubmodule(this);
|
||||
}
|
||||
|
||||
|
||||
protected override void UpdateAnimation(float songTime)
|
||||
{
|
||||
@@ -61,7 +58,7 @@ namespace Ichni.RhythmGame
|
||||
animationReturnType = FlexibleReturnType.MiddleInterval;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public override void ApplyTimeOffset(float offset)
|
||||
{
|
||||
base.ApplyTimeOffset(offset);
|
||||
@@ -70,7 +67,7 @@ namespace Ichni.RhythmGame
|
||||
eulerAngleZ.animations.ForEach(anim => anim.ApplyTimeOffset(offset));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public partial class Swirl
|
||||
{
|
||||
public override void SaveBM()
|
||||
@@ -82,10 +79,10 @@ namespace Ichni.RhythmGame
|
||||
public override void SetUpInspector()
|
||||
{
|
||||
base.SetUpInspector();
|
||||
|
||||
|
||||
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
|
||||
var container = inspector.GenerateContainer("Swirl");
|
||||
|
||||
|
||||
var eulerAngleXButton = inspector.GenerateButton(this, container, "Euler Angle X",
|
||||
() =>
|
||||
{
|
||||
@@ -101,19 +98,19 @@ namespace Ichni.RhythmGame
|
||||
{
|
||||
inspector.GenerateCompositeParameterWindow(this, "Euler Angle Z", nameof(eulerAngleZ)).SetAsFlexibleFloat();
|
||||
});
|
||||
|
||||
|
||||
var graphicEditor = inspector.GenerateButton(this, container, "GraphicEditor",
|
||||
() =>
|
||||
{
|
||||
inspector.GenerateGraphicalFlexibleFloatWindow(this, "Displacement",
|
||||
new FlexibleFloat[] { eulerAngleX, eulerAngleY, eulerAngleZ },
|
||||
new FlexibleFloat[] { eulerAngleX, eulerAngleY, eulerAngleZ },
|
||||
new string[] { "EulerX", "EulerY", "EulerZ" });
|
||||
});
|
||||
|
||||
|
||||
container.SetDeviver(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace Beatmap
|
||||
{
|
||||
public class Swirl_BM : AnimationBase_BM
|
||||
@@ -121,10 +118,10 @@ namespace Ichni.RhythmGame
|
||||
public FlexibleFloat_BM eulerAngleX, eulerAngleY, eulerAngleZ;
|
||||
public Swirl_BM()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
public Swirl_BM(string elementName, Guid elementGuid, List<string> tags, GameElement_BM attachedElement,
|
||||
public Swirl_BM(string elementName, Guid elementGuid, List<string> tags, GameElement_BM attachedElement,
|
||||
FlexibleFloat_BM eulerAngleX, FlexibleFloat_BM eulerAngleY, FlexibleFloat_BM eulerAngleZ)
|
||||
: base(elementName, elementGuid, tags, attachedElement)
|
||||
{
|
||||
@@ -135,7 +132,7 @@ namespace Ichni.RhythmGame
|
||||
|
||||
public override void ExecuteBM()
|
||||
{
|
||||
matchedElement = Swirl.GenerateElement(elementName, elementGuid, tags, false, GetElement(attachedElementGuid),
|
||||
matchedElement = Swirl.GenerateElement(elementName, elementGuid, tags, false, GetElement(attachedElementGuid),
|
||||
eulerAngleX.ConvertToGameType(), eulerAngleY.ConvertToGameType(), eulerAngleZ.ConvertToGameType());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user