毫无头绪!

This commit is contained in:
2025-02-28 20:08:00 +08:00
parent 5238cd0e5e
commit 07256af84b
26 changed files with 1115 additions and 485 deletions

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,6 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &1245149450732101372
--- !u!1 &1599667950432594127
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@@ -8,106 +8,9 @@ GameObject:
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2856594644468795856}
- component: {fileID: 1654394841794307147}
- component: {fileID: 6703809492793959247}
- component: {fileID: 2457717289953408719}
m_Layer: 5
m_Name: TimelimeTab
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2856594644468795856
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1245149450732101372}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 5024219022659495223}
- {fileID: 7453192480244305691}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 299.006, y: 25.652}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &1654394841794307147
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1245149450732101372}
m_CullTransparentMesh: 1
--- !u!114 &6703809492793959247
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1245149450732101372}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.30588236}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: 103ba97838400454ab58fa34c508cbbb, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &2457717289953408719
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1245149450732101372}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2508d5efc83bb294aa25a45eb1d2f59d, type: 3}
m_Name:
m_EditorClassIdentifier:
Title: {fileID: 120879144137107311}
connectedGameElement: {fileID: 0}
ElementPrefab: {fileID: 67623903627768998, guid: 43149b488eb37d14185b05d5d2ee0a9a,
type: 3}
GelementPointer: []
MoveArea: {fileID: 7453192480244305691}
timeline: {fileID: 0}
--- !u!1 &1843458013635033358
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5024219022659495223}
- component: {fileID: 6088173518698648135}
- component: {fileID: 120879144137107311}
- component: {fileID: 1420456342479727038}
- component: {fileID: 1082024100994712784}
- component: {fileID: 4785562013637215009}
m_Layer: 5
m_Name: Title
m_TagString: Untagged
@@ -115,40 +18,40 @@ GameObject:
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5024219022659495223
--- !u!224 &1420456342479727038
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1843458013635033358}
m_GameObject: {fileID: 1599667950432594127}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2856594644468795856}
m_Father: {fileID: 1343749204177564612}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -0.0009784698, y: 0.000018597}
m_SizeDelta: {x: 299, y: 25.652}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &6088173518698648135
--- !u!222 &1082024100994712784
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1843458013635033358}
m_GameObject: {fileID: 1599667950432594127}
m_CullTransparentMesh: 1
--- !u!114 &120879144137107311
--- !u!114 &4785562013637215009
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1843458013635033358}
m_GameObject: {fileID: 1599667950432594127}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
@@ -232,7 +135,7 @@ MonoBehaviour:
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &4420271929815980515
--- !u!1 &4649969390340602616
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@@ -240,30 +143,128 @@ GameObject:
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7453192480244305691}
- component: {fileID: 1343749204177564612}
- component: {fileID: 2173865012283855025}
- component: {fileID: 4281488482148338221}
- component: {fileID: 6807394493290851231}
m_Layer: 5
m_Name: GameObject
m_Name: TimelimeTab
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &7453192480244305691
--- !u!224 &1343749204177564612
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4420271929815980515}
m_GameObject: {fileID: 4649969390340602616}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1420456342479727038}
- {fileID: 4573066732392267058}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 299.006, y: 25.652}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &2173865012283855025
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4649969390340602616}
m_CullTransparentMesh: 1
--- !u!114 &4281488482148338221
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4649969390340602616}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.30588236}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: 103ba97838400454ab58fa34c508cbbb, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &6807394493290851231
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4649969390340602616}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2508d5efc83bb294aa25a45eb1d2f59d, type: 3}
m_Name:
m_EditorClassIdentifier:
Title: {fileID: 4785562013637215009}
connectedGameElement: {fileID: 0}
ElementPrefab: {fileID: 67623903627768998, guid: 43149b488eb37d14185b05d5d2ee0a9a,
type: 3}
GelementPointer: []
MoveArea: {fileID: 4573066732392267058}
title: {fileID: 1420456342479727038}
timeline: {fileID: 0}
--- !u!1 &5629927549989199191
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4573066732392267058}
m_Layer: 5
m_Name: MovePoint
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4573066732392267058
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5629927549989199191}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2856594644468795856}
m_Father: {fileID: 1343749204177564612}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMin: {x: 1, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5}
m_AnchoredPosition: {x: 897.3994, y: 0.0000076293945}
m_SizeDelta: {x: 1195.721, y: 25.652}
m_AnchoredPosition: {x: 0, y: 0.0000076293945}
m_SizeDelta: {x: 1494.721, y: 25.652}
m_Pivot: {x: 0.5, y: 0.5}

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 4b8e53d787aedce4c99c84ff45821227
guid: c5aa08cd10a80df4d910e84592e8d29c
PrefabImporter:
externalObjects: {}
userData:

File diff suppressed because one or more lines are too long

View File

@@ -68,7 +68,7 @@ namespace Ichni.Editor
ConsoleUI.SetActive(isHide);
isHide = !isHide;
if (!isHide) StartCoroutine(WindowAnim.ShowPanel(InputCommand.gameObject));
if (!isHide) StartCoroutine(WindowAnim.ShowPanelOnScale(InputCommand.gameObject));
}
if (Keyboard.current.leftCtrlKey.isPressed && Keyboard.current.upArrowKey.wasPressedThisFrame)
{

View File

@@ -26,7 +26,7 @@ namespace Ichni.Editor
unitList = new List<DynamicUICompositeUnit>();
closeButton.onClick.AddListener(Quit);
StartCoroutine(WindowAnim.ShowPanel(gameObject));
StartCoroutine(WindowAnim.ShowPanelOnScale(gameObject));
}
public void RemoveUnit(DynamicUICompositeUnit unit)
@@ -72,7 +72,7 @@ namespace Ichni.Editor
connectedBaseElement.GetType().GetField(parameterName).SetValue(connectedBaseElement, stringList);
};
}
public void SetAsFloatList()
{
void GenerateUnit(float content)
@@ -81,7 +81,7 @@ namespace Ichni.Editor
unitList.Add(unit);
unit.SetUnit(this, content);
}
unitPrefab = EditorManager.instance.basePrefabs.inputFieldUnit;
List<float> list = connectedBaseElement.GetType().GetField(parameterName).GetValue(connectedBaseElement) as List<float>;
foreach (float item in list)
@@ -89,13 +89,13 @@ namespace Ichni.Editor
GenerateUnit(item);
}
addNewUnitButton.GetComponent<RectTransform>().SetAsLastSibling();
addNewUnitButton.onClick.AddListener(() =>
{
GenerateUnit(0);
addNewUnitButton.GetComponent<RectTransform>().SetAsLastSibling();
});
ApplyParameters = () =>
{
List<float> floatList = unitList.Select(unit => (unit as DynamicUIInputFieldUnit).GetValue<float>()).ToList();
@@ -215,23 +215,23 @@ namespace Ichni.Editor
unitList.Add(unit);
unit.SetUnit(this, content);
}
unitPrefab = EditorManager.instance.basePrefabs.customCurveKeyframeUnit;
AnimationCurve curve = connectedBaseElement.GetType().GetField(parameterName).GetValue(connectedBaseElement) as AnimationCurve;
List<Keyframe> keyframes = curve.keys.ToList();
WarpModes warpModes = new WarpModes(curve.preWrapMode, curve.postWrapMode);
//生成warpModes的Unit
DynamicUICustomCurveWrapModeUnit warpModesUnit =
DynamicUICustomCurveWrapModeUnit warpModesUnit =
Instantiate(EditorManager.instance.basePrefabs.customCurveWrapModeUnit, windowRect).GetComponent<DynamicUICustomCurveWrapModeUnit>();
unitList.Add(warpModesUnit);
warpModesUnit.SetUnit(this, warpModes);
foreach (Keyframe keyframe in keyframes)
{
GenerateUnit(keyframe);
}
addNewUnitButton.GetComponent<RectTransform>().SetAsLastSibling();
addNewUnitButton.onClick.AddListener(() =>
@@ -239,14 +239,14 @@ namespace Ichni.Editor
GenerateUnit(new Keyframe(0, 0, 0, 0));
addNewUnitButton.GetComponent<RectTransform>().SetAsLastSibling();
});
ApplyParameters = () =>
{
AnimationCurve newCurve = new AnimationCurve();
DynamicUICustomCurveWrapModeUnit warpModesUnit = unitList[0] as DynamicUICustomCurveWrapModeUnit;
newCurve.preWrapMode = warpModesUnit.GetValue().preWrapMode;
newCurve.postWrapMode = warpModesUnit.GetValue().postWrapMode;
for(int i = 1; i < unitList.Count; i++)
for (int i = 1; i < unitList.Count; i++)
{
DynamicUICustomCurveKeyframeUnit unit = unitList[i] as DynamicUICustomCurveKeyframeUnit;
newCurve.AddKey(unit.GetValue());

View File

@@ -13,7 +13,7 @@ namespace Ichni.Editor
public void Initialize(GameElement gameElement, string title)
{
StartCoroutine(WindowAnim.ShowPanel(gameObject));
StartCoroutine(WindowAnim.ShowPanelOnScale(gameObject));
WindowRect = windowRect;
Containers = new List<DynamicUIContainer>();

View File

@@ -24,7 +24,7 @@ namespace Ichni.Editor
enableButtonGroup.disableButton.gameObject.SetActive(true);
enableButtonGroup.enableButton.gameObject.SetActive(false);
}
public virtual void DisableWindow()
{
gameObject.SetActive(false);

View File

@@ -15,9 +15,9 @@ namespace Ichni.Editor
private void Start()
{
playButton.onClick.AddListener(EditorManager.instance.musicPlayer.PlayMusic);
pauseButton.onClick.AddListener(EditorManager.instance.musicPlayer.PauseMusic);
stopButton.onClick.AddListener(EditorManager.instance.musicPlayer.StopMusic);
// playButton.onClick.AddListener(EditorManager.instance.musicPlayer.PlayMusic);
// pauseButton.onClick.AddListener(EditorManager.instance.musicPlayer.PauseMusic);
// stopButton.onClick.AddListener(EditorManager.instance.musicPlayer.StopMusic);
}
}
}

View File

@@ -14,6 +14,7 @@ public class SubTab : MonoBehaviour
public Button button;
private SongInformation songInformation;
private TimePointerModule timePointerModule;
public TimelineTab timelineTab;
private Timeline timeline;
public float Time;
public void Set(GameElement Objs, float time)
@@ -25,7 +26,7 @@ public class SubTab : MonoBehaviour
connectObj.Add(Objs);
button.GetComponentInChildren<TMP_Text>().text = connectObj.Count().ToString();
transform.position = new Vector3(
Time / timeline.timePerBeat * timePointerModule.timePointerInterval + 165f - timePointerModule.delayDistanceOffset
timelineTab.MoveArea.position.x + (time / timeline.timePerBeat * timePointerModule.timePointerInterval)
, transform.position.y, 0
);
}

View File

@@ -131,7 +131,8 @@ namespace Ichni.Editor
if (!timelineTabList.ContainsKey(i.GetType()))
{
TimelineTab timelineTab = Instantiate(timelineTabPrefab, timelineTabRect.transform);
//timelineTab.timeline = this;
//timelineTab.MoveArea = timePointerModule.timePointerArea;
timelineTab.SetTab(i, i.GetType());
timelineTabList.Add(i.GetType(), timelineTab);

View File

@@ -17,6 +17,7 @@ public class TimelineTab : MonoBehaviour
public List<GameElement> GelementPointer;
public RectTransform MoveArea;
public RectTransform title;
public Dictionary<float, SubTab> SubTabs = new();
public Timeline timeline;
@@ -40,7 +41,7 @@ public class TimelineTab : MonoBehaviour
else
{
SubTab i = Instantiate(ElementPrefab, MoveArea.transform);
i.timelineTab = this;
i.Set(gameElement, Judgetime);
SubTabs.Add(Judgetime, i);
}
@@ -53,7 +54,7 @@ public class TimelineTab : MonoBehaviour
public void Update()
{
MoveArea.position = new Vector3(
timeline.timePointerModule.timePointerArea.position.x,
-(timeline.songTime / timeline.timePerBeat) * timeline.timePointerModule.timePointerInterval,
MoveArea.position.y,
MoveArea.position.z);
}

View File

@@ -4,7 +4,7 @@ using UnityEngine;
public static class WindowAnim
{
public static IEnumerator ShowPanel(GameObject gameObject)
public static IEnumerator ShowPanelOnScale(GameObject gameObject)
{
AnimationCurve animationCurve = new AnimationCurve(
new Keyframe(0, 0),
@@ -22,7 +22,7 @@ public static class WindowAnim
}
gameObject.transform.localScale = Vector3.one;
}
public static IEnumerator HidePanel(GameObject gameObject, bool DestoryOrNot = false)
public static IEnumerator HidePanelOnscale(GameObject gameObject, bool DestoryOrNot = false)
{
AnimationCurve animationCurve = new AnimationCurve(
new Keyframe(0, 0),
@@ -42,4 +42,5 @@ public static class WindowAnim
}
}

View File

@@ -9,7 +9,7 @@ namespace Ichni.RhythmGame
public abstract class SubstantialObject : GameElement, IHaveTransformSubmodule, IHaveTimeDurationSubmodule, IHaveColorSubmodule
{
public string themeBundleName, objectName;
public TransformSubmodule transformSubmodule { get; set; }
public TimeDurationSubmodule timeDurationSubmodule { get; set; }
public ColorSubmodule colorSubmodule { get; set; }
@@ -18,7 +18,11 @@ namespace Ichni.RhythmGame
public static SubstantialObject GenerateElement(string elementName, Guid id, List<string> tags, bool isFirstGenerated,
string themeBundleName, string objectName, GameElement parentElement)
{
GameObject themeBundleObject = ThemeBundleManager.instance.GetObject<GameObject>(themeBundleName, objectName);
SubstantialObject substantialObject = Instantiate(themeBundleObject, parentElement.transform).GetComponent<SubstantialObject>();
substantialObject.Initialize(elementName, id, tags, isFirstGenerated, parentElement);
substantialObject.themeBundleName = themeBundleName;
@@ -34,7 +38,7 @@ namespace Ichni.RhythmGame
/// </summary>
public virtual void FirstSetUpObject(bool isFirstGenerated)
{
}
protected override void SetDefaultSubmodules()
@@ -42,7 +46,7 @@ namespace Ichni.RhythmGame
transformSubmodule = new TransformSubmodule(this);
timeDurationSubmodule = new TimeDurationSubmodule(this);
colorSubmodule = new ColorSubmodule(this);
submoduleList.Add(transformSubmodule);
submoduleList.Add(timeDurationSubmodule);
submoduleList.Add(colorSubmodule);
@@ -58,7 +62,7 @@ namespace Ichni.RhythmGame
public SubstantialObject_BM()
{
}
public SubstantialObject_BM(string elementName, Guid elementGuid, List<string> tags, GameElement_BM attachedElement,

View File

@@ -1,6 +1,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using Dreamteck.Splines.Primitives;
using Ichni.Editor;
using Ichni.RhythmGame;
using Ichni.RhythmGame.Beatmap;
@@ -13,7 +14,7 @@ namespace Ichni
public class EditorManager : GameElement
{
public static EditorManager instance;
public ProjectManager projectManager;
public MusicPlayer musicPlayer;
public EditorUIManager uiManager;
@@ -22,14 +23,14 @@ namespace Ichni
public BackgroundController backgroundController;
public CameraManager cameraManager;
public PostProcessingManager postProcessingManager;
public Timeline timeline;
public ProjectInformation projectInformation;
public SongInformation songInformation;
public BeatmapContainer beatmapContainer;
public CommandScripts commandScripts;
public NoteBase.NoteJudgeType currentJudgeType;
public BasePrefabsCollection basePrefabs;
@@ -38,7 +39,7 @@ namespace Ichni
instance = this;
projectManager = new ProjectManager();
operationManager = new OperationManager();
if (!ES3.FileExists(Application.streamingAssetsPath + "/EditorSettings.es3"))
{
editorSettings = new EditorSettings(300, 100, 100);
@@ -55,8 +56,8 @@ namespace Ichni
this.elementName = "EditorManager";
this.elementGuid = Guid.Empty;
uiManager.hierarchy.GenerateTab(this, null);
projectManager.loadManager.Load("TestProject");
StartCoroutine(projectManager.loadManager.Load("TestProject"));
musicPlayer.audioSource.clip = songInformation.song;
beatmapContainer.gameElementList.ForEach(gameElement =>
@@ -69,14 +70,14 @@ namespace Ichni
public override void SetUpInspector()
{
IHaveInspection inspector = uiManager.inspector;
var container = inspector.GenerateContainer("Editor Manager");
var judgeTypeDropdown = inspector.GenerateDropdown(this, container, "Judge Type",
typeof(NoteBase.NoteJudgeType), nameof(currentJudgeType));
var generateFolderButton =
inspector.GenerateButton(this, container, "Generate Folder",
() => ElementFolder.GenerateElement("Folder", Guid.NewGuid(),
() => ElementFolder.GenerateElement("Folder", Guid.NewGuid(),
new List<string>(), true, null));
var generateBackgroundSetterButton =
@@ -84,7 +85,7 @@ namespace Ichni
() => BackgroundSetter.GenerateElement("Background Setter", Guid.NewGuid(),
new List<string>(), true, null, false,
"basic", "Skybox", "Background"));
projectInformation.SetUpInspector();
songInformation.SetUpInspector();
cameraManager.SetUpInspector();

View File

@@ -21,13 +21,14 @@ namespace Ichni.Editor
public void PlayMusic()
{
isPlaying = !isPlaying;
Trail.SetAllTrails(true, false);
EditorManager.instance.songInformation.songTime = audioSource.time;
if(isPlaying)audioSource.Play();
else audioSource.Pause();
if (isPlaying) audioSource.Play();
else audioSource.Pause();
}
public void PauseMusic()
{
isPlaying = false;
@@ -35,7 +36,7 @@ namespace Ichni.Editor
EditorManager.instance.songInformation.songTime = audioSource.time;
audioSource.Pause();
}
public void StopMusic()
{
isPlaying = false;

View File

@@ -24,11 +24,11 @@ namespace Ichni
encryptionPassword = "Soullies515",
format = ES3.Format.JSON,
};
public SaveManager saveManager;
public LoadManager loadManager;
public ExportManager exportManager;
public ProjectManager()
{
saveManager = new SaveManager();
@@ -38,12 +38,12 @@ namespace Ichni
public void GenerateProject(string projectName)
{
EditorManager.instance.projectInformation = new ProjectInformation(projectName, "Soullies",
EditorManager.instance.projectInformation = new ProjectInformation(projectName, "Soullies",
"2.0", "2025-02-08", "2025-02-08", new List<string>());
EditorManager.instance.songInformation = new SongInformation("TestSong", 120, 0);
EditorManager.instance.beatmapContainer = new BeatmapContainer();
EditorManager.instance.commandScripts = new CommandScripts(new List<string>());
//Create project folder
if (!System.IO.Directory.Exists(EditorManager.instance.projectInformation.projectPath))
{
@@ -64,12 +64,12 @@ namespace Ichni
string commandScriptsPath = exportPath + "/CommandScripts.bytes";
LogWindow.Log("Start Exporting...");
ExportProjectInfo(projectInfoPath);
ExportSongInfo(songInfoPath);
ExportBeatMap(beatmapPath);
ExportCommandScripts(commandScriptsPath);
LogWindow.Log("Export Complete", Color.green);
}
@@ -107,12 +107,12 @@ namespace Ichni
public void Save()
{
LogWindow.Log("Start Saving...");
SaveProjectInfo();
SaveSongInfo();
SaveBeatMap();
SaveCommandScripts();
LogWindow.Log("Save Complete", Color.green);
}
@@ -147,16 +147,19 @@ namespace Ichni
public class LoadManager
{
public void Load(string projectName)
public IEnumerator Load(string projectName)
{
LoadProjectInfo(projectName);
LoadSongInfo();
LoadBeatMap();
LoadCommandScripts();
while (ThemeBundleManager.instance.waitingBundleAmount != 0)
{
yield return new WaitForEndOfFrame();
}
LoadBeatMap();
LogWindow.Log("Load Complete", Color.green);
}
private void LoadProjectInfo(string projectName)
{
string projectInfoPath = Application.streamingAssetsPath + "/Projects/" + projectName + "/ProjectInfo.json";

View File

@@ -16,29 +16,51 @@ namespace Ichni
public List<ThemeBundle> loadedThemeBundleList;
public int waitingBundleAmount;
private void Awake()
{
instance = this;
loadedThemeBundleList = new List<ThemeBundle>();
AssetBundle.UnloadAllAssetBundles(true);
LoadAllThemeBundlesAbstract();
//DontDestroyOnLoad(gameObject);
LoadThemeBundle("basic");
LoadThemeBundle("departure_to_multiverse");
LoadThemeBundle("basic");
}
public bool TryGetThemeBundle(string themeBundleName, out ThemeBundle themeBundle)
{
themeBundle = loadedThemeBundleList.Find(bundle => bundle.themeBundleName == themeBundleName);
return themeBundle != null;
}
public T GetObject<T>(string themeBundleName, string objectName) where T : class
private IEnumerator WaitAndLoad()
{
return loadedThemeBundleList.Find(bundle => bundle.themeBundleName == themeBundleName)?.GetObject<T>(objectName);
while (waitingBundleAmount != 0)
{
yield return null;
}
}
public T GetObject<T>(string themeBundleName, string objectName) where T : class//?
{
print(themeBundleName + " " + objectName);
var i = loadedThemeBundleList.Find(bundle => bundle.themeBundleName == themeBundleName)?.GetObject<T>(objectName);
if (i == null)
{
Debug.LogError("Object not found");
return loadedThemeBundleList.Find(bundle => bundle.themeBundleName == "basic")?.GetObject<T>("BasicNoteTap3D");
}
else
return i;
}
public void LoadThemeBundles(List<string> list)
@@ -77,22 +99,23 @@ namespace Ichni
waitingBundleAmount++;
StartCoroutine(LoadThemeBundleCoroutine(themeBundleName));
}
IEnumerator LoadThemeBundleCoroutine(string themeBundleName)
{
string uri = "";
if (Application.platform == RuntimePlatform.WindowsEditor ||
Application.platform == RuntimePlatform.WindowsPlayer)
{
uri = Application.streamingAssetsPath + "/ThemeBundles/Windows64/" + themeBundleName;
}else if (Application.platform == RuntimePlatform.OSXEditor ||
}
else if (Application.platform == RuntimePlatform.OSXEditor ||
Application.platform == RuntimePlatform.OSXPlayer)
{
uri = Application.streamingAssetsPath + "/ThemeBundles/OSX/" + themeBundleName;
}
UnityWebRequest request = UnityWebRequestAssetBundle.GetAssetBundle(uri, 0);
yield return request.SendWebRequest();
AssetBundle bundle = AssetBundle.LoadFromFile(uri);
@@ -120,6 +143,7 @@ namespace Ichni
yield return new WaitForEndOfFrame();
waitingBundleAmount--;
print(themeBundleName + " Done!");
}
}
@@ -231,7 +255,7 @@ namespace Ichni
}
}
}
return default(T);
}
}

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 2da3449f887db034ea33aac005207300
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 86cf4596ac66f9a44be65f5c02208948
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,5 +1,5 @@
ManifestFileVersion: 0
CRC: 3233006006
CRC: 2138662588
AssetBundleManifest:
AssetBundleInfos:
Info_0:

View File

@@ -1,15 +1,15 @@
ManifestFileVersion: 0
CRC: 165692382
CRC: 1668239605
Hashes:
AssetFileHash:
serializedVersion: 2
Hash: 07993068db883847c1f47aa90b0f1fd6
Hash: 61e09aee63487554afc80c729f37c5e5
TypeTreeHash:
serializedVersion: 2
Hash: 625a8bf3466c7efbf901d88367e54446
Hash: 7c8fba77ff779a35ad42450f8316ace8
IncrementalBuildHash:
serializedVersion: 2
Hash: 07993068db883847c1f47aa90b0f1fd6
Hash: 61e09aee63487554afc80c729f37c5e5
HashAppended: 0
ClassTypes:
- Class: 1
@@ -20,6 +20,8 @@ ClassTypes:
Script: {instanceID: 0}
- Class: 23
Script: {instanceID: 0}
- Class: 28
Script: {instanceID: 0}
- Class: 33
Script: {instanceID: 0}
- Class: 43
@@ -32,6 +34,10 @@ ClassTypes:
Script: {fileID: 11500000, guid: ea0771a0c87f746769a9ffd7286a0665, type: 3}
- Class: 115
Script: {instanceID: 0}
- Class: 198
Script: {instanceID: 0}
- Class: 199
Script: {instanceID: 0}
SerializeReferenceClassIdentifiers:
- AssemblyName: Sirenix.Serialization
ClassName: Sirenix.Serialization.SerializationData

View File

@@ -8,19 +8,19 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
{
public partial class DTMNoteVisual : NoteVisualBase
{
public static DTMNoteVisual GenerateElement(string elementName, Guid id, List<string> tags,
public static new DTMNoteVisual GenerateElement(string elementName, Guid id, List<string> tags,
bool isFirstGenerated, string themeBundleName, string objectName, GameElement parentElement)
{
DTMNoteVisual noteVisual = SubstantialObject.GenerateElement(elementName, id, tags,
isFirstGenerated, themeBundleName, objectName, parentElement).GetComponent<DTMNoteVisual>();
return noteVisual;
}
public override void FirstSetUpObject(bool isFirstGenerated)
{
NoteBase note = parentElement as NoteBase;
if(note == null) throw new System.Exception("NoteVisual只能生成在Note下。");
if (note == null) throw new System.Exception("NoteVisual只能生成在Note下。");
this.note = note;
note.noteVisual = this;
@@ -37,8 +37,8 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
public partial class DTMNoteVisual
{
public override void SaveBM()
{
matchedBM = new Beatmap.DTMNoteVisual_BM(elementName, elementGuid, tags,