大修
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: edfdf70005f9be24388d86e2da108569
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d2c6ad5a0fcb1c2468e0dc07b5f89e29
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Ichni.RhythmGame.Beatmap
|
||||
{
|
||||
public abstract class AnimationBase_BM : GameElement_BM
|
||||
{
|
||||
public AnimationBase_BM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public AnimationBase_BM(string elementName, Guid elementGuid, List<string> tags,
|
||||
GameElement_BM attachedElement) : base(elementName, elementGuid, tags, attachedElement)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ebd30931525d68149af9a32738f6d24d
|
||||
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Ichni.RhythmGame.Beatmap
|
||||
{
|
||||
public class BaseColorChange_BM : AnimationBase_BM
|
||||
{
|
||||
public FlexibleFloat_BM colorR, colorG, colorB, colorA;
|
||||
|
||||
public BaseColorChange_BM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public BaseColorChange_BM(string elementName, Guid elementGuid, List<string> tags,
|
||||
GameElement_BM attachedElement, FlexibleFloat_BM colorR, FlexibleFloat_BM colorG,
|
||||
FlexibleFloat_BM colorB, FlexibleFloat_BM colorA) :
|
||||
base(elementName, elementGuid, tags, attachedElement)
|
||||
{
|
||||
this.colorR = colorR;
|
||||
this.colorG = colorG;
|
||||
this.colorB = colorB;
|
||||
this.colorA = colorA;
|
||||
}
|
||||
|
||||
public override void ExecuteBM()
|
||||
{
|
||||
matchedElement = BaseColorChange.GenerateElement(elementName, elementGuid, tags, false,
|
||||
GetElement(attachedElementGuid), colorR.ConvertToGameType(),
|
||||
colorG.ConvertToGameType(), colorB.ConvertToGameType(), colorA.ConvertToGameType());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 27336e14adc7c584abfc8b8ab934b5b8
|
||||
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Ichni.RhythmGame.Beatmap
|
||||
{
|
||||
public partial class CameraFieldOfView_BM : AnimationBase_BM
|
||||
{
|
||||
public FlexibleFloat_BM fieldOfView;
|
||||
|
||||
public CameraFieldOfView_BM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public CameraFieldOfView_BM(string elementName, Guid elementGuid, List<string> tags,
|
||||
GameElement_BM attachedElement, FlexibleFloat_BM fieldOfView)
|
||||
: base(elementName, elementGuid, tags, attachedElement)
|
||||
{
|
||||
this.fieldOfView = fieldOfView;
|
||||
}
|
||||
|
||||
public override void ExecuteBM()
|
||||
{
|
||||
matchedElement = CameraFieldOfView.GenerateElement(elementName, elementGuid, tags, false,
|
||||
GetElement(attachedElementGuid) as GameCamera, fieldOfView.ConvertToGameType());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5a069835c1584bd4b99c22386a91b1e9
|
||||
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Ichni.RhythmGame.Beatmap
|
||||
{
|
||||
public class Displacement_BM : AnimationBase_BM
|
||||
{
|
||||
public FlexibleFloat_BM positionX, positionY, positionZ;
|
||||
|
||||
public Displacement_BM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public Displacement_BM(string elementName, Guid elementGuid, List<string> tags,
|
||||
GameElement_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()
|
||||
{
|
||||
matchedElement = Displacement.GenerateElement(elementName, elementGuid, tags, false, GetElement(attachedElementGuid),
|
||||
positionX.ConvertToGameType(), positionY.ConvertToGameType(), positionZ.ConvertToGameType());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 96e9ad1bfb9ff804f9d6ed4f0a3b7a5a
|
||||
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Ichni.RhythmGame.Beatmap
|
||||
{
|
||||
public class EmissionColorChange_BM : AnimationBase_BM
|
||||
{
|
||||
public FlexibleFloat_BM colorR, colorG, colorB, colorI;
|
||||
|
||||
public EmissionColorChange_BM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public EmissionColorChange_BM(string elementName, Guid elementGuid, List<string> tags, GameElement_BM parentElement,
|
||||
FlexibleFloat_BM colorR, FlexibleFloat_BM colorG, FlexibleFloat_BM colorB, FlexibleFloat_BM colorI) :
|
||||
base(elementName, elementGuid, tags, parentElement)
|
||||
{
|
||||
this.colorR = colorR;
|
||||
this.colorG = colorG;
|
||||
this.colorB = colorB;
|
||||
this.colorI = colorI;
|
||||
}
|
||||
|
||||
public override void ExecuteBM()
|
||||
{
|
||||
matchedElement = EmissionColorChange.GenerateElement(elementName, elementGuid, tags, false, GetElement(attachedElementGuid),
|
||||
colorR.ConvertToGameType(), colorG.ConvertToGameType(), colorB.ConvertToGameType(), colorI.ConvertToGameType());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 34026ee9602fd6a488a345fdbcf3afe2
|
||||
@@ -0,0 +1,35 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Ichni.RhythmGame.Beatmap
|
||||
{
|
||||
public class LookAt_BM : GameElement_BM
|
||||
{
|
||||
public FlexibleBool_BM enabling;
|
||||
public Guid lookAtObjectGuid;
|
||||
|
||||
public LookAt_BM()
|
||||
{
|
||||
}
|
||||
|
||||
public LookAt_BM(string elementName, Guid elementGuid, List<string> tags,
|
||||
GameElement_BM attachedElement, FlexibleBool_BM enabling, Guid lookAtObjectGuid)
|
||||
: base(elementName, elementGuid, tags, attachedElement)
|
||||
{
|
||||
this.enabling = enabling;
|
||||
this.lookAtObjectGuid = lookAtObjectGuid;
|
||||
}
|
||||
|
||||
public override void ExecuteBM()
|
||||
{
|
||||
matchedElement = LookAt.GenerateElement(elementName, elementGuid, tags, false,
|
||||
GetElement(attachedElementGuid), GetElement(lookAtObjectGuid), enabling.ConvertToGameType());
|
||||
matchedElement.matchedBM = this;
|
||||
}
|
||||
|
||||
public override void AfterExecute()
|
||||
{
|
||||
(matchedElement as LookAt).targetGameElement = GetElement(lookAtObjectGuid);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9d2e7b8a937ae8743b844a99e494feeb
|
||||
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Ichni.RhythmGame.Beatmap
|
||||
{
|
||||
public class Scale_BM : GameElement_BM
|
||||
{
|
||||
public FlexibleFloat_BM scaleX, scaleY, scaleZ;
|
||||
|
||||
public Scale_BM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public Scale_BM(string elementName, Guid elementGuid, List<string> tags, GameElement_BM attachedElement,
|
||||
FlexibleFloat_BM scaleX, FlexibleFloat_BM scaleY, FlexibleFloat_BM scaleZ)
|
||||
: base(elementName, elementGuid, tags, attachedElement)
|
||||
{
|
||||
this.scaleX = scaleX;
|
||||
this.scaleY = scaleY;
|
||||
this.scaleZ = scaleZ;
|
||||
}
|
||||
|
||||
public override void ExecuteBM()
|
||||
{
|
||||
matchedElement = Scale.GenerateElement(elementName, elementGuid, tags, false, GetElement(attachedElementGuid),
|
||||
scaleX.ConvertToGameType(), scaleY.ConvertToGameType(), scaleZ.ConvertToGameType());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5488fe141701d9a428abfacc7e42b3de
|
||||
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Ichni.RhythmGame.Beatmap
|
||||
{
|
||||
public class Swirl_BM : AnimationBase_BM
|
||||
{
|
||||
public FlexibleFloat_BM eulerAngleX, eulerAngleY, eulerAngleZ;
|
||||
public Swirl_BM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
this.eulerAngleX = eulerAngleX;
|
||||
this.eulerAngleY = eulerAngleY;
|
||||
this.eulerAngleZ = eulerAngleZ;
|
||||
}
|
||||
|
||||
public override void ExecuteBM()
|
||||
{
|
||||
matchedElement = Swirl.GenerateElement(elementName, elementGuid, tags, false, GetElement(attachedElementGuid),
|
||||
eulerAngleX.ConvertToGameType(), eulerAngleY.ConvertToGameType(), eulerAngleZ.ConvertToGameType());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cac746f176b9b4c4fac430e7c184e726
|
||||
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Ichni.RhythmGame.Beatmap
|
||||
{
|
||||
public class TrackTotalTimeChange_BM : AnimationBase_BM // Wait, inherited from GameElement_BM or AnimationBase_BM? Original is GameElement_BM
|
||||
{
|
||||
public FlexibleFloat_BM totalTime;
|
||||
|
||||
public TrackTotalTimeChange_BM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public TrackTotalTimeChange_BM(string elementName, Guid elementGuid, List<string> tags,
|
||||
GameElement_BM attachedElement, FlexibleFloat_BM totalTime) :
|
||||
base(elementName, elementGuid, tags, attachedElement)
|
||||
{
|
||||
this.totalTime = totalTime;
|
||||
}
|
||||
|
||||
public override void ExecuteBM()
|
||||
{
|
||||
matchedElement = TrackTotalTimeChange.GenerateElement(elementName, elementGuid, tags, false,
|
||||
GetElement(attachedElementGuid) as Track, totalTime.ConvertToGameType());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f36e781fad6cc7445ad32aa52f197e50
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b8868783dbcf51548922341076d0a007
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
|
||||
namespace Ichni.RhythmGame.Beatmap
|
||||
{
|
||||
public abstract class BaseElement_BM
|
||||
{
|
||||
public Guid attachedElementGuid;
|
||||
|
||||
/// <summary>
|
||||
/// 从存档类中生成游戏物体
|
||||
/// </summary>
|
||||
public abstract void ExecuteBM();
|
||||
|
||||
/// <summary>
|
||||
/// 在AfterInitialize中被调用,用于处理GameElement的“需要引用”的物体在此物体后面生成的情况。
|
||||
/// 注意,如果使用此函数,需要在ExecuteBM中设置 matchedElement.matchedBM = this;
|
||||
/// </summary>
|
||||
public virtual void AfterExecute()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ef2eff94bdee06248854ed21f3065507
|
||||
@@ -0,0 +1,65 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Ichni.RhythmGame.Beatmap
|
||||
{
|
||||
[Serializable]
|
||||
public abstract class GameElement_BM : BaseElement_BM
|
||||
{
|
||||
[NonSerialized]
|
||||
public static Dictionary<Guid, GameElement_BM> identifier = new(); //存档类的标识符
|
||||
|
||||
[NonSerialized]
|
||||
public GameElement matchedElement; //存档类对应的游戏物体
|
||||
|
||||
public string elementName;
|
||||
public List<string> tags;
|
||||
public Guid elementGuid;
|
||||
|
||||
public GameElement_BM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public GameElement_BM(string elementName, Guid elementGuid, List<string> tags, GameElement_BM attachedElement)
|
||||
{
|
||||
this.elementName = elementName;
|
||||
this.elementGuid = elementGuid;
|
||||
this.tags = tags;
|
||||
|
||||
attachedElementGuid = attachedElement?.elementGuid ?? Guid.Empty;
|
||||
|
||||
identifier.TryAdd(this.elementGuid, this);
|
||||
}
|
||||
|
||||
public static GameElement_BM GetElementBM(Guid id)
|
||||
{
|
||||
return identifier.GetValueOrDefault(id);
|
||||
}
|
||||
|
||||
public static GameElement GetElement(Guid id)
|
||||
{
|
||||
if (identifier.TryGetValue(id, out GameElement_BM element_BM))
|
||||
{
|
||||
return element_BM.matchedElement;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static List<BaseElement_BM> GetAllAttachedBaseElements(GameElement_BM gameElement, List<BaseElement_BM> clip)
|
||||
{
|
||||
Guid elementGuid = gameElement.elementGuid;
|
||||
List<BaseElement_BM> result = new List<BaseElement_BM>();
|
||||
foreach (BaseElement_BM element in clip)
|
||||
{
|
||||
if (element.attachedElementGuid == elementGuid)
|
||||
{
|
||||
result.Add(element);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d5f95c48fd44fe94ab431cc0b0d56207
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bb6bd3e01b543b04385e6548dd703bbe
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e913aac8b094bea4892aac452ab66160
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,40 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Ichni.RhythmGame.Beatmap
|
||||
{
|
||||
public class ColorSubmodule_BM : Submodule_BM
|
||||
{
|
||||
public Color originalBaseColor;
|
||||
public bool emissionEnabled;
|
||||
public Color originalEmissionColor;
|
||||
public float originalEmissionIntensity;
|
||||
|
||||
public ColorSubmodule_BM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public ColorSubmodule_BM(GameElement attachedElement) : base(attachedElement)
|
||||
{
|
||||
if (attachedElement is IHaveColorSubmodule host)
|
||||
{
|
||||
ColorSubmodule colorSubmodule = host.colorSubmodule;
|
||||
this.originalBaseColor = colorSubmodule.originalBaseColor;
|
||||
this.emissionEnabled = colorSubmodule.emissionEnabled;
|
||||
this.originalEmissionColor = colorSubmodule.originalEmissionColor;
|
||||
this.originalEmissionIntensity = colorSubmodule.originalEmissionIntensity;
|
||||
}
|
||||
}
|
||||
|
||||
public override void ExecuteBM()
|
||||
{
|
||||
attachedElement = GameElement_BM.GetElement(attachedElementGuid);
|
||||
if (attachedElement is IHaveColorSubmodule host)
|
||||
{
|
||||
host.colorSubmodule = new ColorSubmodule(attachedElement,
|
||||
originalBaseColor, emissionEnabled, originalEmissionColor, originalEmissionIntensity);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7a045579f4cbfb64481199b816bf4181
|
||||
@@ -0,0 +1,45 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Ichni.RhythmGame.Beatmap
|
||||
{
|
||||
public class EffectSubmodule_BM : Submodule_BM
|
||||
{
|
||||
public Dictionary<string, List<EffectBase_BM>> effectCollection;
|
||||
|
||||
public EffectSubmodule_BM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
public override void ExecuteBM()
|
||||
{
|
||||
attachedElement = GameElement_BM.GetElement(attachedElementGuid);
|
||||
if (attachedElement is IHaveEffectSubmodule host)
|
||||
{
|
||||
host.effectSubmodule = new EffectSubmodule(attachedElement, effectCollection);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public abstract class EffectBase_BM
|
||||
{
|
||||
public float effectTime;
|
||||
|
||||
public EffectBase_BM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public EffectBase_BM(float effectTime)
|
||||
{
|
||||
this.effectTime = effectTime;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 转换为游戏类
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public abstract EffectBase ConvertToGameType(GameElement attachedGameElement);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3297d909adad61947be63f25ac4db7a6
|
||||
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Ichni.RhythmGame.Beatmap
|
||||
{
|
||||
public abstract class Submodule_BM : BaseElement_BM
|
||||
{
|
||||
[System.NonSerialized] protected GameElement attachedElement; //存档类对应的游戏物体
|
||||
|
||||
public Submodule_BM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public Submodule_BM(GameElement attachedElement)
|
||||
{
|
||||
this.attachedElement = attachedElement;
|
||||
attachedElementGuid = attachedElement.elementGuid;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c61675f6a6854c342bff8d180aa21953
|
||||
@@ -0,0 +1,35 @@
|
||||
using System;
|
||||
|
||||
namespace Ichni.RhythmGame.Beatmap
|
||||
{
|
||||
public class TimeDurationSubmodule_BM : Submodule_BM
|
||||
{
|
||||
public bool isOverridingDuration;
|
||||
public float startTime, endTime;
|
||||
|
||||
public TimeDurationSubmodule_BM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public TimeDurationSubmodule_BM(GameElement attachedElement) : base(attachedElement)
|
||||
{
|
||||
if (attachedElement is IHaveTimeDurationSubmodule host)
|
||||
{
|
||||
TimeDurationSubmodule timeDurationSubmodule = host.timeDurationSubmodule;
|
||||
isOverridingDuration = timeDurationSubmodule.isOverridingDuration;
|
||||
startTime = timeDurationSubmodule.startTime;
|
||||
endTime = timeDurationSubmodule.endTime;
|
||||
}
|
||||
}
|
||||
|
||||
public override void ExecuteBM()
|
||||
{
|
||||
attachedElement = GameElement_BM.GetElement(attachedElementGuid);
|
||||
if (attachedElement is IHaveTimeDurationSubmodule host)
|
||||
{
|
||||
host.timeDurationSubmodule = new TimeDurationSubmodule(attachedElement, isOverridingDuration, startTime, endTime);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2869e576cd76caa4c8d2fbd9fd8b6467
|
||||
@@ -0,0 +1,37 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Ichni.RhythmGame.Beatmap
|
||||
{
|
||||
public class TransformSubmodule_BM : Submodule_BM
|
||||
{
|
||||
public Vector3 originalPosition;
|
||||
public Vector3 originalEulerAngles;
|
||||
public Vector3 originalScale;
|
||||
|
||||
public TransformSubmodule_BM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public TransformSubmodule_BM(GameElement attachedElement) : base(attachedElement)
|
||||
{
|
||||
if (attachedElement is IHaveTransformSubmodule host)
|
||||
{
|
||||
TransformSubmodule transformSubmodule = host.transformSubmodule;
|
||||
this.originalPosition = transformSubmodule.originalPosition;
|
||||
this.originalEulerAngles = transformSubmodule.originalEulerAngles;
|
||||
this.originalScale = transformSubmodule.originalScale;
|
||||
}
|
||||
}
|
||||
|
||||
public override void ExecuteBM()
|
||||
{
|
||||
attachedElement = GameElement_BM.GetElement(attachedElementGuid);
|
||||
|
||||
if (attachedElement is IHaveTransformSubmodule host)
|
||||
{
|
||||
host.transformSubmodule = new TransformSubmodule(attachedElement, originalPosition, originalEulerAngles, originalScale);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f325baafa00b1164db1f97b22fe13aba
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f6d79f15a2b8f0c4bb23575962e47d4d
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,33 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Ichni.RhythmGame.Beatmap
|
||||
{
|
||||
public class NoteAudioSubmodule_BM : Submodule_BM
|
||||
{
|
||||
public List<string> generalJudgeAudioList;
|
||||
public List<string> perfectAudioList;
|
||||
public List<string> goodAudioList;
|
||||
public List<string> badAudioList;
|
||||
public List<string> missAudioList;
|
||||
public List<string> holdStartAudioList;
|
||||
|
||||
public NoteAudioSubmodule_BM() { }
|
||||
|
||||
public NoteAudioSubmodule_BM(GameElement attachedElement, NoteAudioSubmodule noteAudioSubmodule) : base(attachedElement)
|
||||
{
|
||||
generalJudgeAudioList = noteAudioSubmodule.generalJudgeAudioList;
|
||||
perfectAudioList = noteAudioSubmodule.perfectAudioList;
|
||||
goodAudioList = noteAudioSubmodule.goodAudioList;
|
||||
badAudioList = noteAudioSubmodule.badAudioList;
|
||||
missAudioList = noteAudioSubmodule.missAudioList;
|
||||
holdStartAudioList = noteAudioSubmodule.holdStartAudioList;
|
||||
}
|
||||
|
||||
public override void ExecuteBM()
|
||||
{
|
||||
attachedElement = GameElement_BM.GetElement(attachedElementGuid);
|
||||
(attachedElement as NoteBase).NoteAudioSubmodule = new NoteAudioSubmodule(attachedElement as NoteBase,
|
||||
generalJudgeAudioList, perfectAudioList, goodAudioList, badAudioList, missAudioList, holdStartAudioList);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b3b9bcdb5e4c018428b3a61fa77147d4
|
||||
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Ichni.RhythmGame.Beatmap
|
||||
{
|
||||
public class NoteJudgeSubmodule_BM : Submodule_BM
|
||||
{
|
||||
public List<NoteJudgeUnit_BM> judgeUnitList;
|
||||
|
||||
public NoteJudgeSubmodule_BM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void ExecuteBM()
|
||||
{
|
||||
attachedElement = GameElement_BM.GetElement(attachedElementGuid);
|
||||
if (attachedElement is NoteBase noteBase)
|
||||
{
|
||||
noteBase.NoteJudgeSubmodule = new NoteJudgeSubmodule(noteBase, judgeUnitList);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 59db6eca1fe72d342afc2c3fc93ae4a3
|
||||
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
|
||||
namespace Ichni.RhythmGame.Beatmap
|
||||
{
|
||||
public class NoteJudgeTriggerSubmodule_BM : Submodule_BM
|
||||
{
|
||||
public NoteJudgeTriggerSubmodule_BM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public NoteJudgeTriggerSubmodule_BM(GameElement attachedElement) : base(attachedElement)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void ExecuteBM()
|
||||
{
|
||||
attachedElement = GameElement_BM.GetElement(attachedElementGuid);
|
||||
if (attachedElement is IHaveNoteJudgeTriggerSubmodule host)
|
||||
{
|
||||
host.noteJudgeTriggerSubmodule = new NoteJudgeTriggerSubmodule(attachedElement);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cdaa10c2d1850cd4c8c693904f3d44bf
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 305d8f651efa6da479993f7b3b1c7723
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,33 @@
|
||||
namespace Ichni.RhythmGame.Beatmap
|
||||
{
|
||||
public class TrackPathSubmodule_BM : Submodule_BM
|
||||
{
|
||||
public Track.TrackSpaceType trackSpaceType;
|
||||
public Track.TrackSamplingType trackSamplingType;
|
||||
public bool isClosed;
|
||||
public bool isShowingDisplay;
|
||||
|
||||
public TrackPathSubmodule_BM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public TrackPathSubmodule_BM(GameElement attachedElement, TrackPathSubmodule trackPathSubmodule) : base(
|
||||
attachedElement)
|
||||
{
|
||||
this.trackSpaceType = trackPathSubmodule.trackSpaceType;
|
||||
this.trackSamplingType = trackPathSubmodule.trackSamplingType;
|
||||
this.isClosed = trackPathSubmodule.isClosed;
|
||||
this.isShowingDisplay = trackPathSubmodule.isShowingDisplay;
|
||||
}
|
||||
|
||||
public override void ExecuteBM()
|
||||
{
|
||||
attachedElement = GameElement_BM.GetElement(attachedElementGuid);
|
||||
if (attachedElement is Track track)
|
||||
{
|
||||
track.trackPathSubmodule = new TrackPathSubmodule(track, trackSpaceType, trackSamplingType, isClosed, isShowingDisplay);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5f79995b86e88ce468fb79156eb0571f
|
||||
@@ -0,0 +1,159 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Ichni.RhythmGame.Beatmap
|
||||
{
|
||||
public class TrackRendererSubmoduleAutoOrient_BM : Submodule_BM
|
||||
{
|
||||
public string materialThemeBundleName;
|
||||
public string materialName;
|
||||
public bool enableEmission;
|
||||
public float emissionIntensity;
|
||||
public bool zWrite;
|
||||
public Vector2 uvScale = Vector2.one;
|
||||
public Vector2 uvOffset = Vector2.zero;
|
||||
|
||||
public TrackRendererSubmoduleAutoOrient_BM() { }
|
||||
|
||||
public TrackRendererSubmoduleAutoOrient_BM(GameElement attachedElement, TrackRendererSubmoduleAutoOrient trSubmodule)
|
||||
: base(attachedElement)
|
||||
{
|
||||
materialThemeBundleName = trSubmodule.materialThemeBundleName;
|
||||
materialName = trSubmodule.materialName;
|
||||
enableEmission = trSubmodule.enableEmission;
|
||||
emissionIntensity = trSubmodule.emissionIntensity;
|
||||
zWrite = trSubmodule.zWrite;
|
||||
uvScale = trSubmodule.uvScale;
|
||||
uvOffset = trSubmodule.uvOffset;
|
||||
}
|
||||
|
||||
public override void ExecuteBM()
|
||||
{
|
||||
attachedElement = GameElement_BM.GetElement(attachedElementGuid);
|
||||
if (attachedElement is Track track)
|
||||
{
|
||||
track.trackRendererSubmodule = new TrackRendererSubmoduleAutoOrient(track, enableEmission, emissionIntensity, zWrite, uvScale, uvOffset);
|
||||
if (materialName.Trim() != String.Empty)
|
||||
{
|
||||
track.trackRendererSubmodule.ApplyMaterial(materialThemeBundleName, materialName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class TrackRendererSubmodulePathGenerator_BM : Submodule_BM
|
||||
{
|
||||
public string materialThemeBundleName;
|
||||
public string materialName;
|
||||
public bool enableEmission;
|
||||
public float emissionIntensity;
|
||||
public bool zWrite;
|
||||
public Vector2 uvScale = Vector2.one;
|
||||
public Vector2 uvOffset = Vector2.zero;
|
||||
|
||||
public TrackRendererSubmodulePathGenerator_BM() { }
|
||||
|
||||
public TrackRendererSubmodulePathGenerator_BM(GameElement attachedElement, TrackRendererSubmodulePathGenerator trSubmodule)
|
||||
: base(attachedElement)
|
||||
{
|
||||
materialThemeBundleName = trSubmodule.materialThemeBundleName;
|
||||
materialName = trSubmodule.materialName;
|
||||
enableEmission = trSubmodule.enableEmission;
|
||||
emissionIntensity = trSubmodule.emissionIntensity;
|
||||
zWrite = trSubmodule.zWrite;
|
||||
uvScale = trSubmodule.uvScale;
|
||||
uvOffset = trSubmodule.uvOffset;
|
||||
}
|
||||
|
||||
public override void ExecuteBM()
|
||||
{
|
||||
attachedElement = GameElement_BM.GetElement(attachedElementGuid);
|
||||
if (attachedElement is Track track)
|
||||
{
|
||||
track.trackRendererSubmodule = new TrackRendererSubmodulePathGenerator(track, enableEmission, emissionIntensity, zWrite, uvScale, uvOffset);
|
||||
if (materialName.Trim() != String.Empty)
|
||||
{
|
||||
track.trackRendererSubmodule.ApplyMaterial(materialThemeBundleName, materialName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class TrackRendererSubmoduleSurface_BM : Submodule_BM
|
||||
{
|
||||
public string materialThemeBundleName;
|
||||
public string materialName;
|
||||
public bool enableEmission;
|
||||
public float emissionIntensity;
|
||||
public bool zWrite;
|
||||
public Vector2 uvScale = Vector2.one;
|
||||
public Vector2 uvOffset = Vector2.zero;
|
||||
|
||||
public TrackRendererSubmoduleSurface_BM() { }
|
||||
|
||||
public TrackRendererSubmoduleSurface_BM(GameElement attachedElement, TrackRendererSubmoduleSurface trSubmodule)
|
||||
: base(attachedElement)
|
||||
{
|
||||
materialThemeBundleName = trSubmodule.materialThemeBundleName;
|
||||
materialName = trSubmodule.materialName;
|
||||
enableEmission = trSubmodule.enableEmission;
|
||||
emissionIntensity = trSubmodule.emissionIntensity;
|
||||
zWrite = trSubmodule.zWrite;
|
||||
uvScale = trSubmodule.uvScale;
|
||||
uvOffset = trSubmodule.uvOffset;
|
||||
}
|
||||
|
||||
public override void ExecuteBM()
|
||||
{
|
||||
attachedElement = GameElement_BM.GetElement(attachedElementGuid);
|
||||
if (attachedElement is Track track)
|
||||
{
|
||||
track.trackRendererSubmodule = new TrackRendererSubmoduleSurface(track, enableEmission, emissionIntensity, zWrite, uvScale, uvOffset);
|
||||
if (materialName.Trim() != String.Empty)
|
||||
{
|
||||
track.trackRendererSubmodule.ApplyMaterial(materialThemeBundleName, materialName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class TrackRendererSubmoduleTubeGenerator_BM : Submodule_BM
|
||||
{
|
||||
public string materialThemeBundleName;
|
||||
public string materialName;
|
||||
public bool enableEmission;
|
||||
public float emissionIntensity;
|
||||
public bool zWrite;
|
||||
public int sideCount;
|
||||
public Vector2 uvScale = Vector2.one;
|
||||
public Vector2 uvOffset = Vector2.zero;
|
||||
|
||||
public TrackRendererSubmoduleTubeGenerator_BM() { }
|
||||
|
||||
public TrackRendererSubmoduleTubeGenerator_BM(GameElement attachedElement, TrackRendererSubmoduleTubeGenerator trSubmodule)
|
||||
: base(attachedElement)
|
||||
{
|
||||
materialThemeBundleName = trSubmodule.materialThemeBundleName;
|
||||
materialName = trSubmodule.materialName;
|
||||
enableEmission = trSubmodule.enableEmission;
|
||||
emissionIntensity = trSubmodule.emissionIntensity;
|
||||
sideCount = trSubmodule.sideCount;
|
||||
zWrite = trSubmodule.zWrite;
|
||||
uvScale = trSubmodule.uvScale;
|
||||
uvOffset = trSubmodule.uvOffset;
|
||||
}
|
||||
|
||||
public override void ExecuteBM()
|
||||
{
|
||||
attachedElement = GameElement_BM.GetElement(attachedElementGuid);
|
||||
if (attachedElement is Track track)
|
||||
{
|
||||
track.trackRendererSubmodule = new TrackRendererSubmoduleTubeGenerator(track, enableEmission, emissionIntensity, zWrite, sideCount, uvScale, uvOffset);
|
||||
if (materialName.Trim() != String.Empty)
|
||||
{
|
||||
track.trackRendererSubmodule.ApplyMaterial(materialThemeBundleName, materialName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 49130f20a32c5134484a0d74ee30a73c
|
||||
@@ -0,0 +1,58 @@
|
||||
namespace Ichni.RhythmGame.Beatmap
|
||||
{
|
||||
public class TrackTimeSubmoduleMovable_BM : Submodule_BM
|
||||
{
|
||||
public float trackStartTime;
|
||||
public float trackEndTime;
|
||||
public float visibleTrackTimeLength;
|
||||
public AnimationCurveType animationCurveType;
|
||||
|
||||
public TrackTimeSubmoduleMovable_BM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public TrackTimeSubmoduleMovable_BM(GameElement attachedElement, TrackTimeSubmoduleMovable trackTimeSubmoduleMovable) : base(attachedElement)
|
||||
{
|
||||
trackStartTime = trackTimeSubmoduleMovable.trackStartTime;
|
||||
trackEndTime = trackTimeSubmoduleMovable.trackEndTime;
|
||||
visibleTrackTimeLength = trackTimeSubmoduleMovable.visibleTrackTimeLength;
|
||||
animationCurveType = trackTimeSubmoduleMovable.animationCurveType;
|
||||
}
|
||||
|
||||
public override void ExecuteBM()
|
||||
{
|
||||
attachedElement = GameElement_BM.GetElement(attachedElementGuid);
|
||||
if (attachedElement is Track track)
|
||||
{
|
||||
track.trackTimeSubmodule = new TrackTimeSubmoduleMovable(track, trackStartTime, trackEndTime, visibleTrackTimeLength, animationCurveType);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class TrackTimeSubmoduleStatic_BM : Submodule_BM
|
||||
{
|
||||
public float trackTotalTime;
|
||||
public AnimationCurveType animationCurveType;
|
||||
|
||||
public TrackTimeSubmoduleStatic_BM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public TrackTimeSubmoduleStatic_BM(GameElement attachedElement, TrackTimeSubmoduleStatic trackTimeSubmoduleStatic) : base(attachedElement)
|
||||
{
|
||||
trackTotalTime = trackTimeSubmoduleStatic.trackTotalTime;
|
||||
animationCurveType = trackTimeSubmoduleStatic.animationCurveType;
|
||||
}
|
||||
|
||||
public override void ExecuteBM()
|
||||
{
|
||||
attachedElement = GameElement_BM.GetElement(attachedElementGuid);
|
||||
if (attachedElement is Track track)
|
||||
{
|
||||
track.trackTimeSubmodule = new TrackTimeSubmoduleStatic(track, trackTotalTime, animationCurveType);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 362d59c88527e834c909b3e408945f5e
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 490553274c7dc3d4bb2645927a6a02e6
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,378 @@
|
||||
using UnityEngine;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Ichni
|
||||
{
|
||||
public enum AnimationCurveType //预设动画曲线类型
|
||||
{
|
||||
Linear = 0,
|
||||
InQuad = 1,
|
||||
OutQuad = 2,
|
||||
InOutQuad = 3,
|
||||
InCubic = 4,
|
||||
OutCubic = 5,
|
||||
InOutCubic = 6,
|
||||
InQuart = 7,
|
||||
OutQuart = 8,
|
||||
InOutQuart = 9,
|
||||
InQuint = 10,
|
||||
OutQuint = 11,
|
||||
InOutQuint = 12,
|
||||
InSine = 13,
|
||||
OutSine = 14,
|
||||
InOutSine = 15,
|
||||
InExpo = 16,
|
||||
OutExpo = 17,
|
||||
InOutExpo = 18,
|
||||
InCirc = 19,
|
||||
OutCirc = 20,
|
||||
InOutCirc = 21,
|
||||
InBounce = 22,
|
||||
OutBounce = 23,
|
||||
InOutBounce = 24,
|
||||
InElastic = 25,
|
||||
OutElastic = 26,
|
||||
InOutElastic = 27,
|
||||
InBack = 28,
|
||||
OutBack = 29,
|
||||
InOutBack = 30
|
||||
}
|
||||
|
||||
public static class AnimationCurveEvaluator
|
||||
{
|
||||
public static float Evaluate(AnimationCurveType animationCurveType, float t)
|
||||
{
|
||||
t = Mathf.Clamp(t, 0, 1);
|
||||
|
||||
switch (animationCurveType)
|
||||
{
|
||||
case AnimationCurveType.Linear:
|
||||
return Linear(0, 1, t);
|
||||
case AnimationCurveType.InQuad:
|
||||
return InQuad(0, 1, t);
|
||||
case AnimationCurveType.OutQuad:
|
||||
return OutQuad(0, 1, t);
|
||||
case AnimationCurveType.InOutQuad:
|
||||
return InOutQuad(0, 1, t);
|
||||
case AnimationCurveType.InCubic:
|
||||
return InCubic(0, 1, t);
|
||||
case AnimationCurveType.OutCubic:
|
||||
return OutCubic(0, 1, t);
|
||||
case AnimationCurveType.InOutCubic:
|
||||
return InOutCubic(0, 1, t);
|
||||
case AnimationCurveType.InQuart:
|
||||
return InQuart(0, 1, t);
|
||||
case AnimationCurveType.OutQuart:
|
||||
return OutQuart(0, 1, t);
|
||||
case AnimationCurveType.InOutQuart:
|
||||
return InOutQuart(0, 1, t);
|
||||
case AnimationCurveType.InQuint:
|
||||
return InQuint(0, 1, t);
|
||||
case AnimationCurveType.OutQuint:
|
||||
return OutQuint(0, 1, t);
|
||||
case AnimationCurveType.InOutQuint:
|
||||
return InOutQuint(0, 1, t);
|
||||
case AnimationCurveType.InSine:
|
||||
return InSine(0, 1, t);
|
||||
case AnimationCurveType.OutSine:
|
||||
return OutSine(0, 1, t);
|
||||
case AnimationCurveType.InOutSine:
|
||||
return InOutSine(0, 1, t);
|
||||
case AnimationCurveType.InExpo:
|
||||
return InExpo(0, 1, t);
|
||||
case AnimationCurveType.OutExpo:
|
||||
return OutExpo(0, 1, t);
|
||||
case AnimationCurveType.InOutExpo:
|
||||
return InOutExpo(0, 1, t);
|
||||
case AnimationCurveType.InCirc:
|
||||
return InCirc(0, 1, t);
|
||||
case AnimationCurveType.OutCirc:
|
||||
return OutCirc(0, 1, t);
|
||||
case AnimationCurveType.InOutCirc:
|
||||
return InOutCirc(0, 1, t);
|
||||
case AnimationCurveType.InBounce:
|
||||
return InBounce(0, 1, t);
|
||||
case AnimationCurveType.OutBounce:
|
||||
return OutBounce(0, 1, t);
|
||||
case AnimationCurveType.InOutBounce:
|
||||
return InOutBounce(0, 1, t);
|
||||
case AnimationCurveType.InElastic:
|
||||
return InElastic(0, 1, t);
|
||||
case AnimationCurveType.OutElastic:
|
||||
return OutElastic(0, 1, t);
|
||||
case AnimationCurveType.InOutElastic:
|
||||
return InOutElastic(0, 1, t);
|
||||
case AnimationCurveType.InBack:
|
||||
return InBack(0, 1, t);
|
||||
case AnimationCurveType.OutBack:
|
||||
return OutBack(0, 1, t);
|
||||
case AnimationCurveType.InOutBack:
|
||||
return InOutBack(0, 1, t);
|
||||
}
|
||||
|
||||
throw new NotImplementedException($"Animation curve type {animationCurveType} is not implemented.");
|
||||
}
|
||||
|
||||
#region 缓动曲线计算式
|
||||
private static float Linear(float from, float to, float t)
|
||||
{
|
||||
float c = to - from;
|
||||
t /= 1f;
|
||||
return c * t / 1f + from;
|
||||
}
|
||||
|
||||
private static float InQuad(float from, float to, float t)
|
||||
{
|
||||
float c = to - from;
|
||||
t /= 1f;
|
||||
return c * t * t + from;
|
||||
}
|
||||
|
||||
private static float OutQuad(float from, float to, float t)
|
||||
{
|
||||
float c = to - from;
|
||||
t /= 1f;
|
||||
return -c * t * (t - 2f) + from;
|
||||
}
|
||||
|
||||
private static float InOutQuad(float from, float to, float t)
|
||||
{
|
||||
float c = to - from;
|
||||
t /= 0.5f;
|
||||
if (t < 1) return c / 2f * t * t + from;
|
||||
t--;
|
||||
return -c / 2f * (t * (t - 2) - 1) + from;
|
||||
}
|
||||
|
||||
private static float InCubic(float from, float to, float t)
|
||||
{
|
||||
float c = to - from;
|
||||
t /= 1f;
|
||||
return c * t * t * t + from;
|
||||
}
|
||||
|
||||
private static float OutCubic(float from, float to, float t)
|
||||
{
|
||||
float c = to - from;
|
||||
t /= 1f;
|
||||
t--;
|
||||
return c * (t * t * t + 1) + from;
|
||||
}
|
||||
|
||||
private static float InOutCubic(float from, float to, float t)
|
||||
{
|
||||
float c = to - from;
|
||||
t /= 0.5f;
|
||||
if (t < 1) return c / 2f * t * t * t + from;
|
||||
t -= 2;
|
||||
return c / 2f * (t * t * t + 2) + from;
|
||||
}
|
||||
|
||||
private static float InQuart(float from, float to, float t)
|
||||
{
|
||||
float c = to - from;
|
||||
t /= 1f;
|
||||
return c * t * t * t * t + from;
|
||||
}
|
||||
|
||||
private static float OutQuart(float from, float to, float t)
|
||||
{
|
||||
float c = to - from;
|
||||
t /= 1f;
|
||||
t--;
|
||||
return -c * (t * t * t * t - 1) + from;
|
||||
}
|
||||
|
||||
private static float InOutQuart(float from, float to, float t)
|
||||
{
|
||||
float c = to - from;
|
||||
t /= 0.5f;
|
||||
if (t < 1) return c / 2f * t * t * t * t + from;
|
||||
t -= 2;
|
||||
return -c / 2f * (t * t * t * t - 2) + from;
|
||||
}
|
||||
|
||||
private static float InQuint(float from, float to, float t)
|
||||
{
|
||||
float c = to - from;
|
||||
t /= 1f;
|
||||
return c * t * t * t * t * t + from;
|
||||
}
|
||||
|
||||
private static float OutQuint(float from, float to, float t)
|
||||
{
|
||||
float c = to - from;
|
||||
t /= 1f;
|
||||
t--;
|
||||
return c * (t * t * t * t * t + 1) + from;
|
||||
}
|
||||
|
||||
private static float InOutQuint(float from, float to, float t)
|
||||
{
|
||||
float c = to - from;
|
||||
t /= 0.5f;
|
||||
if (t < 1) return c / 2f * t * t * t * t * t + from;
|
||||
t -= 2;
|
||||
return c / 2f * (t * t * t * t * t + 2) + from;
|
||||
}
|
||||
|
||||
private static float InSine(float from, float to, float t)
|
||||
{
|
||||
float c = to - from;
|
||||
return -c * Mathf.Cos(t / 1f * (Mathf.PI / 2f)) + c + from;
|
||||
}
|
||||
|
||||
private static float OutSine(float from, float to, float t)
|
||||
{
|
||||
float c = to - from;
|
||||
return c * Mathf.Sin(t / 1f * (Mathf.PI / 2f)) + from;
|
||||
}
|
||||
|
||||
private static float InOutSine(float from, float to, float t)
|
||||
{
|
||||
float c = to - from;
|
||||
return -c / 2f * (Mathf.Cos(Mathf.PI * t / 1f) - 1) + from;
|
||||
}
|
||||
|
||||
private static float InExpo(float from, float to, float t)
|
||||
{
|
||||
float c = to - from;
|
||||
return c * Mathf.Pow(2, 10 * (t / 1f - 1)) + from;
|
||||
}
|
||||
|
||||
private static float OutExpo(float from, float to, float t)
|
||||
{
|
||||
float c = to - from;
|
||||
return c * (-Mathf.Pow(2, -10 * t / 1f) + 1) + from;
|
||||
}
|
||||
|
||||
private static float InOutExpo(float from, float to, float t)
|
||||
{
|
||||
float c = to - from;
|
||||
t /= 0.5f;
|
||||
if (t < 1f) return c / 2f * Mathf.Pow(2, 10 * (t - 1)) + from;
|
||||
t--;
|
||||
return c / 2f * (-Mathf.Pow(2, -10 * t) + 2) + from;
|
||||
}
|
||||
|
||||
private static float InCirc(float from, float to, float t)
|
||||
{
|
||||
float c = to - from;
|
||||
t /= 1f;
|
||||
return -c * (Mathf.Sqrt(1 - t * t) - 1) + from;
|
||||
}
|
||||
|
||||
private static float OutCirc(float from, float to, float t)
|
||||
{
|
||||
float c = to - from;
|
||||
t /= 1f;
|
||||
t--;
|
||||
return c * Mathf.Sqrt(1 - t * t) + from;
|
||||
}
|
||||
|
||||
private static float InOutCirc(float from, float to, float t)
|
||||
{
|
||||
float c = to - from;
|
||||
t /= 0.5f;
|
||||
if (t < 1) return -c / 2f * (Mathf.Sqrt(1 - t * t) - 1) + from;
|
||||
t -= 2;
|
||||
return c / 2f * (Mathf.Sqrt(1 - t * t) + 1) + from;
|
||||
}
|
||||
|
||||
private static float InBounce(float from, float to, float t)
|
||||
{
|
||||
float c = to - from;
|
||||
return c - OutBounce(0f, c, 1f - t) + from; //does this work?
|
||||
}
|
||||
|
||||
private static float OutBounce(float from, float to, float t)
|
||||
{
|
||||
float c = to - from;
|
||||
|
||||
if ((t /= 1f) < (1 / 2.75f))
|
||||
{
|
||||
return c * (7.5625f * t * t) + from;
|
||||
}
|
||||
else if (t < (2 / 2.75f))
|
||||
{
|
||||
return c * (7.5625f * (t -= (1.5f / 2.75f)) * t + .75f) + from;
|
||||
}
|
||||
else if (t < (2.5 / 2.75))
|
||||
{
|
||||
return c * (7.5625f * (t -= (2.25f / 2.75f)) * t + .9375f) + from;
|
||||
}
|
||||
else
|
||||
{
|
||||
return c * (7.5625f * (t -= (2.625f / 2.75f)) * t + .984375f) + from;
|
||||
}
|
||||
}
|
||||
|
||||
private static float InOutBounce(float from, float to, float t)
|
||||
{
|
||||
float c = to - from;
|
||||
if (t < 0.5f) return InBounce(0, c, t * 2f) * 0.5f + from;
|
||||
return OutBounce(0, c, t * 2 - 1) * 0.5f + c * 0.5f + from;
|
||||
|
||||
}
|
||||
|
||||
private static float InElastic(float from, float to, float t)
|
||||
{
|
||||
float c = to - from;
|
||||
if (t == 0) return from;
|
||||
if ((t /= 1f) == 1) return from + c;
|
||||
float p = 0.3f;
|
||||
float s = p / 4f;
|
||||
return -(c * Mathf.Pow(2, 10 * (t -= 1)) * Mathf.Sin((t - s) * (2 * Mathf.PI) / p)) + from;
|
||||
}
|
||||
|
||||
private static float OutElastic(float from, float to, float t)
|
||||
{
|
||||
float c = to - from;
|
||||
if (t == 0) return from;
|
||||
if ((t /= 1f) == 1) return from + c;
|
||||
float p = 0.3f;
|
||||
float s = p / 4f;
|
||||
return (c * Mathf.Pow(2, -10 * t) * Mathf.Sin((t - s) * (2 * Mathf.PI) / p) + c + from);
|
||||
}
|
||||
|
||||
private static float InOutElastic(float from, float to, float t)
|
||||
{
|
||||
float c = to - from;
|
||||
if (t == 0) return from;
|
||||
if ((t /= 0.5f) == 2) return from + c;
|
||||
float p = 0.3f * 1.5f;
|
||||
float s = p / 4f;
|
||||
if (t < 1)
|
||||
return -0.5f * (c * Mathf.Pow(2, 10 * (t -= 1f)) * Mathf.Sin((t - 2) * (2 * Mathf.PI) / p)) + from;
|
||||
return c * Mathf.Pow(2, -10 * (t -= 1)) * Mathf.Sin((t - s) * (2f * Mathf.PI) / p) * 0.5f + c + from;
|
||||
}
|
||||
|
||||
private static float InBack(float from, float to, float t)
|
||||
{
|
||||
float c = to - from;
|
||||
float s = 1.70158f;
|
||||
t /= 0.5f;
|
||||
return c * t * t * ((s + 1) * t - s) + from;
|
||||
}
|
||||
|
||||
private static float OutBack(float from, float to, float t)
|
||||
{
|
||||
float c = to - from;
|
||||
float s = 1.70158f;
|
||||
t = t / 1f - 1f;
|
||||
return c * (t * t * ((s + 1) * t + s) + 1) + from;
|
||||
}
|
||||
|
||||
private static float InOutBack(float from, float to, float t)
|
||||
{
|
||||
float c = to - from;
|
||||
float s = 1.70158f;
|
||||
t /= 0.5f;
|
||||
if (t < 1) return c / 2f * (t * t * (((s *= (1.525f)) + 1) * t - s)) + from;
|
||||
t -= 2;
|
||||
return c / 2f * (t * t * (((s *= (1.525f)) + 1) * t + s) + 2) + from;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1ad11ce603af64e4fb032229b82386b7
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,41 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Ichni.RhythmGame.Beatmap
|
||||
{
|
||||
public class FlexibleBool_BM
|
||||
{
|
||||
public List<AnimatedBool> animatedBoolList;
|
||||
|
||||
public FlexibleBool_BM()
|
||||
{
|
||||
this.animatedBoolList = new List<AnimatedBool>();
|
||||
}
|
||||
|
||||
public FlexibleBool_BM(List<AnimatedBool> animatedBoolList)
|
||||
{
|
||||
this.animatedBoolList = animatedBoolList;
|
||||
}
|
||||
|
||||
public FlexibleBool ConvertToGameType()
|
||||
{
|
||||
FlexibleBool flexibleBool;
|
||||
|
||||
if (this.animatedBoolList.Count == 0)
|
||||
{
|
||||
flexibleBool = new FlexibleBool();
|
||||
}
|
||||
else
|
||||
{
|
||||
List<AnimatedBool> animations = new List<AnimatedBool>();
|
||||
foreach (AnimatedBool animatedBool in animatedBoolList)
|
||||
{
|
||||
animations.Add(new AnimatedBool(animatedBool.time, animatedBool.value));
|
||||
}
|
||||
|
||||
flexibleBool = new FlexibleBool(animations);
|
||||
}
|
||||
|
||||
return flexibleBool;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 34744273e1ec1104389f96de37ef2a30
|
||||
@@ -0,0 +1,45 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Ichni.RhythmGame.Beatmap
|
||||
{
|
||||
[System.Serializable]
|
||||
public class FlexibleFloat_BM
|
||||
{
|
||||
public List<AnimatedFloat> animatedFloatList;
|
||||
|
||||
public FlexibleFloat_BM()
|
||||
{
|
||||
this.animatedFloatList = new List<AnimatedFloat>();
|
||||
}
|
||||
|
||||
public FlexibleFloat_BM(List<AnimatedFloat> animatedFloatList)
|
||||
{
|
||||
this.animatedFloatList = animatedFloatList;
|
||||
}
|
||||
|
||||
public FlexibleFloat ConvertToGameType()
|
||||
{
|
||||
FlexibleFloat flexibleFloat;
|
||||
|
||||
if (animatedFloatList.Count == 0)
|
||||
{
|
||||
flexibleFloat = new FlexibleFloat();
|
||||
}
|
||||
else
|
||||
{
|
||||
List<AnimatedFloat> animatedFloatList = new List<AnimatedFloat>();
|
||||
foreach (AnimatedFloat animatedFloat in this.animatedFloatList)
|
||||
{
|
||||
animatedFloatList.Add(new AnimatedFloat(
|
||||
animatedFloat.startTime, animatedFloat.endTime,
|
||||
animatedFloat.startValue, animatedFloat.endValue,
|
||||
animatedFloat.animationCurveType));
|
||||
}
|
||||
|
||||
flexibleFloat = new FlexibleFloat(animatedFloatList);
|
||||
}
|
||||
|
||||
return flexibleFloat;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 157e98f139bd21647a1df710fe63dd81
|
||||
@@ -0,0 +1,43 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Ichni.RhythmGame.Beatmap
|
||||
{
|
||||
[System.Serializable]
|
||||
public class FlexibleInt_BM
|
||||
{
|
||||
public List<AnimatedInt> animatedIntList;
|
||||
|
||||
public FlexibleInt_BM()
|
||||
{
|
||||
this.animatedIntList = new List<AnimatedInt>();
|
||||
}
|
||||
|
||||
public FlexibleInt_BM(List<AnimatedInt> animatedIntList)
|
||||
{
|
||||
this.animatedIntList = animatedIntList;
|
||||
}
|
||||
|
||||
public FlexibleInt ConvertToGameType()
|
||||
{
|
||||
FlexibleInt flexibleInt;
|
||||
|
||||
if (animatedIntList.Count == 0)
|
||||
{
|
||||
flexibleInt = new FlexibleInt();
|
||||
}
|
||||
else
|
||||
{
|
||||
List<AnimatedInt> animations = new List<AnimatedInt>();
|
||||
|
||||
foreach (AnimatedInt animatedInt in animatedIntList)
|
||||
{
|
||||
animations.Add(new AnimatedInt(animatedInt.time, animatedInt.value));
|
||||
}
|
||||
|
||||
flexibleInt = new FlexibleInt(animations);
|
||||
}
|
||||
|
||||
return flexibleInt;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f235a3498a2746d4ca998b8a8b982866
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ef5a9eed7f6e42247a93c01519d89d64
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 21ec904f9ffa2e8409027f9916f33248
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Ichni.RhythmGame.Beatmap
|
||||
{
|
||||
public class BackgroundSetter_BM : GameElement_BM
|
||||
{
|
||||
public bool useSkybox;
|
||||
public string skyboxThemeBundleName;
|
||||
public string skyboxMaterialName;
|
||||
public string backgroundSpriteName;
|
||||
|
||||
public BackgroundSetter_BM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public BackgroundSetter_BM(string elementName, Guid elementGuid, List<string> tags, GameElement_BM attachedElement,
|
||||
bool useSkybox, string skyboxThemeBundleName, string skyboxMaterialName, string backgroundSpriteName)
|
||||
: base(elementName, elementGuid, tags, attachedElement)
|
||||
{
|
||||
this.useSkybox = useSkybox;
|
||||
this.skyboxThemeBundleName = skyboxThemeBundleName;
|
||||
this.skyboxMaterialName = skyboxMaterialName;
|
||||
this.backgroundSpriteName = backgroundSpriteName;
|
||||
}
|
||||
|
||||
public override void ExecuteBM()
|
||||
{
|
||||
matchedElement = BackgroundSetter.GenerateElement(elementName, elementGuid, tags, false,
|
||||
GetElement(attachedElementGuid), useSkybox, skyboxThemeBundleName, skyboxMaterialName, backgroundSpriteName);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d71b30900f485ad4abb5b9ad9f2f41eb
|
||||
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Ichni.RhythmGame.Beatmap
|
||||
{
|
||||
public class EnvironmentObject_BM : SubstantialObject_BM
|
||||
{
|
||||
public bool isStatic;
|
||||
|
||||
public EnvironmentObject_BM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public EnvironmentObject_BM(string elementName, Guid elementGuid, List<string> tags,
|
||||
GameElement_BM attachedElement, string themeBundleName, string objectName, bool isStatic)
|
||||
: base(elementName, elementGuid, tags, attachedElement, themeBundleName, objectName)
|
||||
{
|
||||
this.isStatic = isStatic;
|
||||
}
|
||||
|
||||
public override void ExecuteBM()
|
||||
{
|
||||
matchedElement = EnvironmentObject.GenerateElement(elementName, elementGuid, tags, false,
|
||||
themeBundleName, objectName, GetElement(attachedElementGuid), isStatic);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fd625b39e108a184b8bd3359ecc15b95
|
||||
@@ -0,0 +1,58 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Ichni.RhythmGame.Beatmap
|
||||
{
|
||||
public class ParticleEmitter_BM : GameElement_BM
|
||||
{
|
||||
public bool prewarm = false;
|
||||
public float playTime = 0f;
|
||||
public float stopTime = 1f;
|
||||
|
||||
public ParticleSystemSimulationSpace simulationSpace;
|
||||
public float density = 10;
|
||||
public float lifeTime = 5;
|
||||
public float speed;
|
||||
public float radius;
|
||||
|
||||
public bool isAutoOrient = true;
|
||||
public Vector3 particleRotation = Vector3.zero;
|
||||
|
||||
public string materialThemeBundleName = string.Empty;
|
||||
public string materialName = string.Empty;
|
||||
|
||||
public ParticleEmitter_BM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public ParticleEmitter_BM(string elementName, Guid elementGuid, List<string> tags, GameElement_BM attachedElement,
|
||||
bool prewarm, float playTime, float stopTime, ParticleSystemSimulationSpace simulationSpace,
|
||||
float density, float lifeTime, float speed, float radius, bool isAutoOrient, Vector3 particleRotation,
|
||||
string materialThemeBundleName, string materialName) :
|
||||
base(elementName, elementGuid, tags, attachedElement)
|
||||
{
|
||||
this.prewarm = prewarm;
|
||||
this.playTime = playTime;
|
||||
this.stopTime = stopTime;
|
||||
this.simulationSpace = simulationSpace;
|
||||
this.density = density;
|
||||
this.lifeTime = lifeTime;
|
||||
this.speed = speed;
|
||||
this.radius = radius;
|
||||
this.isAutoOrient = isAutoOrient;
|
||||
this.particleRotation = particleRotation;
|
||||
this.materialThemeBundleName = materialThemeBundleName;
|
||||
this.materialName = materialName;
|
||||
}
|
||||
|
||||
public override void ExecuteBM()
|
||||
{
|
||||
matchedElement = ParticleEmitter.GenerateElement(elementName, elementGuid, tags, false,
|
||||
GetElement(attachedElementGuid), materialThemeBundleName, materialName,
|
||||
prewarm, playTime, stopTime, simulationSpace, density, lifeTime, speed, radius,
|
||||
isAutoOrient, particleRotation);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fff835610e85b7c40963a8b8486a3524
|
||||
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Ichni.RhythmGame.Beatmap
|
||||
{
|
||||
public class SkyboxSubsetter_BM : GameElement_BM
|
||||
{
|
||||
public List<string> skyBoxThemeBundleList;
|
||||
public List<string> skyboxNameList;
|
||||
public List<float> blendTimeList;
|
||||
public List<float> blendSpeedList;
|
||||
|
||||
public SkyboxSubsetter_BM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public SkyboxSubsetter_BM(string elementName, Guid elementGuid, List<string> tags, GameElement_BM attachedElement,
|
||||
List<string> skyBoxThemeBundleList, List<string> skyboxNameList, List<float> blendTimeList, List<float> blendSpeedList)
|
||||
: base(elementName, elementGuid, tags, attachedElement)
|
||||
{
|
||||
this.skyBoxThemeBundleList = skyBoxThemeBundleList;
|
||||
this.skyboxNameList = skyboxNameList;
|
||||
this.blendTimeList = blendTimeList;
|
||||
this.blendSpeedList = blendSpeedList;
|
||||
}
|
||||
|
||||
public override void ExecuteBM()
|
||||
{
|
||||
matchedElement = SkyboxSubsetter.GenerateElement(elementName, elementGuid, tags, false,
|
||||
GetElement(attachedElementGuid), skyBoxThemeBundleList, skyboxNameList, blendTimeList, blendSpeedList);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b88018b9f1dfcd246a4cf0197b2c41e6
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dd1bf361f8f45884fb0a959bc1f6b143
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Ichni.RhythmGame.Beatmap
|
||||
{
|
||||
public class ElementFolder_BM : GameElement_BM
|
||||
{
|
||||
public ElementFolder_BM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public ElementFolder_BM(string elementName, Guid elementGuid, List<string> tags, GameElement_BM attachedElement)
|
||||
: base(elementName, elementGuid, tags, attachedElement)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void ExecuteBM()
|
||||
{
|
||||
matchedElement = ElementFolder.GenerateElement(elementName, elementGuid, tags, false, GetElement(attachedElementGuid));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 58ecc622995f8f64099deb76c6bd27e2
|
||||
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Ichni.RhythmGame.Beatmap
|
||||
{
|
||||
public class GameCameraExtension_BM : GameElement_BM
|
||||
{
|
||||
public float farClipRange;
|
||||
|
||||
public GameCameraExtension_BM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public GameCameraExtension_BM(string elementName, Guid elementGuid, List<string> tags,
|
||||
GameElement_BM attachedElement, float farClipRange)
|
||||
: base(elementName, elementGuid, tags, attachedElement)
|
||||
{
|
||||
this.farClipRange = farClipRange;
|
||||
}
|
||||
|
||||
public override void ExecuteBM()
|
||||
{
|
||||
matchedElement = GameCameraExtension.GenerateElement(elementName, elementGuid, tags, false,
|
||||
GetElement(attachedElementGuid), farClipRange);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 950b290b30a639c479f82871076a1782
|
||||
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Ichni.RhythmGame.Beatmap
|
||||
{
|
||||
public class GameCamera_BM : GameElement_BM
|
||||
{
|
||||
public GameCamera.CameraViewType cameraViewType;
|
||||
public float perspectiveAngle;
|
||||
public float orthographicSize;
|
||||
|
||||
public GameCamera_BM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public GameCamera_BM(string elementName, Guid elementGuid, List<string> tags,
|
||||
GameElement_BM attachedElement, GameCamera.CameraViewType cameraViewType,
|
||||
float perspectiveAngle, float orthographicSize)
|
||||
: base(elementName, elementGuid, tags, attachedElement)
|
||||
{
|
||||
this.cameraViewType = cameraViewType;
|
||||
this.perspectiveAngle = perspectiveAngle;
|
||||
this.orthographicSize = orthographicSize;
|
||||
}
|
||||
|
||||
public override void ExecuteBM()
|
||||
{
|
||||
matchedElement = GameCamera.GenerateElement(elementName, elementGuid, tags, false,
|
||||
GetElement(attachedElementGuid), cameraViewType, perspectiveAngle, orthographicSize);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 56b27fa61c6adad4abdc465fd1e408a0
|
||||
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Ichni.RhythmGame.Beatmap
|
||||
{
|
||||
public class SubstantialObject_BM : GameElement_BM
|
||||
{
|
||||
public string themeBundleName;
|
||||
public string objectName;
|
||||
|
||||
public SubstantialObject_BM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public SubstantialObject_BM(string elementName, Guid elementGuid, List<string> tags, GameElement_BM attachedElement,
|
||||
string themeBundleName, string objectName)
|
||||
: base(elementName, elementGuid, tags, attachedElement)
|
||||
{
|
||||
this.themeBundleName = themeBundleName;
|
||||
this.objectName = objectName;
|
||||
}
|
||||
|
||||
public override void ExecuteBM()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 618c4a2232638e84ca9c78c4fc525283
|
||||
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Ichni.RhythmGame.Beatmap
|
||||
{
|
||||
public class TimeEffectsCollection_BM : GameElement_BM
|
||||
{
|
||||
public float time;
|
||||
|
||||
public TimeEffectsCollection_BM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public TimeEffectsCollection_BM(string elementName, Guid elementGuid, List<string> tags,
|
||||
GameElement_BM attachedElement, TimeEffectsCollection timeEffectsCollection)
|
||||
: base(elementName, elementGuid, tags, attachedElement)
|
||||
{
|
||||
time = timeEffectsCollection.time;
|
||||
}
|
||||
|
||||
|
||||
public override void ExecuteBM()
|
||||
{
|
||||
matchedElement = TimeEffectsCollection.GenerateElement(elementName, elementGuid,
|
||||
tags, false, GetElement(attachedElementGuid), time);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fa411d9c23ba6b7459334abdfddc35c9
|
||||
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Ichni.RhythmGame.Beatmap
|
||||
{
|
||||
public class VariablesContainer_BM : GameElement_BM
|
||||
{
|
||||
public Dictionary<string, int> originalVariables;
|
||||
|
||||
public VariablesContainer_BM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public VariablesContainer_BM(string elementName, Guid elementGuid, List<string> tags, GameElement_BM parentElement,
|
||||
Dictionary<string, int> originalVariables) : base(elementName, elementGuid, tags, parentElement)
|
||||
{
|
||||
this.originalVariables = new Dictionary<string, int>(originalVariables);
|
||||
}
|
||||
|
||||
public override void ExecuteBM()
|
||||
{
|
||||
matchedElement = VariablesContainer.GenerateElement(elementName, elementGuid, tags, false,
|
||||
GetElement(attachedElementGuid), originalVariables);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1ca9ba2716572614ea591c1ce7652af0
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e8f7a67f19bf55e4dbd3f0f3fe67f072
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,26 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Ichni.RhythmGame.Beatmap
|
||||
{
|
||||
public class BloomEffect_BM : EffectBase_BM
|
||||
{
|
||||
public float duration;
|
||||
public float peak;
|
||||
public AnimationCurve intensityCurve;
|
||||
|
||||
public BloomEffect_BM() { }
|
||||
|
||||
public BloomEffect_BM(float duration, float peak, AnimationCurve intensityCurve)
|
||||
{
|
||||
this.effectTime = duration;
|
||||
this.duration = duration;
|
||||
this.peak = peak;
|
||||
this.intensityCurve = intensityCurve;
|
||||
}
|
||||
|
||||
public override EffectBase ConvertToGameType(GameElement attachedGameElement)
|
||||
{
|
||||
return new BloomEffect(duration, peak, intensityCurve);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9f0b0bbe1ab75ff439cd89cb2d6c8903
|
||||
@@ -0,0 +1,24 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Ichni.RhythmGame.Beatmap
|
||||
{
|
||||
public class CameraOffsetEffect_BM : EffectBase_BM
|
||||
{
|
||||
public float duration;
|
||||
public Vector3 offsetValue;
|
||||
public AnimationCurve offsetCurve;
|
||||
|
||||
public CameraOffsetEffect_BM(float duration, Vector3 offsetValue, AnimationCurve offsetCurve)
|
||||
{
|
||||
this.effectTime = duration;
|
||||
this.duration = duration;
|
||||
this.offsetValue = offsetValue;
|
||||
this.offsetCurve = offsetCurve;
|
||||
}
|
||||
|
||||
public override EffectBase ConvertToGameType(GameElement attachedGameElement)
|
||||
{
|
||||
return new CameraOffsetEffect(duration, offsetValue, offsetCurve);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c89d0dc887a006b4db0f9bd126ad9f46
|
||||
@@ -0,0 +1,30 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Ichni.RhythmGame.Beatmap
|
||||
{
|
||||
public class CameraShakeEffect_BM : EffectBase_BM
|
||||
{
|
||||
public float duration;
|
||||
public float frequency;
|
||||
public float amplitudeX;
|
||||
public float amplitudeY;
|
||||
public float amplitudeZ;
|
||||
|
||||
public CameraShakeEffect_BM() { }
|
||||
|
||||
public CameraShakeEffect_BM(float duration, float frequency, float amplitudeX, float amplitudeY, float amplitudeZ)
|
||||
{
|
||||
this.effectTime = duration;
|
||||
this.duration = duration;
|
||||
this.frequency = frequency;
|
||||
this.amplitudeX = amplitudeX;
|
||||
this.amplitudeY = amplitudeY;
|
||||
this.amplitudeZ = amplitudeZ;
|
||||
}
|
||||
|
||||
public override EffectBase ConvertToGameType(GameElement attachedGameElement)
|
||||
{
|
||||
return new CameraShakeEffect(duration, frequency, amplitudeX, amplitudeY, amplitudeZ);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f95d6b34e5bfc004ab751726eb61c1c5
|
||||
@@ -0,0 +1,25 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Ichni.RhythmGame.Beatmap
|
||||
{
|
||||
public class CameraTiltEffect_BM : EffectBase_BM
|
||||
{
|
||||
public float duration;
|
||||
public Vector3 tiltValue;
|
||||
public AnimationCurve tiltCurve;
|
||||
|
||||
public CameraTiltEffect_BM(float duration, Vector3 tiltValue, AnimationCurve tiltCurve)
|
||||
{
|
||||
this.effectTime = duration;
|
||||
this.duration = duration;
|
||||
this.tiltValue = tiltValue;
|
||||
this.tiltCurve = tiltCurve;
|
||||
|
||||
}
|
||||
|
||||
public override EffectBase ConvertToGameType(GameElement attachedGameElement)
|
||||
{
|
||||
return new CameraTiltEffect(duration, tiltValue, tiltCurve);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2fa4d735d24b66446bd65febd6bf970b
|
||||
@@ -0,0 +1,26 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Ichni.RhythmGame.Beatmap
|
||||
{
|
||||
public class CameraZoomEffect_BM : EffectBase_BM
|
||||
{
|
||||
public float duration;
|
||||
public float relativeZoom;
|
||||
public AnimationCurve zoomCurve;
|
||||
|
||||
public CameraZoomEffect_BM() { }
|
||||
|
||||
public CameraZoomEffect_BM(float duration, float relativeZoom, AnimationCurve zoomCurve)
|
||||
{
|
||||
this.effectTime = duration;
|
||||
this.duration = duration;
|
||||
this.relativeZoom = relativeZoom;
|
||||
this.zoomCurve = zoomCurve;
|
||||
}
|
||||
|
||||
public override EffectBase ConvertToGameType(GameElement attachedGameElement)
|
||||
{
|
||||
return new CameraZoomEffect(duration, relativeZoom, zoomCurve);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 94fc49ffb6b85be499e56989f30edfba
|
||||
@@ -0,0 +1,26 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Ichni.RhythmGame.Beatmap
|
||||
{
|
||||
public class ChromaticAberrationEffect_BM : EffectBase_BM
|
||||
{
|
||||
public float duration;
|
||||
public float peak;
|
||||
public AnimationCurve intensityCurve;
|
||||
|
||||
public ChromaticAberrationEffect_BM() { }
|
||||
|
||||
public ChromaticAberrationEffect_BM(float duration, float peak, AnimationCurve intensityCurve)
|
||||
{
|
||||
this.effectTime = duration;
|
||||
this.duration = duration;
|
||||
this.peak = peak;
|
||||
this.intensityCurve = intensityCurve;
|
||||
}
|
||||
|
||||
public override EffectBase ConvertToGameType(GameElement attachedGameElement)
|
||||
{
|
||||
return new ChromaticAberrationEffect(duration, peak, intensityCurve);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1b07e876899a1da4b8734cc239f02d9c
|
||||
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
|
||||
namespace Ichni.RhythmGame.Beatmap
|
||||
{
|
||||
public class EnableControlEffect_BM : EffectBase_BM
|
||||
{
|
||||
public Guid connectedGameElementGuid;
|
||||
public string connectedVariableName;
|
||||
public int enableValue;
|
||||
public bool useExpression;
|
||||
public string expression;
|
||||
|
||||
public EnableControlEffect_BM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public EnableControlEffect_BM(Guid connectedGameElementGuid, string connectedVariableName,
|
||||
int enableValue, bool useExpression, string expression)
|
||||
{
|
||||
this.connectedGameElementGuid = connectedGameElementGuid;
|
||||
this.connectedVariableName = connectedVariableName;
|
||||
this.enableValue = enableValue;
|
||||
this.useExpression = useExpression;
|
||||
this.expression = expression;
|
||||
}
|
||||
|
||||
public override EffectBase ConvertToGameType(GameElement attachedGameElement)
|
||||
{
|
||||
return new EnableControlEffect(GameElement_BM.GetElement(connectedGameElementGuid), connectedVariableName,
|
||||
enableValue, useExpression, expression);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 962e6ecb491b2e8459c4adb042ee3317
|
||||
@@ -0,0 +1,29 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Ichni.RhythmGame.Beatmap
|
||||
{
|
||||
public class HighPassFilterEffect_BM: EffectBase_BM
|
||||
{
|
||||
public float duration;
|
||||
public float peak;
|
||||
public AnimationCurve intensityCurve;
|
||||
|
||||
public HighPassFilterEffect_BM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public HighPassFilterEffect_BM(float duration, float peak, AnimationCurve intensityCurve)
|
||||
{
|
||||
this.effectTime = 0;
|
||||
this.duration = duration;
|
||||
this.peak = peak;
|
||||
this.intensityCurve = intensityCurve;
|
||||
}
|
||||
|
||||
public override EffectBase ConvertToGameType(GameElement attachedGameElement)
|
||||
{
|
||||
return new HighPassFilterEffect(duration, peak, intensityCurve);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cf9e4f03caf64a3478524d26e2effa1d
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user