This commit is contained in:
SoulliesOfficial
2025-04-18 22:34:55 -04:00
parent 97427b0bf3
commit d7ce55cd04
21 changed files with 335 additions and 1590 deletions

View File

@@ -53,8 +53,7 @@ public class TimelineTab : MonoBehaviour
else if (gameElement is NoteBase)
{
float Judgetime = ((NoteBase)gameElement).exactJudgeTime;
print(Judgetime);
if (SubTabs.ContainsKey(Judgetime))
{
SubTabs[Judgetime].Set(gameElement, Judgetime);

View File

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

View File

@@ -15,10 +15,9 @@ namespace Ichni.RhythmGame
(attachedGameElement).gameObject.layer = LayerMask.NameToLayer("Selectable");
this.elementToSelect = elementToSelect == null ? attachedGameElement : elementToSelect;
}
public void SelectGameElement()
{
Debug.Log(elementToSelect);
EditorManager.instance.operationManager.ClearSelectedElements();
EditorManager.instance.operationManager.AddSelectElement(elementToSelect);
EditorManager.instance.uiManager.inspector.SetInspector(elementToSelect);

View File

@@ -0,0 +1,11 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace Ichni.RhythmGame
{
public class SelectionConnector : MonoBehaviour
{
public GameElement connectedGameElement;
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: b37c44f04f3075045aef6be2c0506551
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -61,7 +61,7 @@ namespace Ichni.RhythmGame
inspector.GenerateCompositeParameterWindow(this, "Intensity Curve", nameof(intensityCurve)).SetAsCustomCurve();
});
var colorSettings = container.GenerateSubcontainer(3);
var colorSettings = container.GenerateSubcontainer(1);
var colorField = inspector.GenerateBaseColorPicker(this, colorSettings, "Color", nameof(color));
}
}

View File

@@ -242,8 +242,8 @@ namespace Ichni.Editor
Ray ray = EditorManager.instance.cameraManager.currentCamera.ScreenPointToRay(mousePosition);
if (Physics.Raycast(ray, out RaycastHit hit, float.MaxValue, LayerMask.GetMask("Selectable")))
{
GameElement clickedElement = hit.collider.GetComponent<GameElement>();//TODO: 对于Hold这种复杂的元素需要使用连接脚本进行获取
(clickedElement as IHaveSelectSubmodule)?.selectSubmodule.SelectGameElement();
SelectionConnector connector = hit.collider.GetComponent<SelectionConnector>();//TODO: 对于Hold这种复杂的元素需要使用连接脚本进行获取
(connector.connectedGameElement as IHaveSelectSubmodule)?.selectSubmodule.SelectGameElement();
}
}
}

View File

@@ -41,7 +41,7 @@ namespace Ichni.Editor
.AddListenerFunction(() => sceneCamera.orthographicSize = orthographicSize);
//摄像机位置与旋转设置
var transformSettings = container.GenerateSubcontainer(3);
var transformSettings = container.GenerateSubcontainer(1);
var positionInputFields =
inspector.GenerateVector3InputField(this, transformSettings, "Position", nameof(cameraPosition), true)
.AddListenerFunction(() => sceneCamera.transform.position = cameraPosition);