基础内容-8
添加BM存档类
This commit is contained in:
@@ -10,7 +10,7 @@ using UnityEngine;
|
||||
|
||||
namespace Ichni.RhythmGame
|
||||
{
|
||||
public class Displacement : AnimationBase
|
||||
public partial class Displacement : AnimationBase
|
||||
{
|
||||
public TransformSubmodule targetTransformSubmodule;
|
||||
public FlexibleFloat positionX, positionY, positionZ;
|
||||
@@ -84,4 +84,47 @@ namespace Ichni.RhythmGame
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
public partial class Displacement
|
||||
{
|
||||
public override void SaveBM()
|
||||
{
|
||||
matchedBM = new Beatmap.Displacement_BM(elementName, elementGuid, tags, parentElement.matchedBM,
|
||||
positionX.ConvertToBM(), positionY.ConvertToBM(), positionZ.ConvertToBM());
|
||||
}
|
||||
}
|
||||
|
||||
namespace Beatmap
|
||||
{
|
||||
public class Displacement_BM : BaseElement_BM
|
||||
{
|
||||
public FlexibleFloat_BM positionX, positionY, positionZ;
|
||||
|
||||
public Displacement_BM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public Displacement_BM(string elementName, Guid elementGuid, List<string> tags,
|
||||
BaseElement_BM attachedElement, FlexibleFloat_BM positionX, FlexibleFloat_BM positionY, FlexibleFloat_BM positionZ)
|
||||
: base(elementName, elementGuid, tags, attachedElement)
|
||||
{
|
||||
this.positionX = positionX;
|
||||
this.positionY = positionY;
|
||||
this.positionZ = positionZ;
|
||||
}
|
||||
|
||||
public override void ExecuteBM()
|
||||
{
|
||||
Displacement.GenerateElement(elementName, elementGuid, tags, GetElement(attachedElementGuid),
|
||||
positionX.ConvertToGameType(), positionY.ConvertToGameType(), positionZ.ConvertToGameType());
|
||||
}
|
||||
|
||||
public override BaseElement DuplicateBM(BaseElement parent)
|
||||
{
|
||||
return Displacement.GenerateElement(elementName, elementGuid, tags, parent,
|
||||
positionX.ConvertToGameType(), positionY.ConvertToGameType(), positionZ.ConvertToGameType());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user