Signed-off-by: TRAfoer <lhf190@outlook.com>
This commit is contained in:
@@ -38,6 +38,8 @@ namespace Ichni.Editor
|
||||
clipSaveButton.onClick.AddListener(GenerateSaveClipWindow);
|
||||
clipLoadButton.onClick.AddListener(GenerateLoadClipWindow);
|
||||
beatmapToolsButton.onClick.AddListener(GenerateBeatmapToolsWindow);
|
||||
//songInfoButton.onClick.AddListener(已经在songinfo好了);
|
||||
//projectInfoButton.onClick.AddListener(已经在projectinfo好了);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace Ichni.RhythmGame
|
||||
}
|
||||
protected override void UpdateAnimation(float songTime)
|
||||
{
|
||||
if (lookAtObject is null) return;
|
||||
if (lookAtObject == null) return;
|
||||
|
||||
enabling.UpdateFlexibleBool(songTime);
|
||||
targetTransformSubmodule.eulerAnglesOffsetLock = enabling.value;
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Ichni.Editor;
|
||||
using Ichni.RhythmGame.Beatmap;
|
||||
using UniRx;
|
||||
using UnityEngine;
|
||||
@@ -11,10 +13,10 @@ namespace Ichni.RhythmGame
|
||||
public class BeatmapContainer : IBaseElement
|
||||
{
|
||||
public List<GameElement> gameElementList;
|
||||
|
||||
|
||||
[NonSerialized]
|
||||
public List<UnityAction> lowPriorityActions;
|
||||
|
||||
|
||||
public BaseElement_BM matchedBM { get; set; }
|
||||
|
||||
public BeatmapContainer()
|
||||
@@ -23,7 +25,7 @@ namespace Ichni.RhythmGame
|
||||
lowPriorityActions = new List<UnityAction>();
|
||||
Observable.EveryUpdate().Subscribe(_ => ExecuteLowPriorityActions());
|
||||
}
|
||||
|
||||
|
||||
public void ExecuteLowPriorityActions()
|
||||
{
|
||||
if (lowPriorityActions.Count > 0)
|
||||
@@ -36,11 +38,12 @@ namespace Ichni.RhythmGame
|
||||
public void SaveBM()
|
||||
{
|
||||
matchedBM = new BeatmapContainer_BM(gameElementList);
|
||||
|
||||
}
|
||||
|
||||
public void SetUpInspector()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
return;
|
||||
}
|
||||
|
||||
public void Refresh()
|
||||
@@ -54,7 +57,7 @@ namespace Ichni.RhythmGame
|
||||
public partial class BeatmapContainer_BM : BaseElement_BM
|
||||
{
|
||||
public List<BaseElement_BM> elementList;
|
||||
|
||||
|
||||
|
||||
public BeatmapContainer_BM()
|
||||
{
|
||||
@@ -64,7 +67,7 @@ namespace Ichni.RhythmGame
|
||||
public BeatmapContainer_BM(List<GameElement> gameElementList)
|
||||
{
|
||||
elementList = new List<BaseElement_BM>();
|
||||
|
||||
|
||||
gameElementList.ForEach(e =>
|
||||
{
|
||||
e.SaveBM();
|
||||
@@ -90,7 +93,7 @@ namespace Ichni.RhythmGame
|
||||
EditorManager.instance.beatmapContainer = new BeatmapContainer();
|
||||
EditorManager.instance.beatmapContainer.matchedBM = this;
|
||||
GameElement_BM.identifier.Clear();
|
||||
|
||||
|
||||
elementList.ForEach(element =>
|
||||
{
|
||||
//#if UNITY_EDITOR
|
||||
@@ -139,8 +142,9 @@ namespace Ichni.RhythmGame
|
||||
public static readonly List<Type> LowPriorityGameElementTypes = new()
|
||||
{
|
||||
typeof(NoteJudgeSubmodule_BM),
|
||||
typeof(LookAt_BM),
|
||||
};
|
||||
|
||||
|
||||
public static readonly List<Type> LowPriorityDataTypes = new()
|
||||
{
|
||||
typeof(EnableControlEffect_BM),
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Ichni.Editor;
|
||||
using Ichni.RhythmGame.Beatmap;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -8,7 +9,7 @@ namespace Ichni.RhythmGame
|
||||
public class ProjectInformation : IBaseElement
|
||||
{
|
||||
public static string EditorVersion = "0.1.0";
|
||||
|
||||
|
||||
public string projectName;
|
||||
public string creatorName;
|
||||
public string editorVersion;
|
||||
@@ -18,7 +19,7 @@ namespace Ichni.RhythmGame
|
||||
|
||||
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";
|
||||
@@ -36,17 +37,32 @@ namespace Ichni.RhythmGame
|
||||
this.selectedThemeBundleList = selectedThemeBundleList;
|
||||
|
||||
projectPath = Application.streamingAssetsPath + "/Projects/" + projectName;
|
||||
EditorManager.instance.uiManager.mainPage.toolBar.projectInfoButton.onClick.AddListener(() =>
|
||||
{
|
||||
EditorManager.instance.uiManager.inspector.ClearInspector();
|
||||
SetUpInspector();
|
||||
});
|
||||
}
|
||||
|
||||
public void SaveBM()
|
||||
{
|
||||
matchedBM = new ProjectInformation_BM(projectName, creatorName, "0.1.0",
|
||||
matchedBM = new ProjectInformation_BM(projectName, creatorName, "0.1.0",
|
||||
createTime, lastSaveTime, selectedThemeBundleList);
|
||||
}
|
||||
|
||||
public void SetUpInspector()
|
||||
{
|
||||
|
||||
|
||||
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
|
||||
Inspector inspectorMain = EditorManager.instance.uiManager.inspector;
|
||||
var container = inspector.GenerateContainer("Beatmap Container");
|
||||
var sub = container.GenerateSubcontainer(2);
|
||||
inspector.GenerateHintText(this, sub, projectName);
|
||||
inspector.GenerateHintText(this, sub, creatorName);
|
||||
inspector.GenerateHintText(this, sub, editorVersion);
|
||||
inspector.GenerateHintText(this, sub, createTime);
|
||||
inspector.GenerateHintText(this, sub, lastSaveTime);
|
||||
inspector.GenerateHintText(this, sub, projectPath);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,10 +92,10 @@ namespace Ichni.RhythmGame
|
||||
this.lastSaveTime = lastSaveTime;
|
||||
this.selectedThemeBundleList = selectedThemeBundleList;
|
||||
}
|
||||
|
||||
|
||||
public override void ExecuteBM()
|
||||
{
|
||||
EditorManager.instance.projectInformation = new ProjectInformation(projectName,
|
||||
EditorManager.instance.projectInformation = new ProjectInformation(projectName,
|
||||
creatorName, editorVersion, createTime, lastSaveTime, selectedThemeBundleList);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,6 +95,8 @@ namespace Ichni.RhythmGame
|
||||
p.AddListenerFunction(action);
|
||||
o.AddListenerFunction(action);
|
||||
c.AddListenerFunction(action);
|
||||
var info = a.GenerateSubcontainer(1);
|
||||
inspector.GenerateHintText(this, info, songName);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user