diff --git a/Assets/.DS_Store b/Assets/.DS_Store
index a5894ecd..95fd5dbc 100644
Binary files a/Assets/.DS_Store and b/Assets/.DS_Store differ
diff --git a/Assets/Scripts/Animations/Color/BaseColorChange.cs b/Assets/Scripts/Animations/Color/BaseColorChange.cs
index 1f52d456..7297af0d 100644
--- a/Assets/Scripts/Animations/Color/BaseColorChange.cs
+++ b/Assets/Scripts/Animations/Color/BaseColorChange.cs
@@ -100,7 +100,7 @@ namespace Ichni.RhythmGame
public override void ExecuteBM()
{
- BaseColorChange.GenerateElement(elementName, elementGuid, tags, false,
+ matchedElement = BaseColorChange.GenerateElement(elementName, elementGuid, tags, false,
GetElement(attachedElementGuid), colorR.ConvertToGameType(),
colorG.ConvertToGameType(), colorB.ConvertToGameType(), colorA.ConvertToGameType());
}
diff --git a/Assets/Scripts/Animations/Color/EmissionColorChange.cs b/Assets/Scripts/Animations/Color/EmissionColorChange.cs
index aec60f0c..83f6e0cb 100644
--- a/Assets/Scripts/Animations/Color/EmissionColorChange.cs
+++ b/Assets/Scripts/Animations/Color/EmissionColorChange.cs
@@ -101,7 +101,7 @@ namespace Ichni.RhythmGame
public override void ExecuteBM()
{
- EmissionColorChange.GenerateElement(elementName, elementGuid, tags, false, GetElement(attachedElementGuid),
+ matchedElement = EmissionColorChange.GenerateElement(elementName, elementGuid, tags, false, GetElement(attachedElementGuid),
colorR.ConvertToGameType(), colorG.ConvertToGameType(), colorB.ConvertToGameType(), colorI.ConvertToGameType());
}
diff --git a/Assets/Scripts/Animations/Track/TrackTotalTimeChange.cs b/Assets/Scripts/Animations/Track/TrackTotalTimeChange.cs
index 457f60ff..d8600799 100644
--- a/Assets/Scripts/Animations/Track/TrackTotalTimeChange.cs
+++ b/Assets/Scripts/Animations/Track/TrackTotalTimeChange.cs
@@ -76,7 +76,7 @@ namespace Ichni.RhythmGame
public override void ExecuteBM()
{
- TrackTotalTimeChange.GenerateElement(elementName, elementGuid, tags, false,
+ matchedElement = TrackTotalTimeChange.GenerateElement(elementName, elementGuid, tags, false,
GetElement(attachedElementGuid) as Track, totalTime.ConvertToGameType());
}
diff --git a/Assets/Scripts/Animations/Transform/Displacement.cs b/Assets/Scripts/Animations/Transform/Displacement.cs
index cd496a71..88148498 100644
--- a/Assets/Scripts/Animations/Transform/Displacement.cs
+++ b/Assets/Scripts/Animations/Transform/Displacement.cs
@@ -46,9 +46,18 @@ namespace Ichni.RhythmGame
positionY.UpdateFlexibleFloat(songTime);
positionZ.UpdateFlexibleFloat(songTime);
- if (positionX.returnType is FlexibleReturnType.MiddleExecuting ||
- positionY.returnType is FlexibleReturnType.MiddleExecuting ||
- positionZ.returnType is FlexibleReturnType.MiddleExecuting)
+ if (positionX.returnType is FlexibleReturnType.After or FlexibleReturnType.Before
+ or FlexibleReturnType.MiddleInterval or FlexibleReturnType.None &&
+ positionY.returnType is FlexibleReturnType.After or FlexibleReturnType.Before
+ or FlexibleReturnType.MiddleInterval or FlexibleReturnType.None &&
+ positionZ.returnType is FlexibleReturnType.After or FlexibleReturnType.Before
+ or FlexibleReturnType.MiddleInterval or FlexibleReturnType.None)
+ {
+ // Out of range, do nothing
+ }
+ else if (positionX.returnType is FlexibleReturnType.MiddleExecuting or FlexibleReturnType.After or FlexibleReturnType.Before ||
+ positionY.returnType is FlexibleReturnType.MiddleExecuting or FlexibleReturnType.After or FlexibleReturnType.Before ||
+ positionZ.returnType is FlexibleReturnType.MiddleExecuting or FlexibleReturnType.After or FlexibleReturnType.Before)
{
animationReturnType = FlexibleReturnType.MiddleExecuting;
Vector3 currentPosition = new Vector3(positionX.value, positionY.value, positionZ.value);
@@ -59,18 +68,6 @@ namespace Ichni.RhythmGame
{
animationReturnType = FlexibleReturnType.MiddleInterval;
}
-
- //本体使用,用于判断动画是否结束
- // else if (positionX.returnType is FlexibleReturnType.After or FlexibleReturnType.None &&
- // positionY.returnType is FlexibleReturnType.After or FlexibleReturnType.None &&
- // positionZ.returnType is FlexibleReturnType.After or FlexibleReturnType.None)
- // {
- // animationReturnType = FlexibleReturnType.After;
- // float3 currentPosition = new float3(positionX.value, positionY.value, positionZ.value);
- // targetTransformSubmodule.positionOffset.Add(currentPosition);
- // targetTransformSubmodule.positionDirtyMark = true;
- // Destroy(gameObject);
- // }
}
}
@@ -105,7 +102,7 @@ namespace Ichni.RhythmGame
public override void ExecuteBM()
{
- Displacement.GenerateElement(elementName, elementGuid, tags, false, GetElement(attachedElementGuid),
+ matchedElement = Displacement.GenerateElement(elementName, elementGuid, tags, false, GetElement(attachedElementGuid),
positionX.ConvertToGameType(), positionY.ConvertToGameType(), positionZ.ConvertToGameType());
}
diff --git a/Assets/Scripts/Animations/Transform/Scale.cs b/Assets/Scripts/Animations/Transform/Scale.cs
index d9668184..a9cf13da 100644
--- a/Assets/Scripts/Animations/Transform/Scale.cs
+++ b/Assets/Scripts/Animations/Transform/Scale.cs
@@ -93,7 +93,7 @@ namespace Ichni.RhythmGame
public override void ExecuteBM()
{
- Scale.GenerateElement(elementName, elementGuid, tags, false, GetElement(attachedElementGuid),
+ matchedElement = Scale.GenerateElement(elementName, elementGuid, tags, false, GetElement(attachedElementGuid),
scaleX.ConvertToGameType(), scaleY.ConvertToGameType(), scaleZ.ConvertToGameType());
}
diff --git a/Assets/Scripts/Animations/Transform/Swirl.cs b/Assets/Scripts/Animations/Transform/Swirl.cs
index 54b3d1d9..d9439ba0 100644
--- a/Assets/Scripts/Animations/Transform/Swirl.cs
+++ b/Assets/Scripts/Animations/Transform/Swirl.cs
@@ -94,7 +94,7 @@ namespace Ichni.RhythmGame
public override void ExecuteBM()
{
- Swirl.GenerateElement(elementName, elementGuid, tags, false, GetElement(attachedElementGuid),
+ matchedElement = Swirl.GenerateElement(elementName, elementGuid, tags, false, GetElement(attachedElementGuid),
eulerAngleX.ConvertToGameType(), eulerAngleY.ConvertToGameType(), eulerAngleZ.ConvertToGameType());
}
diff --git a/Assets/Scripts/Base/BaseElement.cs b/Assets/Scripts/Base/BaseElement.cs
index 05ccdc14..2c3018fb 100644
--- a/Assets/Scripts/Base/BaseElement.cs
+++ b/Assets/Scripts/Base/BaseElement.cs
@@ -21,12 +21,18 @@ namespace Ichni.RhythmGame
///
/// 当物体被删除时执行的方法
///
- public void OnDelete();
+ public void OnDelete()
+ {
+ throw new NotImplementedException();
+ }
///
/// 删除物体,包括所有子物体
///
- public void Delete();
+ public void Delete()
+ {
+ throw new NotImplementedException();
+ }
}
// public virtual void SetTimeDuration()
@@ -41,70 +47,16 @@ namespace Ichni.RhythmGame
// childElementList.Select(x => x.timeDurationSubmodule).ToList());
// }
//
- // ///
- // /// 设置物体Transform的监听,顺序为Scale -> EulerAngles -> Position
- // /// 如果有一些特殊的物体(例如Camera,ElementFolder),需要自定义监听,可以重写这个方法
- // ///
- // public virtual void SetTransformObserver()
- // {
- // Observable.EveryUpdate().Subscribe(_ =>
- // {
- // if (transformSubmodule == null)
- // {
- // return;
- // }
- //
- // if (transformSubmodule.scaleDirtyMark)
- // {
- // Vector3 offset = Vector3.zero;
- // foreach (Vector3 scaleOffset in transformSubmodule.scaleOffset)
- // {
- // offset += scaleOffset;
- // }
- //
- // transformSubmodule.currentScale = transformSubmodule.originalScale + offset;
- // transform.localScale = transformSubmodule.currentScale;
- // transformSubmodule.scaleDirtyMark = false;
- // }
- //
- // if (transformSubmodule.eulerAnglesDirtyMark)
- // {
- // Vector3 offset = Vector3.zero;
- // foreach (Vector3 eulerOffset in transformSubmodule.eulerAnglesOffset)
- // {
- // offset += eulerOffset;
- // }
- //
- // transformSubmodule.currentEulerAngles = transformSubmodule.originalEulerAngles + offset;
- // transform.localEulerAngles = transformSubmodule.currentEulerAngles;
- // transformSubmodule.eulerAnglesDirtyMark = false;
- // }
- //
- // if (transformSubmodule.positionDirtyMark)
- // {
- // Vector3 offset = Vector3.zero;
- // foreach (Vector3 posOffset in transformSubmodule.positionOffset)
- // {
- // offset += posOffset;
- // }
- //
- // transformSubmodule.currentPosition = transformSubmodule.originalPosition + offset;
- // transform.localPosition = transformSubmodule.currentPosition;
- // transformSubmodule.positionDirtyMark = false;
- // }
- //
- // transformSubmodule.scaleOffset.Clear();
- // transformSubmodule.eulerAnglesOffset.Clear();
- // transformSubmodule.positionOffset.Clear();
- // }).AddTo(gameObject);
- // }
namespace Beatmap
{
public abstract class BaseElement_BM
{
-
+ ///
+ /// 从存档类中生成游戏物体
+ ///
+ public abstract void ExecuteBM();
}
}
}
\ No newline at end of file
diff --git a/Assets/Scripts/Base/GeneralSubmodules/ColorSubmodule.cs b/Assets/Scripts/Base/GeneralSubmodules/ColorSubmodule.cs
index 42bf115d..4ae8ec65 100644
--- a/Assets/Scripts/Base/GeneralSubmodules/ColorSubmodule.cs
+++ b/Assets/Scripts/Base/GeneralSubmodules/ColorSubmodule.cs
@@ -106,14 +106,16 @@ namespace Ichni.RhythmGame
public override void ExecuteBM()
{
attachedElement = GameElement_BM.GetElement(attachedElementGuid);
- (attachedElement as IHaveColorSubmodule).colorSubmodule = new ColorSubmodule(attachedElement, originalBaseColor, emissionEnabled,
- originalEmissionColor, originalEmissionIntensity);
+ (attachedElement as IHaveColorSubmodule).colorSubmodule = new ColorSubmodule(attachedElement,
+ originalBaseColor, emissionEnabled, originalEmissionColor, originalEmissionIntensity);
+ attachedElement.submoduleList.Add((attachedElement as IHaveColorSubmodule).colorSubmodule);
}
public override void DuplicateBM(GameElement attached)
{
- (attachedElement as IHaveColorSubmodule).colorSubmodule = new ColorSubmodule(attached, originalBaseColor, emissionEnabled,
- originalEmissionColor, originalEmissionIntensity);
+ (attached as IHaveColorSubmodule).colorSubmodule = new ColorSubmodule(attached,
+ originalBaseColor, emissionEnabled, originalEmissionColor, originalEmissionIntensity);
+ attached.submoduleList.Add((attached as IHaveColorSubmodule).colorSubmodule);
}
}
}
diff --git a/Assets/Scripts/Base/GeneralSubmodules/EffectSubmodule.cs b/Assets/Scripts/Base/GeneralSubmodules/EffectSubmodule.cs
index b295c787..40617175 100644
--- a/Assets/Scripts/Base/GeneralSubmodules/EffectSubmodule.cs
+++ b/Assets/Scripts/Base/GeneralSubmodules/EffectSubmodule.cs
@@ -94,12 +94,14 @@ namespace Ichni.RhythmGame
public override void ExecuteBM()
{
attachedElement = GameElement_BM.GetElement(attachedElementGuid);
- (attachedElement as IHaveEffectSubmodule).effectSubmodule = new EffectSubmodule(attachedElement);
+ (attachedElement as IHaveEffectSubmodule).effectSubmodule = new EffectSubmodule(attachedElement, effectCollection);
+ attachedElement.submoduleList.Add((attachedElement as IHaveEffectSubmodule).effectSubmodule);
}
public override void DuplicateBM(GameElement attached)
{
- (attached as IHaveEffectSubmodule).effectSubmodule = new EffectSubmodule(attached);
+ (attached as IHaveEffectSubmodule).effectSubmodule = new EffectSubmodule(attached, effectCollection);
+ attached.submoduleList.Add((attached as IHaveEffectSubmodule).effectSubmodule);
}
}
}
diff --git a/Assets/Scripts/Base/GeneralSubmodules/SubmoduleBase.cs b/Assets/Scripts/Base/GeneralSubmodules/SubmoduleBase.cs
index ea5c6f6c..cde64667 100644
--- a/Assets/Scripts/Base/GeneralSubmodules/SubmoduleBase.cs
+++ b/Assets/Scripts/Base/GeneralSubmodules/SubmoduleBase.cs
@@ -52,11 +52,6 @@ namespace Ichni.RhythmGame
this.attachedElement = attachedElement;
attachedElementGuid = attachedElement.elementGuid;
}
-
- ///
- /// 从存档类中生成游戏物体
- ///
- public abstract void ExecuteBM();
///
/// 复制物体
diff --git a/Assets/Scripts/Base/GeneralSubmodules/TimeDurationSubmodule.cs b/Assets/Scripts/Base/GeneralSubmodules/TimeDurationSubmodule.cs
index 9c62df26..9039ae0a 100644
--- a/Assets/Scripts/Base/GeneralSubmodules/TimeDurationSubmodule.cs
+++ b/Assets/Scripts/Base/GeneralSubmodules/TimeDurationSubmodule.cs
@@ -110,14 +110,14 @@ namespace Ichni.RhythmGame
public override void ExecuteBM()
{
attachedElement = GameElement_BM.GetElement(attachedElementGuid);
- (attachedElement as IHaveTimeDurationSubmodule).timeDurationSubmodule =
- new TimeDurationSubmodule(attachedElement, isOverridingDuration, startTime, endTime);
+ (attachedElement as IHaveTimeDurationSubmodule).timeDurationSubmodule = new TimeDurationSubmodule(attachedElement, isOverridingDuration, startTime, endTime);
+ attachedElement.submoduleList.Add((attachedElement as IHaveTimeDurationSubmodule).timeDurationSubmodule);
}
public override void DuplicateBM(GameElement attached)
{
- (attachedElement as IHaveTimeDurationSubmodule).timeDurationSubmodule =
- new TimeDurationSubmodule(attached, isOverridingDuration, startTime, endTime);
+ (attached as IHaveTimeDurationSubmodule).timeDurationSubmodule = new TimeDurationSubmodule(attached, isOverridingDuration, startTime, endTime);
+ attached.submoduleList.Add((attached as IHaveTimeDurationSubmodule).timeDurationSubmodule);
}
}
}
diff --git a/Assets/Scripts/Base/GeneralSubmodules/TransformSubmodule.cs b/Assets/Scripts/Base/GeneralSubmodules/TransformSubmodule.cs
index e62c7f63..b981f600 100644
--- a/Assets/Scripts/Base/GeneralSubmodules/TransformSubmodule.cs
+++ b/Assets/Scripts/Base/GeneralSubmodules/TransformSubmodule.cs
@@ -88,6 +88,10 @@ namespace Ichni.RhythmGame
{
TransformSubmodule transformSubmodule { get; set; }
+ ///
+ /// 设置物体Transform的监听,顺序为Scale -> EulerAngles -> Position
+ /// 如果有一些特殊的物体(例如Camera,ElementFolder),需要自定义监听,可以重写这个方法
+ ///
public void SetTransformObserver()
{
GameElement attachedGameElement = transformSubmodule.attachedGameElement;
@@ -169,14 +173,14 @@ namespace Ichni.RhythmGame
public override void ExecuteBM()
{
attachedElement = GameElement_BM.GetElement(attachedElementGuid);
- (attachedElement as IHaveTransformSubmodule).transformSubmodule =
- new TransformSubmodule(attachedElement, originalPosition, originalEulerAngles, originalScale);
+ (attachedElement as IHaveTransformSubmodule).transformSubmodule = new TransformSubmodule(attachedElement, originalPosition, originalEulerAngles, originalScale);
+ attachedElement.submoduleList.Add((attachedElement as IHaveTransformSubmodule).transformSubmodule);
}
public override void DuplicateBM(GameElement attached)
{
- (attached as IHaveTransformSubmodule).transformSubmodule =
- new TransformSubmodule(attached, originalPosition, originalEulerAngles, originalScale);
+ (attached as IHaveTransformSubmodule).transformSubmodule = new TransformSubmodule(attached, originalPosition, originalEulerAngles, originalScale);
+ attached.submoduleList.Add((attached as IHaveTransformSubmodule).transformSubmodule);
}
}
}
diff --git a/Assets/Scripts/Base/Manager/EditorManager.cs b/Assets/Scripts/Base/Manager/EditorManager.cs
index 74a67105..a8d29b82 100644
--- a/Assets/Scripts/Base/Manager/EditorManager.cs
+++ b/Assets/Scripts/Base/Manager/EditorManager.cs
@@ -14,73 +14,84 @@ namespace Ichni
public static EditorManager instance;
public SongModule songModule;
+
+ public ProjectManager projectManager;
+ public EditorSettings editorSettings;
+
+ public ProjectInformation projectInformation;
+ public SongInformation songInformation;
+ public BeatmapContainer beatmapContainer;
+ public CommandScripts commandScripts;
+
public NoteBase.NoteJudgeType currentJudgeType;
public BasePrefabsCollection basePrefabs;
- public List elementList = new List();
-
- public List elementList_BM = new List();
- public List submoduleList_BM = new List();
-
private void Awake()
{
instance = this;
+ projectManager = new ProjectManager();
}
private void Start()
{
-
+ //CreateNew();
+ projectManager.loadManager.Load("TestProject");
+ AudioSource.PlayClipAtPoint(songInformation.song, Vector3.zero);
- //currentJudgeType = NoteBase.NoteJudgeType.Perfect;
-
- var f0 = ElementFolder.GenerateElement("Folder", Guid.NewGuid(), new List(), true, null);
- var dis0 = Displacement.GenerateElement("Displacement-0",Guid.NewGuid(), new List(),true, f0,
- new FlexibleFloat(),
- new FlexibleFloat(new List(){new (0,2,0,10, AnimationCurveType.Linear)}),
- new FlexibleFloat());
- var t0 = Track.GenerateElement("Track", Guid.NewGuid(), new List(), true, f0);
- t0.trackPathSubmodule = new TrackPathSubmodule(t0, Track.TrackSpaceType.Linear,
- Track.TrackSamplingType.TimeDistributed, false);
- t0.trackTimeSubmodule = new TrackTimeSubmoduleMovable(t0, 0, 2, 1, AnimationCurveType.OutQuad);
- var pp0 = TrackPercentPoint.GenerateElement("TrackPercentPoint-0", Guid.NewGuid(), new List(), true, t0,
- new FlexibleFloat(new List() { new(0, 2, 0, 1, AnimationCurveType.OutQuad) }));
- var tr0 = Trail.GenerateElement("Trail-0", Guid.NewGuid(), new List(), true, pp0, 5);
- // t0.trackRendererSubmodule = new TrackRendererSubmoduleAutoOrient(t0);
- var p0 = PathNode.GenerateElement("PathNode-0", Guid.NewGuid(), new List(), true, t0);
- p0.transformSubmodule = new TransformSubmodule(p0, new Vector3(-5, 5, 10), Vector3.forward, Vector3.one);
- p0.colorSubmodule = new ColorSubmodule(p0, Color.white);
- var p1 = PathNode.GenerateElement("PathNode-1", Guid.NewGuid(), new List(), true, t0);
- p1.transformSubmodule = new TransformSubmodule(p1, new Vector3(5, -5, 10), Vector3.forward, Vector3.one);
- p1.colorSubmodule = new ColorSubmodule(p1, Color.red);
- var n0 = Tap.GenerateElement("Note-0", Guid.NewGuid(), new List(), true, t0, 1f);
- var n0v = BasicNoteVisual.GenerateElement("Note-0-V", Guid.NewGuid(), new List(), true, n0,
- "basic", "BasicNoteTap3D");
-
- elementList.ForEach(e =>
+ beatmapContainer.gameElementList.ForEach(gameElement =>
{
- e.AfterInitialize();
- e.Refresh();
+ if (gameElement is IHaveTransformSubmodule transformedElement)
+ {
+ transformedElement.SetTransformObserver();
+ }
+
+ gameElement.AfterInitialize();
+ gameElement.Refresh();
});
-
- elementList.ForEach(e =>
- {
- e.SaveBM();
- e.submoduleList.RemoveAll(s=>s == null);
- e.submoduleList.ForEach(s => s.SaveBM());
- });
-
- //Save
- elementList.ForEach(x => elementList_BM.Add(x.matchedBM));
- elementList.ForEach(x => submoduleList_BM.AddRange(x.submoduleList.ConvertAll(s => s.matchedBM as Submodule_BM)));
- ES3.Save>("submoduleList", submoduleList_BM);
- ES3.Save>("elementList", elementList_BM);
-
}
private void Update()
{
songModule.songTime += Time.deltaTime;
}
+
+ private void CreateNew()
+ {
+ projectManager.GenerateProject("TestProject");
+
+ var f0 = ElementFolder.GenerateElement("Folder", Guid.NewGuid(), new List(), true, null);
+ var dis0 = Displacement.GenerateElement("Displacement-0",Guid.NewGuid(), new List(),true, f0,
+ new FlexibleFloat(),
+ new FlexibleFloat(new List(){new (0,2,0,10, AnimationCurveType.Linear)}),
+ new FlexibleFloat());
+ var t0 = Track.GenerateElement("Track", Guid.NewGuid(), new List(), true, f0);
+ t0.trackPathSubmodule = new TrackPathSubmodule(t0, Track.TrackSpaceType.Linear, Track.TrackSamplingType.TimeDistributed, false);
+ t0.submoduleList.Add(t0.trackPathSubmodule);
+ t0.trackTimeSubmodule = new TrackTimeSubmoduleMovable(t0, 0, 2, 1, AnimationCurveType.OutQuad);
+ t0.submoduleList.Add(t0.trackTimeSubmodule);
+ var pp0 = TrackPercentPoint.GenerateElement("TrackPercentPoint-0", Guid.NewGuid(), new List(), true, t0,
+ new FlexibleFloat(new List() { new(0, 2, 0, 1, AnimationCurveType.OutQuad) }));
+ var tr0 = Trail.GenerateElement("Trail-0", Guid.NewGuid(), new List(), true, pp0, 5);
+ // t0.trackRendererSubmodule = new TrackRendererSubmoduleAutoOrient(t0);
+ var p0 = PathNode.GenerateElement("PathNode-0", Guid.NewGuid(), new List(), true, t0);
+ p0.transformSubmodule = new TransformSubmodule(p0, new Vector3(-5, 5, 10), Vector3.zero, Vector3.one);
+ p0.colorSubmodule = new ColorSubmodule(p0, Color.white);
+ var p1 = PathNode.GenerateElement("PathNode-1", Guid.NewGuid(), new List(), true, t0);
+ p1.transformSubmodule = new TransformSubmodule(p1, new Vector3(5, -5, 10), Vector3.zero, Vector3.one);
+ p1.colorSubmodule = new ColorSubmodule(p1, Color.red);
+ var n0 = Tap.GenerateElement("Note-0", Guid.NewGuid(), new List(), true, t0, 1f);
+ var n0v = BasicNoteVisual.GenerateElement("Note-0-V", Guid.NewGuid(), new List(), true, n0,
+ "basic", "BasicNoteTap3D");
+
+ beatmapContainer.gameElementList.ForEach(e =>
+ {
+ e.AfterInitialize();
+ e.Refresh();
+ });
+
+ projectManager.saveManager.Save();
+ projectManager.exportManager.Export();
+ }
}
public class SongModule
diff --git a/Assets/Scripts/Base/Manager/ProjectManager.cs b/Assets/Scripts/Base/Manager/ProjectManager.cs
new file mode 100644
index 00000000..bda24063
--- /dev/null
+++ b/Assets/Scripts/Base/Manager/ProjectManager.cs
@@ -0,0 +1,173 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using Ichni.RhythmGame;
+using Ichni.RhythmGame.Beatmap;
+using UnityEngine;
+
+namespace Ichni
+{
+ public class ProjectManager
+ {
+ public static readonly ES3Settings SaveSettings = new ES3Settings
+ {
+ compressionType = ES3.CompressionType.None,
+ encryptionType = ES3.EncryptionType.None,
+ format = ES3.Format.JSON,
+ };
+
+ public static readonly ES3Settings ExportSettings = new ES3Settings
+ {
+ compressionType = ES3.CompressionType.Gzip,
+ encryptionType = ES3.EncryptionType.AES,
+ encryptionPassword = "Soullies515",
+ format = ES3.Format.JSON,
+ };
+
+ public SaveManager saveManager;
+ public LoadManager loadManager;
+ public ExportManager exportManager;
+
+ public ProjectManager()
+ {
+ saveManager = new SaveManager();
+ loadManager = new LoadManager();
+ exportManager = new ExportManager();
+ }
+
+ public void GenerateProject(string projectName)
+ {
+ EditorManager.instance.projectInformation = new ProjectInformation(projectName, "Soullies",
+ "2.0", "2025-02-08", "2025-02-08", new List());
+ EditorManager.instance.songInformation = new SongInformation("TestSong", 120, 0);
+ EditorManager.instance.beatmapContainer = new BeatmapContainer();
+ EditorManager.instance.commandScripts = new CommandScripts(new List());
+
+ //Create project folder
+ if (!System.IO.Directory.Exists(EditorManager.instance.projectInformation.projectPath))
+ {
+ System.IO.Directory.CreateDirectory(EditorManager.instance.projectInformation.projectPath);
+ }
+ }
+ }
+
+ public class ExportManager
+ {
+ public void Export()
+ {
+ string exportPath = Application.streamingAssetsPath + "/Export/" +
+ EditorManager.instance.projectInformation.projectName;
+ string projectInfoPath = exportPath + "/ProjectInfo.bytes";
+ string songInfoPath = exportPath + "/SongInfo.bytes";
+ string beatmapPath = exportPath + "/BeatMap.bytes";
+ string commandScriptsPath = exportPath + "/CommandScripts.bytes";
+
+ ExportProjectInfo(projectInfoPath);
+ ExportSongInfo(songInfoPath);
+ ExportBeatMap(beatmapPath);
+ ExportCommandScripts(commandScriptsPath);
+ }
+
+ private void ExportProjectInfo(string exportPath)
+ {
+ EditorManager.instance.projectInformation.SaveBM();
+ ES3.Save("ProjectInformation", EditorManager.instance.projectInformation.matchedBM as ProjectInformation_BM,
+ exportPath, ProjectManager.ExportSettings);
+ }
+
+ private void ExportSongInfo(string exportPath)
+ {
+ EditorManager.instance.songInformation.SaveBM();
+ ES3.Save("SongInformation", EditorManager.instance.songInformation.matchedBM as SongInformation_BM,
+ exportPath, ProjectManager.ExportSettings);
+ }
+
+ private void ExportBeatMap(string exportPath)
+ {
+ EditorManager.instance.beatmapContainer.SaveBM();
+ ES3.Save("BeatMap", EditorManager.instance.beatmapContainer.matchedBM as BeatmapContainer_BM,
+ exportPath, ProjectManager.ExportSettings);
+ }
+
+ private void ExportCommandScripts(string exportPath)
+ {
+ EditorManager.instance.commandScripts.SaveBM();
+ ES3.Save("CommandScripts", EditorManager.instance.commandScripts.matchedBM as CommandScripts_BM,
+ exportPath, ProjectManager.ExportSettings);
+ }
+ }
+
+ public class SaveManager
+ {
+ public void Save()
+ {
+ SaveProjectInfo();
+ SaveSongInfo();
+ SaveBeatMap();
+ SaveCommandScripts();
+ }
+
+ private void SaveProjectInfo()
+ {
+ EditorManager.instance.projectInformation.SaveBM();
+ ES3.Save("ProjectInformation", EditorManager.instance.projectInformation.matchedBM as ProjectInformation_BM,
+ EditorManager.instance.projectInformation.peojectInfoPath, ProjectManager.SaveSettings);
+ }
+
+ private void SaveSongInfo()
+ {
+ EditorManager.instance.songInformation.SaveBM();
+ ES3.Save("SongInformation", EditorManager.instance.songInformation.matchedBM as SongInformation_BM,
+ EditorManager.instance.projectInformation.songInfoPath, ProjectManager.SaveSettings);
+ }
+
+ private void SaveBeatMap()
+ {
+ EditorManager.instance.beatmapContainer.SaveBM();
+ ES3.Save("BeatMap", EditorManager.instance.beatmapContainer.matchedBM as BeatmapContainer_BM,
+ EditorManager.instance.projectInformation.beatmapPath, ProjectManager.SaveSettings);
+ }
+
+ private void SaveCommandScripts()
+ {
+ EditorManager.instance.commandScripts.SaveBM();
+ ES3.Save("CommandScripts", EditorManager.instance.commandScripts.matchedBM as CommandScripts_BM,
+ EditorManager.instance.projectInformation.CommandScriptsPath, ProjectManager.SaveSettings);
+ }
+ }
+
+ public class LoadManager
+ {
+ public void Load(string projectName)
+ {
+ LoadProjectInfo(projectName);
+ LoadSongInfo();
+ LoadBeatMap();
+ LoadCommandScripts();
+ }
+
+ private void LoadProjectInfo(string projectName)
+ {
+ string projectInfoPath = Application.streamingAssetsPath + "/Projects/" + projectName + "/ProjectInfo.json";
+ ES3.Load("ProjectInformation", projectInfoPath, ProjectManager.SaveSettings).ExecuteBM();
+ }
+
+ private void LoadSongInfo()
+ {
+ ES3.Load("SongInformation", EditorManager.instance.projectInformation.songInfoPath,
+ ProjectManager.SaveSettings).ExecuteBM();
+ }
+
+ private void LoadBeatMap()
+ {
+ ES3.Load("BeatMap", EditorManager.instance.projectInformation.beatmapPath,
+ ProjectManager.SaveSettings).ExecuteBM();
+ }
+
+ private void LoadCommandScripts()
+ {
+ ES3.Load("CommandScripts", EditorManager.instance.projectInformation.CommandScriptsPath,
+ ProjectManager.SaveSettings).ExecuteBM();
+ }
+ }
+}
\ No newline at end of file
diff --git a/Assets/Scripts/Base/Manager/ProjectManager.cs.meta b/Assets/Scripts/Base/Manager/ProjectManager.cs.meta
new file mode 100644
index 00000000..9abfdadd
--- /dev/null
+++ b/Assets/Scripts/Base/Manager/ProjectManager.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: eaac9d0bf222646fc89d03493f9fca69
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Scripts/Base/ProjectFiles/BeatmapContainer.cs b/Assets/Scripts/Base/ProjectFiles/BeatmapContainer.cs
index 9a82d0e9..58a06195 100644
--- a/Assets/Scripts/Base/ProjectFiles/BeatmapContainer.cs
+++ b/Assets/Scripts/Base/ProjectFiles/BeatmapContainer.cs
@@ -1,18 +1,69 @@
using System.Collections;
using System.Collections.Generic;
+using Ichni.RhythmGame.Beatmap;
using UnityEngine;
-public class BeatmapContainer : MonoBehaviour
+namespace Ichni.RhythmGame
{
- // Start is called before the first frame update
- void Start()
+ public class BeatmapContainer : IBaseElement
{
+ public List gameElementList;
+ public BaseElement_BM matchedBM { get; set; }
+ public BeatmapContainer()
+ {
+ gameElementList = new List();
+ }
+
+ public void SaveBM()
+ {
+ matchedBM = new BeatmapContainer_BM(gameElementList);
+ }
}
- // Update is called once per frame
- void Update()
+ namespace Beatmap
{
-
+ public class BeatmapContainer_BM : BaseElement_BM
+ {
+ public List elementList;
+
+ public BeatmapContainer_BM()
+ {
+
+ }
+
+ public BeatmapContainer_BM(List gameElementList)
+ {
+ elementList = new List();
+
+ gameElementList.ForEach(e =>
+ {
+ e.SaveBM();
+ e.submoduleList.RemoveAll(s=>s == null);
+ e.submoduleList.ForEach(s => s.SaveBM());
+ });
+
+ foreach (var gameElement in gameElementList)
+ {
+ elementList.Add(gameElement.matchedBM);
+ elementList.AddRange(gameElement.submoduleList.ConvertAll(submodule => submodule.matchedBM));
+ }
+ }
+
+ public override void ExecuteBM()
+ {
+ EditorManager.instance.beatmapContainer = new BeatmapContainer();
+
+ elementList.ForEach(element =>
+ {
+ if (element is GameElement_BM gameElement)
+ {
+ GameElement_BM.identifier.Add(gameElement.elementGuid, gameElement);
+ }
+
+ element.ExecuteBM();
+ });
+ }
+ }
}
-}
+}
\ No newline at end of file
diff --git a/Assets/Scripts/Base/ProjectFiles/CommandScriptContainer.cs b/Assets/Scripts/Base/ProjectFiles/CommandScriptContainer.cs
deleted file mode 100644
index e2bc05e7..00000000
--- a/Assets/Scripts/Base/ProjectFiles/CommandScriptContainer.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-
-public class CommandScriptContainer : MonoBehaviour
-{
- // Start is called before the first frame update
- void Start()
- {
-
- }
-
- // Update is called once per frame
- void Update()
- {
-
- }
-}
diff --git a/Assets/Scripts/Base/ProjectFiles/CommandScripts.cs b/Assets/Scripts/Base/ProjectFiles/CommandScripts.cs
new file mode 100644
index 00000000..0539699c
--- /dev/null
+++ b/Assets/Scripts/Base/ProjectFiles/CommandScripts.cs
@@ -0,0 +1,47 @@
+using System.Collections;
+using System.Collections.Generic;
+using Ichni.RhythmGame;
+using Ichni.RhythmGame.Beatmap;
+using UnityEngine;
+
+namespace Ichni.RhythmGame
+{
+ public class CommandScripts : IBaseElement
+ {
+ List commandList;
+ public BaseElement_BM matchedBM { get; set; }
+
+ public CommandScripts(List commandList)
+ {
+ this.commandList = commandList;
+ }
+
+ public void SaveBM()
+ {
+ matchedBM = new CommandScripts_BM(commandList);
+ }
+ }
+
+ namespace Beatmap
+ {
+ public class CommandScripts_BM : BaseElement_BM
+ {
+ public List commandList;
+
+ public CommandScripts_BM()
+ {
+
+ }
+
+ public CommandScripts_BM(List commandList)
+ {
+ this.commandList = commandList;
+ }
+
+ public override void ExecuteBM()
+ {
+ EditorManager.instance.commandScripts = new CommandScripts(commandList);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Assets/Scripts/Base/ProjectFiles/CommandScriptContainer.cs.meta b/Assets/Scripts/Base/ProjectFiles/CommandScripts.cs.meta
similarity index 100%
rename from Assets/Scripts/Base/ProjectFiles/CommandScriptContainer.cs.meta
rename to Assets/Scripts/Base/ProjectFiles/CommandScripts.cs.meta
diff --git a/Assets/Scripts/Base/ProjectFiles/EditorSettings.cs b/Assets/Scripts/Base/ProjectFiles/EditorSettings.cs
new file mode 100644
index 00000000..545208f3
--- /dev/null
+++ b/Assets/Scripts/Base/ProjectFiles/EditorSettings.cs
@@ -0,0 +1,13 @@
+using System.Collections;
+using System.Collections.Generic;
+using Ichni.RhythmGame;
+using Ichni.RhythmGame.Beatmap;
+using UnityEngine;
+
+namespace Ichni
+{
+ public class EditorSettings
+ {
+ public int autoSaveInterval = 300;
+ }
+}
\ No newline at end of file
diff --git a/Assets/Scripts/Base/ProjectFiles/EditorSettings.cs.meta b/Assets/Scripts/Base/ProjectFiles/EditorSettings.cs.meta
new file mode 100644
index 00000000..79157f07
--- /dev/null
+++ b/Assets/Scripts/Base/ProjectFiles/EditorSettings.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 6d388e457813547ca8a9e6282d72ae32
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Scripts/Base/ProjectFiles/ProjectInformation.cs b/Assets/Scripts/Base/ProjectFiles/ProjectInformation.cs
index 2d73f7c6..a389c64d 100644
--- a/Assets/Scripts/Base/ProjectFiles/ProjectInformation.cs
+++ b/Assets/Scripts/Base/ProjectFiles/ProjectInformation.cs
@@ -1,18 +1,80 @@
using System.Collections;
using System.Collections.Generic;
+using Ichni.RhythmGame.Beatmap;
using UnityEngine;
-public class ProjectInformation : MonoBehaviour
+namespace Ichni.RhythmGame
{
- // Start is called before the first frame update
- void Start()
+ public class ProjectInformation : IBaseElement
{
+ public string projectName;
+ public string creatorName;
+ public string editorVersion;
+ public string createTime;
+ public string lastSaveTime;
+ public List selectedThemeBundleList;
+
+ public string projectPath;
+ public BaseElement_BM matchedBM { get; set; }
+ public string peojectInfoPath => projectPath + "/ProjectInfo.json";
+ public string songInfoPath => projectPath + "/SongInfo.json";
+ public string songPath => projectPath + EditorManager.instance.songInformation.songName + ".wav";
+ public string beatmapPath => projectPath + "/Beatmap.json";
+ public string CommandScriptsPath => projectPath + "/CommandScripts.json";
+
+ public ProjectInformation(string projectName, string creatorName, string editorVersion,
+ string createTime, string lastSaveTime, List selectedThemeBundleList)
+ {
+ this.projectName = projectName;
+ this.creatorName = creatorName;
+ this.editorVersion = editorVersion;
+ this.createTime = createTime;
+ this.lastSaveTime = lastSaveTime;
+ this.selectedThemeBundleList = selectedThemeBundleList;
+
+ projectPath = Application.streamingAssetsPath + "/Projects/" + projectName;
+ }
+
+ public void SaveBM()
+ {
+ matchedBM = new ProjectInformation_BM(projectName, creatorName, editorVersion,
+ createTime, lastSaveTime, selectedThemeBundleList);
+ }
}
- // Update is called once per frame
- void Update()
+ namespace Beatmap
{
-
+ public class ProjectInformation_BM : BaseElement_BM
+ {
+ public string projectName;
+ public string creatorName;
+ public string editorVersion;
+ public string createTime;
+ public string lastSaveTime;
+ public List selectedThemeBundleList;
+
+ public ProjectInformation_BM()
+ {
+
+ }
+
+ public ProjectInformation_BM(string projectName, string creatorName, string editorVersion,
+ string createTime, string lastSaveTime, List selectedThemeBundleList)
+ {
+ this.projectName = projectName;
+ this.creatorName = creatorName;
+ this.editorVersion = editorVersion;
+ this.createTime = createTime;
+ this.lastSaveTime = lastSaveTime;
+ this.selectedThemeBundleList = selectedThemeBundleList;
+ }
+
+ public override void ExecuteBM()
+ {
+ EditorManager.instance.projectInformation = new ProjectInformation(projectName,
+ creatorName, editorVersion, createTime, lastSaveTime, selectedThemeBundleList);
+ }
+ }
}
-}
+}
\ No newline at end of file
diff --git a/Assets/Scripts/Base/ProjectFiles/SongInformation.cs b/Assets/Scripts/Base/ProjectFiles/SongInformation.cs
index ccc306a2..cb44b2c4 100644
--- a/Assets/Scripts/Base/ProjectFiles/SongInformation.cs
+++ b/Assets/Scripts/Base/ProjectFiles/SongInformation.cs
@@ -1,18 +1,60 @@
using System.Collections;
using System.Collections.Generic;
+using Ichni.RhythmGame.Beatmap;
using UnityEngine;
-public class SongInformation : MonoBehaviour
+namespace Ichni.RhythmGame
{
- // Start is called before the first frame update
- void Start()
+ public class SongInformation : IBaseElement
{
+ public AudioClip song; //曲目
+ public string songName;
+ public string songLocation; //曲名
+ public float bpm; //每分钟节拍数
+ public float delay; //设定音乐和谱面延迟Delay秒后开始,在延迟中,SongPosition为负数。
+
+ public BaseElement_BM matchedBM { get; set; }
+ public SongInformation(string songName, float bpm, float delay)
+ {
+ this.songName = songName;
+ this.bpm = bpm;
+ this.delay = delay;
+ songLocation = EditorManager.instance.projectInformation.projectPath + "/" + songName + ".wav";
+ Debug.Log("Loading song from " + songLocation + " " + ES3.FileExists(songLocation));
+ song = ES3.LoadAudio(songLocation, AudioType.WAV);
+ }
+
+ public void SaveBM()
+ {
+ matchedBM = new SongInformation_BM(songName, bpm, delay);
+ }
}
- // Update is called once per frame
- void Update()
+ namespace Beatmap
{
-
+ public class SongInformation_BM : BaseElement_BM
+ {
+ public string songName;
+ public float bpm;
+ public float delay;
+
+ public SongInformation_BM()
+ {
+
+ }
+
+ public SongInformation_BM(string songName, float bpm, float delay)
+ {
+ this.songName = songName;
+ this.bpm = bpm;
+ this.delay = delay;
+ }
+
+ public override void ExecuteBM()
+ {
+ EditorManager.instance.songInformation = new SongInformation(songName, bpm, delay);
+ }
+ }
}
-}
+}
\ No newline at end of file
diff --git a/Assets/Scripts/GameElements/GameElement.cs b/Assets/Scripts/GameElements/GameElement.cs
index 46fc9d81..40939568 100644
--- a/Assets/Scripts/GameElements/GameElement.cs
+++ b/Assets/Scripts/GameElements/GameElement.cs
@@ -39,7 +39,7 @@ namespace Ichni.RhythmGame
this.elementName = name;
this.elementGuid = elementGuid;
this.tags = tags;
- EditorManager.instance.elementList.Add(this);
+ EditorManager.instance.beatmapContainer.gameElementList.Add(this);
submoduleList = new List();
if (isFirstGenerated)
{
@@ -123,7 +123,7 @@ namespace Ichni.RhythmGame
#if UNITY_EDITOR
Debug.Log("Delete " + elementName + "(" + elementGuid + ")");
#endif
- EditorManager.instance.elementList.Remove(this); //从保存列表中剔除
+ EditorManager.instance.beatmapContainer.gameElementList.Remove(this); //从保存列表中剔除
this.parentElement.childElementList.Remove(this);
Destroy(gameObject); //销毁
}
@@ -167,20 +167,19 @@ namespace Ichni.RhythmGame
{
return element_BM;
}
-
- Debug.LogAssertion("Element not found or do not have id");
+
return null;
}
public static GameElement GetElement(Guid id)
{
- return GetElementBM(id)?.matchedElement;
+ if(identifier.TryGetValue(id, out GameElement_BM element_BM))
+ {
+ return element_BM.matchedElement;
+ }
+
+ return null;
}
-
- ///
- /// 从存档类中生成游戏物体
- ///
- public abstract void ExecuteBM();
///
/// 复制物体
diff --git a/Assets/Scripts/GameElements/Notes/JudgeSubmodules/NoteJudgeSubmodule.cs b/Assets/Scripts/GameElements/Notes/JudgeSubmodules/NoteJudgeSubmodule.cs
index 46273871..74bf37b4 100644
--- a/Assets/Scripts/GameElements/Notes/JudgeSubmodules/NoteJudgeSubmodule.cs
+++ b/Assets/Scripts/GameElements/Notes/JudgeSubmodules/NoteJudgeSubmodule.cs
@@ -39,12 +39,14 @@ namespace Ichni.RhythmGame
public override void ExecuteBM()
{
attachedElement = GameElement_BM.GetElement(attachedElementGuid);
- //(attachedElement as NoteElement).noteJudgeSubmodule = new NoteJudgeSubmodule(attachedElement);
+ (attachedElement as NoteBase).noteJudgeSubmodule = new NoteJudgeSubmodule(attachedElement as NoteBase);
+ attachedElement.submoduleList.Add((attachedElement as NoteBase).noteJudgeSubmodule);
}
public override void DuplicateBM(GameElement attached)
{
- //(attached as NoteElement).noteJudgeSubmodule = new NoteJudgeSubmodule(attached);
+ (attached as NoteBase).noteJudgeSubmodule = new NoteJudgeSubmodule(attached as NoteBase);
+ attached.submoduleList.Add((attached as NoteBase).noteJudgeSubmodule);
}
}
diff --git a/Assets/Scripts/GameElements/Notes/NoteBase.cs b/Assets/Scripts/GameElements/Notes/NoteBase.cs
index 4f4e42c8..e3c4c639 100644
--- a/Assets/Scripts/GameElements/Notes/NoteBase.cs
+++ b/Assets/Scripts/GameElements/Notes/NoteBase.cs
@@ -7,7 +7,7 @@ using UnityEngine;
namespace Ichni.RhythmGame
{
- public abstract partial class NoteBase : GameElement, IHaveTransformSubmodule, IHaveTimeDurationSubmodule, IHaveEffectSubmodule
+ public abstract partial class NoteBase : GameElement, IHaveTransformSubmodule, IHaveTimeDurationSubmodule
{
[Title("Basic Info")]
public float exactJudgeTime;
@@ -23,7 +23,6 @@ namespace Ichni.RhythmGame
[Title("Submodules")]
public TransformSubmodule transformSubmodule { get; set; }
public TimeDurationSubmodule timeDurationSubmodule { get; set; }
- public EffectSubmodule effectSubmodule { get; set; }
public NoteJudgeSubmodule noteJudgeSubmodule { get; set; }
[Title("In-Game Info")]
@@ -59,12 +58,10 @@ namespace Ichni.RhythmGame
{
transformSubmodule = new TransformSubmodule(this);
timeDurationSubmodule = new TimeDurationSubmodule(this);
- effectSubmodule = new EffectSubmodule(this, EffectSubmodule.EffectSubmodulePreset.Note);
noteJudgeSubmodule = new NoteJudgeSubmodule(this);
submoduleList.Add(transformSubmodule);
submoduleList.Add(timeDurationSubmodule);
- submoduleList.Add(effectSubmodule);
submoduleList.Add(noteJudgeSubmodule);
}
@@ -93,24 +90,27 @@ namespace Ichni.RhythmGame
isJudged = true;
}
}
-
- effectSubmodule.effectCollection["Generate"].ForEach(e => e.UpdateEffect());
- effectSubmodule.effectCollection["GeneralJudge"].ForEach(e => e.UpdateEffect());
-
- switch (EditorManager.instance.currentJudgeType)
+
+ if (noteVisual != null)
{
- case NoteJudgeType.Perfect:
- effectSubmodule.effectCollection["Perfect"].ForEach(e => e.UpdateEffect());
- break;
- case NoteJudgeType.Good:
- effectSubmodule.effectCollection["Good"].ForEach(e => e.UpdateEffect());
- break;
- case NoteJudgeType.Bad:
- effectSubmodule.effectCollection["Bad"].ForEach(e => e.UpdateEffect());
- break;
- case NoteJudgeType.Miss:
- effectSubmodule.effectCollection["Miss"].ForEach(e => e.UpdateEffect());
- break;
+ noteVisual.effectSubmodule.effectCollection["Generate"].ForEach(e => e.UpdateEffect());
+ noteVisual.effectSubmodule.effectCollection["GeneralJudge"].ForEach(e => e.UpdateEffect());
+
+ switch (EditorManager.instance.currentJudgeType)
+ {
+ case NoteJudgeType.Perfect:
+ noteVisual.effectSubmodule.effectCollection["Perfect"].ForEach(e => e.UpdateEffect());
+ break;
+ case NoteJudgeType.Good:
+ noteVisual.effectSubmodule.effectCollection["Good"].ForEach(e => e.UpdateEffect());
+ break;
+ case NoteJudgeType.Bad:
+ noteVisual.effectSubmodule.effectCollection["Bad"].ForEach(e => e.UpdateEffect());
+ break;
+ case NoteJudgeType.Miss:
+ noteVisual.effectSubmodule.effectCollection["Miss"].ForEach(e => e.UpdateEffect());
+ break;
+ }
}
}
diff --git a/Assets/Scripts/GameElements/Notes/NoteVisual/NoteVisualBase.cs b/Assets/Scripts/GameElements/Notes/NoteVisual/NoteVisualBase.cs
index ac9ce03a..6d142a94 100644
--- a/Assets/Scripts/GameElements/Notes/NoteVisual/NoteVisualBase.cs
+++ b/Assets/Scripts/GameElements/Notes/NoteVisual/NoteVisualBase.cs
@@ -4,7 +4,7 @@ using UnityEngine;
namespace Ichni.RhythmGame
{
- public abstract class NoteVisualBase : SubstantialObject
+ public abstract class NoteVisualBase : SubstantialObject, IHaveEffectSubmodule
{
public NoteBase note;
@@ -13,5 +13,14 @@ namespace Ichni.RhythmGame
public List notePartList;
public List effectPartList;
+
+ public EffectSubmodule effectSubmodule { get; set; }
+
+ protected override void SetDefaultSubmodules()
+ {
+ base.SetDefaultSubmodules();
+ effectSubmodule = new EffectSubmodule(this, EffectSubmodule.EffectSubmodulePreset.Note);
+ submoduleList.Add(effectSubmodule);
+ }
}
}
\ No newline at end of file
diff --git a/Assets/Scripts/GameElements/Track/Track.cs b/Assets/Scripts/GameElements/Track/Track.cs
index 0e5ee069..5caed25f 100644
--- a/Assets/Scripts/GameElements/Track/Track.cs
+++ b/Assets/Scripts/GameElements/Track/Track.cs
@@ -39,6 +39,8 @@ namespace Ichni.RhythmGame
private void Update()
{
+ Debug.Log(timeDurationSubmodule == null);
+
if (timeDurationSubmodule.CheckTimeInDuration(EditorManager.instance.songModule.songTime))
{
(trackTimeSubmodule as TrackTimeSubmoduleMovable)?.UpdateTrackPart();
diff --git a/Assets/Scripts/GameElements/Track/TrackPoints/CrossTrackPoint.cs b/Assets/Scripts/GameElements/Track/TrackPoints/CrossTrackPoint.cs
index 9721c9b3..9b430919 100644
--- a/Assets/Scripts/GameElements/Track/TrackPoints/CrossTrackPoint.cs
+++ b/Assets/Scripts/GameElements/Track/TrackPoints/CrossTrackPoint.cs
@@ -98,7 +98,7 @@ namespace Ichni.RhythmGame
public override void ExecuteBM()
{
- CrossTrackPoint.GenerateElement(elementName, elementGuid, tags, false,
+ matchedElement = CrossTrackPoint.GenerateElement(elementName, elementGuid, tags, false,
GetElement(attachedElementGuid) as ElementFolder, trackSwitch, trackPercent);
}
diff --git a/Assets/Scripts/GameElements/Track/TrackPoints/TrackHeadPoint.cs b/Assets/Scripts/GameElements/Track/TrackPoints/TrackHeadPoint.cs
index b322ccc8..7ccd6566 100644
--- a/Assets/Scripts/GameElements/Track/TrackPoints/TrackHeadPoint.cs
+++ b/Assets/Scripts/GameElements/Track/TrackPoints/TrackHeadPoint.cs
@@ -71,7 +71,7 @@ namespace Ichni.RhythmGame
public override void ExecuteBM()
{
- TrackHeadPoint.GenerateElement(elementName, elementGuid, tags, false,
+ matchedElement = TrackHeadPoint.GenerateElement(elementName, elementGuid, tags, false,
GetElement(attachedElementGuid) as Track);
}
diff --git a/Assets/Scripts/GameElements/Track/TrackPoints/TrackPercentPoint.cs b/Assets/Scripts/GameElements/Track/TrackPoints/TrackPercentPoint.cs
index e2b3f961..ea2730e3 100644
--- a/Assets/Scripts/GameElements/Track/TrackPoints/TrackPercentPoint.cs
+++ b/Assets/Scripts/GameElements/Track/TrackPoints/TrackPercentPoint.cs
@@ -98,7 +98,7 @@ namespace Ichni.RhythmGame
public override void ExecuteBM()
{
- TrackPercentPoint.GenerateElement(elementName, elementGuid, tags, false,
+ matchedElement = TrackPercentPoint.GenerateElement(elementName, elementGuid, tags, false,
GetElement(attachedElementGuid) as Track, trackPercent.ConvertToGameType());
}
diff --git a/Assets/Scripts/GameElements/Track/TrackSubmodules/TrackPathSubmodule.cs b/Assets/Scripts/GameElements/Track/TrackSubmodules/TrackPathSubmodule.cs
index e92e43fd..a854f435 100644
--- a/Assets/Scripts/GameElements/Track/TrackSubmodules/TrackPathSubmodule.cs
+++ b/Assets/Scripts/GameElements/Track/TrackSubmodules/TrackPathSubmodule.cs
@@ -19,7 +19,7 @@ namespace Ichni.RhythmGame
public TrackPathSubmodule(Track track, Track.TrackSpaceType trackSpaceType, Track.TrackSamplingType trackSamplingType, bool isClosed) : base(track)
{
this.path = track.AddComponent();
- track.trackPathSubmodule = this;
+ this.track.trackPathSubmodule = this;
this.pathNodeList = new List();
this.trackSpaceType = trackSpaceType;
this.trackSamplingType = trackSamplingType;
@@ -100,12 +100,14 @@ namespace Ichni.RhythmGame
attachedElement = GameElement_BM.GetElement(attachedElementGuid);
Track track = attachedElement as Track;
track.trackPathSubmodule = new TrackPathSubmodule(track, trackSpaceType, trackSamplingType, isClosed);
+ track.submoduleList.Add(track.trackPathSubmodule);
}
public override void DuplicateBM(GameElement attached)
{
Track track = attachedElement as Track;
track.trackPathSubmodule = new TrackPathSubmodule(track, trackSpaceType, trackSamplingType, isClosed);
+ track.submoduleList.Add(track.trackPathSubmodule);
}
}
diff --git a/Assets/Scripts/GameElements/Track/TrackSubmodules/TrackRendererSubmodule.cs b/Assets/Scripts/GameElements/Track/TrackSubmodules/TrackRendererSubmodule.cs
index b58c1f33..5912a022 100644
--- a/Assets/Scripts/GameElements/Track/TrackSubmodules/TrackRendererSubmodule.cs
+++ b/Assets/Scripts/GameElements/Track/TrackSubmodules/TrackRendererSubmodule.cs
@@ -14,7 +14,6 @@ namespace Ichni.RhythmGame
public TrackRendererSubmodule(Track track) : base(track)
{
- this.track = track;
this.track.trackRendererSubmodule = this;
}
@@ -78,12 +77,14 @@ namespace Ichni.RhythmGame
attachedElement = GameElement_BM.GetElement(attachedElementGuid);
Track track = attachedElement as Track;
track.trackRendererSubmodule = new TrackRendererSubmodule(track);//TODO: Implement Material
+ track.submoduleList.Add(track.trackRendererSubmodule);
}
public override void DuplicateBM(GameElement attached)
{
Track track = attached as Track;
track.trackRendererSubmodule = new TrackRendererSubmodule(track);//TODO: Implement Material
+ track.submoduleList.Add(track.trackRendererSubmodule);
}
}
}
diff --git a/Assets/Scripts/GameElements/Track/TrackSubmodules/TrackTimeSubmodule.cs b/Assets/Scripts/GameElements/Track/TrackSubmodules/TrackTimeSubmodule.cs
index 0f1dc2b8..6d7adfad 100644
--- a/Assets/Scripts/GameElements/Track/TrackSubmodules/TrackTimeSubmodule.cs
+++ b/Assets/Scripts/GameElements/Track/TrackSubmodules/TrackTimeSubmodule.cs
@@ -39,9 +39,7 @@ namespace Ichni.RhythmGame
this.trackTotalTime = trackEndTime - trackStartTime;
this.visibleTrackTimeLength = visibleTrackTimeLength;
this.animationCurveType = animationCurveType;
-
- track.timeDurationSubmodule.startTime = trackStartTime;
- track.timeDurationSubmodule.endTime = trackEndTime + visibleTrackTimeLength;
+ //timeDurationSubmodule 根据下辖Note的时间来设置
}
public void UpdateTrackPart()
@@ -98,12 +96,14 @@ namespace Ichni.RhythmGame
attachedElement = GameElement_BM.GetElement(attachedElementGuid);
Track track = attachedElement as Track;
track.trackTimeSubmodule = new TrackTimeSubmoduleMovable(track, trackStartTime, trackEndTime, visibleTrackTimeLength, animationCurveType);
+ track.submoduleList.Add(track.trackTimeSubmodule);
}
public override void DuplicateBM(GameElement attached)
{
Track track = attached as Track;
track.trackTimeSubmodule = new TrackTimeSubmoduleMovable(track, trackStartTime, trackEndTime, visibleTrackTimeLength, animationCurveType);
+ track.submoduleList.Add(track.trackTimeSubmodule);
}
}
}
@@ -123,9 +123,6 @@ namespace Ichni.RhythmGame
this.animationCurveType = animationCurveType;
this.headPercent = 0;
this.tailPercent = 1;
-
- track.timeDurationSubmodule.startTime = -999;
- track.timeDurationSubmodule.endTime = 999;
//timeDurationSubmodule 根据下辖Note的时间来设置
}
@@ -158,12 +155,14 @@ namespace Ichni.RhythmGame
attachedElement = GameElement_BM.GetElement(attachedElementGuid);
Track track = attachedElement as Track;
track.trackTimeSubmodule = new TrackTimeSubmoduleStatic(track, trackTotalTime, animationCurveType);
+ track.submoduleList.Add(track.trackTimeSubmodule);
}
public override void DuplicateBM(GameElement attached)
{
Track track = attached as Track;
track.trackTimeSubmodule = new TrackTimeSubmoduleStatic(track, trackTotalTime, animationCurveType);
+ track.submoduleList.Add(track.trackTimeSubmodule);
}
}
}
diff --git a/Assets/StreamingAssets/.DS_Store b/Assets/StreamingAssets/.DS_Store
index 9a6292d9..5f58d690 100644
Binary files a/Assets/StreamingAssets/.DS_Store and b/Assets/StreamingAssets/.DS_Store differ
diff --git a/Assets/StreamingAssets/Export.meta b/Assets/StreamingAssets/Export.meta
new file mode 100644
index 00000000..a84d40e3
--- /dev/null
+++ b/Assets/StreamingAssets/Export.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 6bf0ac80c97254139b3fb8162f3cc009
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/StreamingAssets/Export/.DS_Store b/Assets/StreamingAssets/Export/.DS_Store
new file mode 100644
index 00000000..70d45346
Binary files /dev/null and b/Assets/StreamingAssets/Export/.DS_Store differ
diff --git a/Assets/StreamingAssets/Export/TestProject.meta b/Assets/StreamingAssets/Export/TestProject.meta
new file mode 100644
index 00000000..058a4e9b
--- /dev/null
+++ b/Assets/StreamingAssets/Export/TestProject.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 8af4c6a3df20c47c9bccb27a5870319a
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/StreamingAssets/Export/TestProject/BeatMap.bytes b/Assets/StreamingAssets/Export/TestProject/BeatMap.bytes
new file mode 100644
index 00000000..eb70ac98
Binary files /dev/null and b/Assets/StreamingAssets/Export/TestProject/BeatMap.bytes differ
diff --git a/Assets/StreamingAssets/Export/TestProject/BeatMap.bytes.meta b/Assets/StreamingAssets/Export/TestProject/BeatMap.bytes.meta
new file mode 100644
index 00000000..7ea2d29d
--- /dev/null
+++ b/Assets/StreamingAssets/Export/TestProject/BeatMap.bytes.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: eec5bdacfd76c4d6ebab8c9ca581fbcd
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/StreamingAssets/Export/TestProject/CommandScripts.bytes b/Assets/StreamingAssets/Export/TestProject/CommandScripts.bytes
new file mode 100644
index 00000000..a1602a66
Binary files /dev/null and b/Assets/StreamingAssets/Export/TestProject/CommandScripts.bytes differ
diff --git a/Assets/StreamingAssets/Export/TestProject/CommandScripts.bytes.meta b/Assets/StreamingAssets/Export/TestProject/CommandScripts.bytes.meta
new file mode 100644
index 00000000..7c3bac25
--- /dev/null
+++ b/Assets/StreamingAssets/Export/TestProject/CommandScripts.bytes.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: c426a6f61a1b14e158e84fae08b06a0c
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/StreamingAssets/Export/TestProject/ProjectInfo.bytes b/Assets/StreamingAssets/Export/TestProject/ProjectInfo.bytes
new file mode 100644
index 00000000..911094d6
Binary files /dev/null and b/Assets/StreamingAssets/Export/TestProject/ProjectInfo.bytes differ
diff --git a/Assets/StreamingAssets/Export/TestProject/ProjectInfo.bytes.meta b/Assets/StreamingAssets/Export/TestProject/ProjectInfo.bytes.meta
new file mode 100644
index 00000000..a933a99c
--- /dev/null
+++ b/Assets/StreamingAssets/Export/TestProject/ProjectInfo.bytes.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 2c4dd45f084224746b60d7f8f91ceead
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/StreamingAssets/Export/TestProject/SongInfo.bytes b/Assets/StreamingAssets/Export/TestProject/SongInfo.bytes
new file mode 100644
index 00000000..47260b1d
--- /dev/null
+++ b/Assets/StreamingAssets/Export/TestProject/SongInfo.bytes
@@ -0,0 +1,2 @@
+;8Ofy{yy:%R=̵4@:i"M2l0oUܖwTDu} *l05K B_WL/&)e1ӹ^T+ƪ}TCl{dBu/]]F"etY-dX
+vPԋ%"!`x\jH~
\ No newline at end of file
diff --git a/Assets/StreamingAssets/Export/TestProject/SongInfo.bytes.meta b/Assets/StreamingAssets/Export/TestProject/SongInfo.bytes.meta
new file mode 100644
index 00000000..a4defdf8
--- /dev/null
+++ b/Assets/StreamingAssets/Export/TestProject/SongInfo.bytes.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 46b6dd13bde884947a35734b25583f82
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/StreamingAssets/Projects.meta b/Assets/StreamingAssets/Projects.meta
new file mode 100644
index 00000000..d2c07dcd
--- /dev/null
+++ b/Assets/StreamingAssets/Projects.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 5bb973954849b45d193938b9c1c4f04b
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/StreamingAssets/Projects/.DS_Store b/Assets/StreamingAssets/Projects/.DS_Store
new file mode 100644
index 00000000..3d6a590a
Binary files /dev/null and b/Assets/StreamingAssets/Projects/.DS_Store differ
diff --git a/Assets/StreamingAssets/Projects/TestProject.meta b/Assets/StreamingAssets/Projects/TestProject.meta
new file mode 100644
index 00000000..a93e57a5
--- /dev/null
+++ b/Assets/StreamingAssets/Projects/TestProject.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: c12a561465922493f870533cdf6cdb22
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/StreamingAssets/Projects/TestProject/Beatmap.json b/Assets/StreamingAssets/Projects/TestProject/Beatmap.json
new file mode 100644
index 00000000..173835cf
--- /dev/null
+++ b/Assets/StreamingAssets/Projects/TestProject/Beatmap.json
@@ -0,0 +1,491 @@
+{
+ "BeatMap" : {
+ "__type" : "Ichni.RhythmGame.Beatmap.BeatmapContainer_BM,Assembly-CSharp",
+ "value" : {
+ "elementList" : [
+ {
+ "__type" : "Ichni.RhythmGame.Beatmap.ElementFolder_BM,Assembly-CSharp",
+ "elementName" : "Folder",
+ "tags" : [
+
+ ],
+ "elementGuid" : {
+ "value" : "9f5ac639-6cf1-46a4-9aa4-6e992f044425"
+ },
+ "attachedElementGuid" : {
+ "value" : "00000000-0000-0000-0000-000000000000"
+ }
+ },{
+ "__type" : "Ichni.RhythmGame.Beatmap.TransformSubmodule_BM,Assembly-CSharp",
+ "originalPosition" : {
+ "x" : 0,
+ "y" : 0,
+ "z" : 0
+ },
+ "originalEulerAngles" : {
+ "x" : 0,
+ "y" : 0,
+ "z" : 0
+ },
+ "originalScale" : {
+ "x" : 1,
+ "y" : 1,
+ "z" : 1
+ },
+ "attachedElementGuid" : {
+ "value" : "9f5ac639-6cf1-46a4-9aa4-6e992f044425"
+ }
+ },{
+ "__type" : "Ichni.RhythmGame.Beatmap.TimeDurationSubmodule_BM,Assembly-CSharp",
+ "isOverridingDuration" : false,
+ "startTime" : -32767,
+ "endTime" : 32767,
+ "attachedElementGuid" : {
+ "value" : "9f5ac639-6cf1-46a4-9aa4-6e992f044425"
+ }
+ },{
+ "__type" : "Ichni.RhythmGame.Beatmap.Displacement_BM,Assembly-CSharp",
+ "positionX" : {
+ "animatedFloatList" : [
+
+ ]
+ },
+ "positionY" : {
+ "animatedFloatList" : [
+ {
+ "startValue" : 0,
+ "endValue" : 10,
+ "startTime" : 0,
+ "endTime" : 2,
+ "animationCurveType" : 0
+ }
+ ]
+ },
+ "positionZ" : {
+ "animatedFloatList" : [
+
+ ]
+ },
+ "elementName" : "Displacement-0",
+ "tags" : [
+
+ ],
+ "elementGuid" : {
+ "value" : "a44687d5-23cd-48ca-a8e3-f458b424fd96"
+ },
+ "attachedElementGuid" : {
+ "value" : "9f5ac639-6cf1-46a4-9aa4-6e992f044425"
+ }
+ },{
+ "__type" : "Ichni.RhythmGame.Beatmap.TimeDurationSubmodule_BM,Assembly-CSharp",
+ "isOverridingDuration" : false,
+ "startTime" : -32767,
+ "endTime" : 32767,
+ "attachedElementGuid" : {
+ "value" : "a44687d5-23cd-48ca-a8e3-f458b424fd96"
+ }
+ },{
+ "__type" : "Ichni.RhythmGame.Beatmap.Track_BM,Assembly-CSharp",
+ "elementName" : "Track",
+ "tags" : [
+
+ ],
+ "elementGuid" : {
+ "value" : "b3683a28-7806-4123-ad86-c3fbc97bb1a5"
+ },
+ "attachedElementGuid" : {
+ "value" : "9f5ac639-6cf1-46a4-9aa4-6e992f044425"
+ }
+ },{
+ "__type" : "Ichni.RhythmGame.Beatmap.TransformSubmodule_BM,Assembly-CSharp",
+ "originalPosition" : {
+ "x" : 0,
+ "y" : 0,
+ "z" : 0
+ },
+ "originalEulerAngles" : {
+ "x" : 0,
+ "y" : 0,
+ "z" : 0
+ },
+ "originalScale" : {
+ "x" : 1,
+ "y" : 1,
+ "z" : 1
+ },
+ "attachedElementGuid" : {
+ "value" : "b3683a28-7806-4123-ad86-c3fbc97bb1a5"
+ }
+ },{
+ "__type" : "Ichni.RhythmGame.Beatmap.TimeDurationSubmodule_BM,Assembly-CSharp",
+ "isOverridingDuration" : false,
+ "startTime" : 0,
+ "endTime" : 3,
+ "attachedElementGuid" : {
+ "value" : "b3683a28-7806-4123-ad86-c3fbc97bb1a5"
+ }
+ },{
+ "__type" : "Ichni.RhythmGame.Beatmap.TrackPathSubmodule_BM,Assembly-CSharp",
+ "trackSpaceType" : 3,
+ "trackSamplingType" : 0,
+ "isClosed" : false,
+ "attachedElementGuid" : {
+ "value" : "b3683a28-7806-4123-ad86-c3fbc97bb1a5"
+ }
+ },{
+ "__type" : "Ichni.RhythmGame.Beatmap.TrackTimeSubmoduleMovable_BM,Assembly-CSharp",
+ "trackStartTime" : 0,
+ "trackEndTime" : 2,
+ "visibleTrackTimeLength" : 1,
+ "animationCurveType" : 2,
+ "attachedElementGuid" : {
+ "value" : "b3683a28-7806-4123-ad86-c3fbc97bb1a5"
+ }
+ },{
+ "__type" : "Ichni.RhythmGame.Beatmap.TrackPercentPoint_BM,Assembly-CSharp",
+ "trackPercent" : {
+ "animatedFloatList" : [
+ {
+ "startValue" : 0,
+ "endValue" : 1,
+ "startTime" : 0,
+ "endTime" : 2,
+ "animationCurveType" : 2
+ }
+ ]
+ },
+ "elementName" : "TrackPercentPoint-0",
+ "tags" : [
+
+ ],
+ "elementGuid" : {
+ "value" : "7c4e4dc8-a28a-45e1-9bc9-99863e5776f4"
+ },
+ "attachedElementGuid" : {
+ "value" : "b3683a28-7806-4123-ad86-c3fbc97bb1a5"
+ }
+ },{
+ "__type" : "Ichni.RhythmGame.Beatmap.TimeDurationSubmodule_BM,Assembly-CSharp",
+ "isOverridingDuration" : false,
+ "startTime" : -32767,
+ "endTime" : 32767,
+ "attachedElementGuid" : {
+ "value" : "7c4e4dc8-a28a-45e1-9bc9-99863e5776f4"
+ }
+ },{
+ "__type" : "Ichni.RhythmGame.Beatmap.Trail_BM,Assembly-CSharp",
+ "visibleTimeLength" : 5,
+ "renderMaterialName" : "DefaultTrailMaterial",
+ "elementName" : "Trail-0",
+ "tags" : [
+
+ ],
+ "elementGuid" : {
+ "value" : "0668db64-e99d-4ab2-bc03-4014b691719a"
+ },
+ "attachedElementGuid" : {
+ "value" : "7c4e4dc8-a28a-45e1-9bc9-99863e5776f4"
+ }
+ },{
+ "__type" : "Ichni.RhythmGame.Beatmap.TransformSubmodule_BM,Assembly-CSharp",
+ "originalPosition" : {
+ "x" : 0,
+ "y" : 0,
+ "z" : 0
+ },
+ "originalEulerAngles" : {
+ "x" : 0,
+ "y" : 0,
+ "z" : 0
+ },
+ "originalScale" : {
+ "x" : 1,
+ "y" : 1,
+ "z" : 1
+ },
+ "attachedElementGuid" : {
+ "value" : "0668db64-e99d-4ab2-bc03-4014b691719a"
+ }
+ },{
+ "__type" : "Ichni.RhythmGame.Beatmap.PathNode_BM,Assembly-CSharp",
+ "elementName" : "PathNode-0",
+ "tags" : [
+
+ ],
+ "elementGuid" : {
+ "value" : "9b2c57b3-266c-4826-9639-d552b94cb635"
+ },
+ "attachedElementGuid" : {
+ "value" : "b3683a28-7806-4123-ad86-c3fbc97bb1a5"
+ }
+ },{
+ "__type" : "Ichni.RhythmGame.Beatmap.TransformSubmodule_BM,Assembly-CSharp",
+ "originalPosition" : {
+ "x" : -5,
+ "y" : 5,
+ "z" : 10
+ },
+ "originalEulerAngles" : {
+ "x" : 0,
+ "y" : 0,
+ "z" : 1
+ },
+ "originalScale" : {
+ "x" : 1,
+ "y" : 1,
+ "z" : 1
+ },
+ "attachedElementGuid" : {
+ "value" : "9b2c57b3-266c-4826-9639-d552b94cb635"
+ }
+ },{
+ "__type" : "Ichni.RhythmGame.Beatmap.TimeDurationSubmodule_BM,Assembly-CSharp",
+ "isOverridingDuration" : false,
+ "startTime" : -32767,
+ "endTime" : 32767,
+ "attachedElementGuid" : {
+ "value" : "9b2c57b3-266c-4826-9639-d552b94cb635"
+ }
+ },{
+ "__type" : "Ichni.RhythmGame.Beatmap.ColorSubmodule_BM,Assembly-CSharp",
+ "originalBaseColor" : {
+ "r" : 1,
+ "g" : 1,
+ "b" : 1,
+ "a" : 1
+ },
+ "emissionEnabled" : false,
+ "originalEmissionColor" : {
+ "r" : 0,
+ "g" : 0,
+ "b" : 0,
+ "a" : 1
+ },
+ "originalEmissionIntensity" : 0,
+ "attachedElementGuid" : {
+ "value" : "9b2c57b3-266c-4826-9639-d552b94cb635"
+ }
+ },{
+ "__type" : "Ichni.RhythmGame.Beatmap.PathNode_BM,Assembly-CSharp",
+ "elementName" : "PathNode-1",
+ "tags" : [
+
+ ],
+ "elementGuid" : {
+ "value" : "a248aa98-c61c-4bbe-a4f7-f4ccf48c739e"
+ },
+ "attachedElementGuid" : {
+ "value" : "b3683a28-7806-4123-ad86-c3fbc97bb1a5"
+ }
+ },{
+ "__type" : "Ichni.RhythmGame.Beatmap.TransformSubmodule_BM,Assembly-CSharp",
+ "originalPosition" : {
+ "x" : 5,
+ "y" : -5,
+ "z" : 10
+ },
+ "originalEulerAngles" : {
+ "x" : 0,
+ "y" : 0,
+ "z" : 1
+ },
+ "originalScale" : {
+ "x" : 1,
+ "y" : 1,
+ "z" : 1
+ },
+ "attachedElementGuid" : {
+ "value" : "a248aa98-c61c-4bbe-a4f7-f4ccf48c739e"
+ }
+ },{
+ "__type" : "Ichni.RhythmGame.Beatmap.TimeDurationSubmodule_BM,Assembly-CSharp",
+ "isOverridingDuration" : false,
+ "startTime" : -32767,
+ "endTime" : 32767,
+ "attachedElementGuid" : {
+ "value" : "a248aa98-c61c-4bbe-a4f7-f4ccf48c739e"
+ }
+ },{
+ "__type" : "Ichni.RhythmGame.Beatmap.ColorSubmodule_BM,Assembly-CSharp",
+ "originalBaseColor" : {
+ "r" : 1,
+ "g" : 0,
+ "b" : 0,
+ "a" : 1
+ },
+ "emissionEnabled" : false,
+ "originalEmissionColor" : {
+ "r" : 0,
+ "g" : 0,
+ "b" : 0,
+ "a" : 1
+ },
+ "originalEmissionIntensity" : 0,
+ "attachedElementGuid" : {
+ "value" : "a248aa98-c61c-4bbe-a4f7-f4ccf48c739e"
+ }
+ },{
+ "__type" : "Ichni.RhythmGame.Beatmap.Tap_BM,Assembly-CSharp",
+ "exactJudgeTime" : 1,
+ "elementName" : "Note-0",
+ "tags" : [
+
+ ],
+ "elementGuid" : {
+ "value" : "c539835b-0f98-412e-b004-cb3e68842957"
+ },
+ "attachedElementGuid" : {
+ "value" : "b3683a28-7806-4123-ad86-c3fbc97bb1a5"
+ }
+ },{
+ "__type" : "Ichni.RhythmGame.Beatmap.TransformSubmodule_BM,Assembly-CSharp",
+ "originalPosition" : {
+ "x" : 0,
+ "y" : 0,
+ "z" : 0
+ },
+ "originalEulerAngles" : {
+ "x" : 0,
+ "y" : 0,
+ "z" : 0
+ },
+ "originalScale" : {
+ "x" : 1,
+ "y" : 1,
+ "z" : 1
+ },
+ "attachedElementGuid" : {
+ "value" : "c539835b-0f98-412e-b004-cb3e68842957"
+ }
+ },{
+ "__type" : "Ichni.RhythmGame.Beatmap.TimeDurationSubmodule_BM,Assembly-CSharp",
+ "isOverridingDuration" : false,
+ "startTime" : -32767,
+ "endTime" : 32767,
+ "attachedElementGuid" : {
+ "value" : "c539835b-0f98-412e-b004-cb3e68842957"
+ }
+ },{
+ "__type" : "Ichni.RhythmGame.Beatmap.NoteJudgeSubmodule_BM,Assembly-CSharp",
+ "judgeUnitList" : [
+
+ ],
+ "attachedElementGuid" : {
+ "value" : "c539835b-0f98-412e-b004-cb3e68842957"
+ }
+ },{
+ "__type" : "Ichni.RhythmGame.ThemeBundles.Basic.Beatmap.BasicNoteVisual_BM,Assembly-CSharp",
+ "themeBundleName" : "basic",
+ "objectName" : "BasicNoteTap3D",
+ "elementName" : "Note-0-V",
+ "tags" : [
+
+ ],
+ "elementGuid" : {
+ "value" : "4c4650a4-19a8-4715-be40-66d059861376"
+ },
+ "attachedElementGuid" : {
+ "value" : "c539835b-0f98-412e-b004-cb3e68842957"
+ }
+ },{
+ "__type" : "Ichni.RhythmGame.Beatmap.TransformSubmodule_BM,Assembly-CSharp",
+ "originalPosition" : {
+ "x" : 0,
+ "y" : 0,
+ "z" : 0
+ },
+ "originalEulerAngles" : {
+ "x" : 0,
+ "y" : 0,
+ "z" : 0
+ },
+ "originalScale" : {
+ "x" : 1,
+ "y" : 1,
+ "z" : 1
+ },
+ "attachedElementGuid" : {
+ "value" : "4c4650a4-19a8-4715-be40-66d059861376"
+ }
+ },{
+ "__type" : "Ichni.RhythmGame.Beatmap.TimeDurationSubmodule_BM,Assembly-CSharp",
+ "isOverridingDuration" : false,
+ "startTime" : -32767,
+ "endTime" : 32767,
+ "attachedElementGuid" : {
+ "value" : "4c4650a4-19a8-4715-be40-66d059861376"
+ }
+ },{
+ "__type" : "Ichni.RhythmGame.Beatmap.ColorSubmodule_BM,Assembly-CSharp",
+ "originalBaseColor" : {
+ "r" : 1,
+ "g" : 1,
+ "b" : 1,
+ "a" : 1
+ },
+ "emissionEnabled" : false,
+ "originalEmissionColor" : {
+ "r" : 0,
+ "g" : 0,
+ "b" : 0,
+ "a" : 1
+ },
+ "originalEmissionIntensity" : 0,
+ "attachedElementGuid" : {
+ "value" : "4c4650a4-19a8-4715-be40-66d059861376"
+ }
+ },{
+ "__type" : "Ichni.RhythmGame.Beatmap.EffectSubmodule_BM,Assembly-CSharp",
+ "effectCollection" : {"Generate":[
+ {
+ "__type" : "Ichni.RhythmGame.ThemeBundles.Basic.Beatmap.BasicNoteGenerateExpand_BM,Assembly-CSharp",
+ "generateTime" : 1,
+ "attachedNoteID" : {
+ "value" : "c539835b-0f98-412e-b004-cb3e68842957"
+ },
+ "effectTime" : 0.1
+ }
+ ],"GeneralJudge":[
+
+ ],"Perfect":[
+ {
+ "__type" : "Ichni.RhythmGame.ThemeBundles.Basic.Beatmap.BasicNotePerfectBurst_BM,Assembly-CSharp",
+ "attachedNoteID" : {
+ "value" : "c539835b-0f98-412e-b004-cb3e68842957"
+ },
+ "effectTime" : 0
+ }
+ ],"Good":[
+ {
+ "__type" : "Ichni.RhythmGame.ThemeBundles.Basic.Beatmap.BasicNoteGoodBurst_BM,Assembly-CSharp",
+ "attachedNoteID" : {
+ "value" : "c539835b-0f98-412e-b004-cb3e68842957"
+ },
+ "effectTime" : 0
+ }
+ ],"Bad":[
+ {
+ "__type" : "Ichni.RhythmGame.ThemeBundles.Basic.Beatmap.BasicNoteBadExpand_BM,Assembly-CSharp",
+ "attachedNoteID" : {
+ "value" : "c539835b-0f98-412e-b004-cb3e68842957"
+ },
+ "effectTime" : 0
+ }
+ ],"Miss":[
+ {
+ "__type" : "Ichni.RhythmGame.ThemeBundles.Basic.Beatmap.BasicNoteMissPale_BM,Assembly-CSharp",
+ "attachedNoteID" : {
+ "value" : "c539835b-0f98-412e-b004-cb3e68842957"
+ },
+ "effectTime" : 0
+ }
+ ]
+ },
+ "attachedElementGuid" : {
+ "value" : "4c4650a4-19a8-4715-be40-66d059861376"
+ }
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/Assets/StreamingAssets/Projects/TestProject/Beatmap.json.meta b/Assets/StreamingAssets/Projects/TestProject/Beatmap.json.meta
new file mode 100644
index 00000000..def35a05
--- /dev/null
+++ b/Assets/StreamingAssets/Projects/TestProject/Beatmap.json.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 4b0d187dc1adf41248625523720b4b31
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/StreamingAssets/Projects/TestProject/CommandScripts.json b/Assets/StreamingAssets/Projects/TestProject/CommandScripts.json
new file mode 100644
index 00000000..c121f14f
--- /dev/null
+++ b/Assets/StreamingAssets/Projects/TestProject/CommandScripts.json
@@ -0,0 +1,10 @@
+{
+ "CommandScripts" : {
+ "__type" : "Ichni.RhythmGame.Beatmap.CommandScripts_BM,Assembly-CSharp",
+ "value" : {
+ "commandList" : [
+
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/Assets/StreamingAssets/Projects/TestProject/CommandScripts.json.meta b/Assets/StreamingAssets/Projects/TestProject/CommandScripts.json.meta
new file mode 100644
index 00000000..508eb596
--- /dev/null
+++ b/Assets/StreamingAssets/Projects/TestProject/CommandScripts.json.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: b2ba5a56b2c764da1a42f268aaaf87ee
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/StreamingAssets/Projects/TestProject/ProjectInfo.json b/Assets/StreamingAssets/Projects/TestProject/ProjectInfo.json
new file mode 100644
index 00000000..cdeba366
--- /dev/null
+++ b/Assets/StreamingAssets/Projects/TestProject/ProjectInfo.json
@@ -0,0 +1,15 @@
+{
+ "ProjectInformation" : {
+ "__type" : "Ichni.RhythmGame.Beatmap.ProjectInformation_BM,Assembly-CSharp",
+ "value" : {
+ "projectName" : "TestProject",
+ "creatorName" : "Soullies",
+ "editorVersion" : "2.0",
+ "createTime" : "2025-02-08",
+ "lastSaveTime" : "2025-02-08",
+ "selectedThemeBundleList" : [
+
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/Assets/StreamingAssets/Projects/TestProject/ProjectInfo.json.meta b/Assets/StreamingAssets/Projects/TestProject/ProjectInfo.json.meta
new file mode 100644
index 00000000..71a81922
--- /dev/null
+++ b/Assets/StreamingAssets/Projects/TestProject/ProjectInfo.json.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: ab95870cc336840d88efbe9ca542bc43
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/StreamingAssets/Projects/TestProject/SongInfo.json b/Assets/StreamingAssets/Projects/TestProject/SongInfo.json
new file mode 100644
index 00000000..8c9a48e6
--- /dev/null
+++ b/Assets/StreamingAssets/Projects/TestProject/SongInfo.json
@@ -0,0 +1,10 @@
+{
+ "SongInformation" : {
+ "__type" : "Ichni.RhythmGame.Beatmap.SongInformation_BM,Assembly-CSharp",
+ "value" : {
+ "songName" : "TestSong",
+ "bpm" : 120,
+ "delay" : 0
+ }
+ }
+}
\ No newline at end of file
diff --git a/Assets/StreamingAssets/Projects/TestProject/SongInfo.json.meta b/Assets/StreamingAssets/Projects/TestProject/SongInfo.json.meta
new file mode 100644
index 00000000..6a40c5cc
--- /dev/null
+++ b/Assets/StreamingAssets/Projects/TestProject/SongInfo.json.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 5ac12c2352b8d4c378e360f71fa32fe5
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/StreamingAssets/Projects/TestProject/TestSong.wav b/Assets/StreamingAssets/Projects/TestProject/TestSong.wav
new file mode 100644
index 00000000..0eec95b9
Binary files /dev/null and b/Assets/StreamingAssets/Projects/TestProject/TestSong.wav differ
diff --git a/Assets/StreamingAssets/Projects/TestProject/TestSong.wav.meta b/Assets/StreamingAssets/Projects/TestProject/TestSong.wav.meta
new file mode 100644
index 00000000..86f1a92e
--- /dev/null
+++ b/Assets/StreamingAssets/Projects/TestProject/TestSong.wav.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 476e29746d0034885bd480cfb7343b82
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/ThemeBundles/Basic/Scripts/NoteVisual/BasicNoteVisual.cs b/Assets/ThemeBundles/Basic/Scripts/NoteVisual/BasicNoteVisual.cs
index 33d4016f..57458051 100644
--- a/Assets/ThemeBundles/Basic/Scripts/NoteVisual/BasicNoteVisual.cs
+++ b/Assets/ThemeBundles/Basic/Scripts/NoteVisual/BasicNoteVisual.cs
@@ -22,11 +22,11 @@ namespace Ichni.RhythmGame.ThemeBundles.Basic
if (isFirstGenerated)
{
- note.effectSubmodule.effectCollection["Generate"].Add(new BasicNoteGenerateExpand(noteVisual.note));
- note.effectSubmodule.effectCollection["Perfect"].Add(new BasicNotePerfectBurst(noteVisual.note));
- note.effectSubmodule.effectCollection["Good"].Add(new BasicNoteGoodBurst(noteVisual.note));
- note.effectSubmodule.effectCollection["Bad"].Add(new BasicNoteBadExpand(noteVisual.note));
- note.effectSubmodule.effectCollection["Miss"].Add(new BasicNoteMissPale(noteVisual.note));
+ noteVisual.effectSubmodule.effectCollection["Generate"].Add(new BasicNoteGenerateExpand(noteVisual.note));
+ noteVisual.effectSubmodule.effectCollection["Perfect"].Add(new BasicNotePerfectBurst(noteVisual.note));
+ noteVisual.effectSubmodule.effectCollection["Good"].Add(new BasicNoteGoodBurst(noteVisual.note));
+ noteVisual.effectSubmodule.effectCollection["Bad"].Add(new BasicNoteBadExpand(noteVisual.note));
+ noteVisual.effectSubmodule.effectCollection["Miss"].Add(new BasicNoteMissPale(noteVisual.note));
}
return noteVisual;