体验优化

Signed-off-by: TRAfoer <lhf190@outlook.com>
This commit is contained in:
2025-07-19 13:52:42 +08:00
parent f59aea9bf5
commit eeecba5a3e
16 changed files with 16421 additions and 17768 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 6dbdd314784e80440b48088e6357c1ef
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because one or more lines are too long

View File

@@ -1,5 +1,77 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &2536824668363275674
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6262915298703327334}
- component: {fileID: 2505628739025920191}
- component: {fileID: 1444057869106061676}
m_Layer: 5
m_Name: RawImage
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6262915298703327334
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2536824668363275674}
m_LocalRotation: {x: 0, y: 0, z: 1, w: 0}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2006873362860915601}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 180}
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 0, y: 0.5}
m_AnchoredPosition: {x: 10, y: 5}
m_SizeDelta: {x: 0, y: 10}
m_Pivot: {x: 0, y: 0}
--- !u!222 &2505628739025920191
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2536824668363275674}
m_CullTransparentMesh: 1
--- !u!114 &1444057869106061676
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2536824668363275674}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 0
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Texture: {fileID: 2800000, guid: aa1d42dc6ff3e894da2208c6929d2165, type: 3}
m_UVRect:
serializedVersion: 2
x: 1
y: 1
width: 1
height: 1
--- !u!1 &5062281803715349131
GameObject:
m_ObjectHideFlags: 0
@@ -12,6 +84,7 @@ GameObject:
- component: {fileID: 6048834329859472097}
- component: {fileID: 1508165143461133131}
- component: {fileID: 5420725020538884635}
- component: {fileID: 7429628377528645100}
m_Layer: 5
m_Name: Button
m_TagString: Untagged
@@ -121,6 +194,18 @@ MonoBehaviour:
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!210 &7429628377528645100
SortingGroup:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5062281803715349131}
m_Enabled: 1
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 9999
m_SortAtRoot: 0
--- !u!1 &5293594113484323338
GameObject:
m_ObjectHideFlags: 0
@@ -152,6 +237,7 @@ RectTransform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 6262915298703327334}
- {fileID: 1701355791749099970}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@@ -175,7 +261,7 @@ MonoBehaviour:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5293594113484323338}
m_Enabled: 1
m_Enabled: 0
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
@@ -212,7 +298,9 @@ MonoBehaviour:
m_EditorClassIdentifier:
button: {fileID: 5420725020538884635}
father: {fileID: 0}
Time: 0
ProgressImage: {fileID: 1444057869106061676}
anotherTab: {fileID: 0}
time: 0
--- !u!1 &9106615841642673279
GameObject:
m_ObjectHideFlags: 0

File diff suppressed because one or more lines are too long

View File

@@ -134,7 +134,7 @@ namespace Ichni.Editor
}
EditorManager.instance.uiManager.inspector.SetInspector(connectedGameElement);
EditorManager.instance.timeline.SetTimeLine(connectedGameElement);
}
public IEnumerator ienumerator = null;
public void ExpandOrFold()

View File

@@ -13,6 +13,7 @@ namespace Ichni.Editor
{
public GameElement connectedGameElement;
public Canvas inspectorCanvas;
public Canvas mainCanvas;
public RectTransform inspectorRect;
public RectTransform WindowRect { get; set; }
@@ -37,6 +38,7 @@ namespace Ichni.Editor
ClearInspector();
connectedGameElement = gameElement;
connectedGameElement.SetUpInspector();
EditorManager.instance.uiManager.timeline.SetTimeLine(gameElement);
}
public void ClearInspector()

View File

@@ -17,9 +17,11 @@ public class SubTab : MonoBehaviour
private TimePointerModule timePointerModule;
public TimelineTab father;
private Timeline timeline;
public RawImage ProgressImage;
public RectTransform anotherTab;//Last
public float time;
public void Set(IBaseElement Objs, float time)
public void Set(IBaseElement Objs, float time, RectTransform anotherTab = null)
{
songInformation = EditorManager.instance.songInformation;
timePointerModule = EditorManager.instance.uiManager.timeline.timePointerModule;
@@ -27,10 +29,19 @@ public class SubTab : MonoBehaviour
this.time = time;
connectObj.Add(Objs);
button.GetComponentInChildren<TMP_Text>().text = connectObj.Count().ToString();
if (anotherTab != null)
{
this.anotherTab = anotherTab;
ProgressImage.GetComponent<RectTransform>().sizeDelta = new Vector2((time - anotherTab.GetComponent<SubTab>().time) / timeline.timePerBeat * timePointerModule.timePointerInterval, ProgressImage.GetComponent<RectTransform>().sizeDelta.y);
button.GetComponentInChildren<TMP_Text>().text = "E";
anotherTab.GetComponent<SubTab>().button.GetComponentInChildren<TMP_Text>().text = "S";
}
transform.localPosition = new Vector3((this.time / timeline.timePerBeat * timePointerModule.timePointerInterval),
-(42.5f + ((father.TabIndex + 1) * 25)), 0);
//transform.position = new Vector3(transform.position.x, father.Title.transform.position.y + 12, 0);
button.onClick.AddListener(GetClick);
}
void Update()
{
@@ -39,17 +50,17 @@ public class SubTab : MonoBehaviour
transform.localScale = new Vector3(time > songInformation.songTime ? 1f : 0f, 1f, 1f);
}
}
// public void GetClick()//?
// {
// if (connectObj[0] is GameElement)
// {
// EditorManager.instance.uiManager.hierarchy.FindTab((GameElement)connectObj[0]);
// }
// else
// {
// EditorManager.instance.uiManager.hierarchy.FindTab(((SubmoduleBase)connectObj[0]).attachedGameElement);
// }
// }
public void GetClick()//?
{
if (connectObj[0] is GameElement)
{
EditorManager.instance.uiManager.hierarchy.FindTab((GameElement)connectObj[0]);
}
else
{
EditorManager.instance.uiManager.hierarchy.FindTab(((SubmoduleBase)connectObj[0]).attachedGameElement);
}
}
}

View File

@@ -44,6 +44,17 @@ namespace Ichni.Editor
timePointer.index = i;
timePointer.gameObject.SetActive(false);
}
// for (int i = -1; i > -songInformation.delay / timeline.timePerBeat; i--)
// {
// TimePointer timePointer = Instantiate(timePointerPrefab, timePointerContainer).GetComponent<TimePointer>();
// timePointerList.Insert(0, timePointer);
// timePointer.intervalUnitText.text = (i * timeline.timePerBeat).ToString("F3");
// timePointer.GetComponent<RectTransform>().localPosition = new Vector3(i * timePointerInterval, 0f, 0f);
// timePointer.index = i;
// timePointer.gameObject.SetActive(false);
// }
}
public void SortPos()
{

View File

@@ -32,6 +32,7 @@ namespace Ichni.Editor
public TMP_InputField BeatField;
public RectTransform GetinputArea;
public void Update()
{
if (EditorManager.instance.musicPlayer.isPlaying) UpdateTime();
@@ -91,7 +92,7 @@ namespace Ichni.Editor
BeatField.text = songBeat.ToString("F2");
}
private Tweener _activeTweener; // 保存当前动画的引用
private Tweener _activeTweener = null; // 保存当前动画的引用
public void SetTime(string time)
{
EditorManager.instance.musicPlayer.PauseMusic();

View File

@@ -39,15 +39,15 @@ public class TimelineTab : MonoBehaviour
if (gameElement is TimeDurationSubmodule suba)
{
AddSubTab(suba, suba.startTime);
AddSubTab(suba, suba.endTime);
var s = AddSubTab(suba, suba.startTime);
AddSubTab(suba, suba.endTime, s.GetComponent<RectTransform>());
}
else if (gameElement is TrackTimeSubmodule sub)
{
if (sub is TrackTimeSubmoduleMovable moveable)
{
AddSubTab(moveable, moveable.trackStartTime);
AddSubTab(moveable, moveable.trackEndTime);
var s = AddSubTab(moveable, moveable.trackStartTime);
AddSubTab(moveable, moveable.trackEndTime, s.GetComponent<RectTransform>());
}
}
else if (gameElement is NoteBase)
@@ -65,13 +65,13 @@ public class TimelineTab : MonoBehaviour
}
}
private void AddSubTab(IBaseElement element, float time)
private SubTab AddSubTab(IBaseElement element, float time, RectTransform anotherTab = null)
{
SubTab subTab = Instantiate(ElementPrefab, MoveArea.transform);
subTab.father = this;
subTab.Set(element, time);
subTab.Set(element, time, anotherTab);
SubTabs.Add(time, subTab);
return subTab;
}
private void Start()

View File

@@ -18,7 +18,14 @@ namespace Ichni.RhythmGame
public void SelectGameElement()
{
EditorManager.instance.uiManager.hierarchy.FindTab(elementToSelect);
if (EditorManager.instance.uiManager.inspector.connectedGameElement == this.elementToSelect)
{
EditorManager.instance.uiManager.hierarchy.FindTab(elementToSelect.parentElement);
}
else
{
EditorManager.instance.uiManager.hierarchy.FindTab(elementToSelect);
}
// EditorManager.instance.operationManager.ClearSelectedElements();
// EditorManager.instance.operationManager.AddSelectElement(elementToSelect);
// EditorManager.instance.uiManager.inspector.SetInspector(elementToSelect);

View File

@@ -52,6 +52,7 @@ namespace Ichni.RhythmGame
EditorManager.instance.uiManager.inspector.ClearInspector();
SetUpInspector();
});
}
private AudioClip LoadMP3(string filepath)//猜猜我从哪里偷的
{

View File

@@ -89,8 +89,7 @@ namespace Ichni
}
isLoaded = true;
songInformation.songTime = musicPlayer.audioSource.time - songInformation.offset;
}
public float CurrentFrameRate;
public TMP_Text FPStext;

View File

@@ -3376,7 +3376,7 @@
}
},{
"__type" : "Ichni.RhythmGame.Beatmap.TrackHeadPoint_BM,Assembly-CSharp",
"MotionAngles" : false,
"motionApplyRotation" : false,
"elementName" : "New Track Head Point",
"tags" : [
@@ -4968,7 +4968,7 @@
}
},{
"__type" : "Ichni.RhythmGame.Beatmap.TrackHeadPoint_BM,Assembly-CSharp",
"MotionAngles" : false,
"motionApplyRotation" : false,
"elementName" : "New Track Head Point",
"tags" : [
@@ -11507,7 +11507,7 @@
}
},{
"__type" : "Ichni.RhythmGame.Beatmap.TrackHeadPoint_BM,Assembly-CSharp",
"MotionAngles" : false,
"motionApplyRotation" : false,
"elementName" : "New Track Head Point",
"tags" : [
@@ -27017,7 +27017,7 @@
}
},{
"__type" : "Ichni.RhythmGame.Beatmap.TrackHeadPoint_BM,Assembly-CSharp",
"MotionAngles" : false,
"motionApplyRotation" : false,
"elementName" : "New Track Head Point",
"tags" : [
@@ -27276,7 +27276,7 @@
}
},{
"__type" : "Ichni.RhythmGame.Beatmap.TrackHeadPoint_BM,Assembly-CSharp",
"MotionAngles" : false,
"motionApplyRotation" : false,
"elementName" : "New Track Head Point",
"tags" : [
@@ -35728,7 +35728,7 @@
],
"elementGuid" : {
"value" : "3b491f74-604d-49e8-a52c-763f7e1f8534"
"value" : "69db2111-b7be-4165-a7ab-bc806ca074c5"
},
"attachedElementGuid" : {
"value" : "ff8926ef-e06e-4f85-837f-2b3948290d18"
@@ -35751,7 +35751,7 @@
"z" : 1
},
"attachedElementGuid" : {
"value" : "3b491f74-604d-49e8-a52c-763f7e1f8534"
"value" : "69db2111-b7be-4165-a7ab-bc806ca074c5"
}
},{
"__type" : "Ichni.RhythmGame.Beatmap.EffectSubmodule_BM,Assembly-CSharp",
@@ -35791,7 +35791,7 @@
]
},
"attachedElementGuid" : {
"value" : "3b491f74-604d-49e8-a52c-763f7e1f8534"
"value" : "69db2111-b7be-4165-a7ab-bc806ca074c5"
}
},{
"__type" : "Ichni.RhythmGame.Beatmap.Tap_BM,Assembly-CSharp",
@@ -45739,7 +45739,7 @@
}
},{
"__type" : "Ichni.RhythmGame.Beatmap.TrackHeadPoint_BM,Assembly-CSharp",
"MotionAngles" : false,
"motionApplyRotation" : false,
"elementName" : "New Track Head Point",
"tags" : [
@@ -46176,7 +46176,7 @@
],
"elementGuid" : {
"value" : "f9ac9b57-2551-4f59-b84d-e0f468744952"
"value" : "aef9d7a6-2778-4104-b2d0-f2d05edfab00"
},
"attachedElementGuid" : {
"value" : "ff8926ef-e06e-4f85-837f-2b3948290d18"
@@ -46199,7 +46199,7 @@
"z" : 1
},
"attachedElementGuid" : {
"value" : "f9ac9b57-2551-4f59-b84d-e0f468744952"
"value" : "aef9d7a6-2778-4104-b2d0-f2d05edfab00"
}
},{
"__type" : "Ichni.RhythmGame.Beatmap.EffectSubmodule_BM,Assembly-CSharp",
@@ -46269,7 +46269,7 @@
]
},
"attachedElementGuid" : {
"value" : "f9ac9b57-2551-4f59-b84d-e0f468744952"
"value" : "aef9d7a6-2778-4104-b2d0-f2d05edfab00"
}
},{
"__type" : "Ichni.RhythmGame.Beatmap.ElementFolder_BM,Assembly-CSharp",
@@ -46491,7 +46491,7 @@
}
},{
"__type" : "Ichni.RhythmGame.Beatmap.TrackHeadPoint_BM,Assembly-CSharp",
"MotionAngles" : false,
"motionApplyRotation" : true,
"elementName" : "New Track Head Point",
"tags" : [
@@ -55265,7 +55265,7 @@
],
"elementGuid" : {
"value" : "264c8cd5-a36a-4804-ac72-f23da1790e78"
"value" : "32d81a60-6c0b-49ac-af81-99732ac1d15f"
},
"attachedElementGuid" : {
"value" : "ff8926ef-e06e-4f85-837f-2b3948290d18"
@@ -55288,7 +55288,7 @@
"z" : 1
},
"attachedElementGuid" : {
"value" : "264c8cd5-a36a-4804-ac72-f23da1790e78"
"value" : "32d81a60-6c0b-49ac-af81-99732ac1d15f"
}
},{
"__type" : "Ichni.RhythmGame.Beatmap.EffectSubmodule_BM,Assembly-CSharp",
@@ -55328,7 +55328,7 @@
]
},
"attachedElementGuid" : {
"value" : "264c8cd5-a36a-4804-ac72-f23da1790e78"
"value" : "32d81a60-6c0b-49ac-af81-99732ac1d15f"
}
},{
"__type" : "Ichni.RhythmGame.Beatmap.ElementFolder_BM,Assembly-CSharp",
@@ -62260,7 +62260,7 @@
}
},{
"__type" : "Ichni.RhythmGame.Beatmap.TrackHeadPoint_BM,Assembly-CSharp",
"MotionAngles" : false,
"motionApplyRotation" : false,
"elementName" : "New Track Head Point",
"tags" : [
@@ -62687,7 +62687,7 @@
}
},{
"__type" : "Ichni.RhythmGame.Beatmap.TrackHeadPoint_BM,Assembly-CSharp",
"MotionAngles" : false,
"motionApplyRotation" : false,
"elementName" : "New Track Head Point",
"tags" : [
@@ -63114,7 +63114,7 @@
}
},{
"__type" : "Ichni.RhythmGame.Beatmap.TrackHeadPoint_BM,Assembly-CSharp",
"MotionAngles" : false,
"motionApplyRotation" : false,
"elementName" : "New Track Head Point",
"tags" : [
@@ -63391,7 +63391,7 @@
}
},{
"__type" : "Ichni.RhythmGame.Beatmap.TrackHeadPoint_BM,Assembly-CSharp",
"MotionAngles" : false,
"motionApplyRotation" : false,
"elementName" : "New Track Head Point",
"tags" : [
@@ -63668,7 +63668,7 @@
}
},{
"__type" : "Ichni.RhythmGame.Beatmap.TrackHeadPoint_BM,Assembly-CSharp",
"MotionAngles" : false,
"motionApplyRotation" : false,
"elementName" : "New Track Head Point",
"tags" : [
@@ -64435,7 +64435,7 @@
}
},{
"__type" : "Ichni.RhythmGame.Beatmap.TrackHeadPoint_BM,Assembly-CSharp",
"MotionAngles" : false,
"motionApplyRotation" : false,
"elementName" : "New Track Head Point",
"tags" : [
@@ -64862,7 +64862,7 @@
}
},{
"__type" : "Ichni.RhythmGame.Beatmap.TrackHeadPoint_BM,Assembly-CSharp",
"MotionAngles" : false,
"motionApplyRotation" : false,
"elementName" : "New Track Head Point",
"tags" : [
@@ -65289,7 +65289,7 @@
}
},{
"__type" : "Ichni.RhythmGame.Beatmap.TrackHeadPoint_BM,Assembly-CSharp",
"MotionAngles" : false,
"motionApplyRotation" : false,
"elementName" : "New Track Head Point",
"tags" : [
@@ -65566,7 +65566,7 @@
}
},{
"__type" : "Ichni.RhythmGame.Beatmap.TrackHeadPoint_BM,Assembly-CSharp",
"MotionAngles" : false,
"motionApplyRotation" : false,
"elementName" : "New Track Head Point",
"tags" : [
@@ -65993,7 +65993,7 @@
}
},{
"__type" : "Ichni.RhythmGame.Beatmap.TrackHeadPoint_BM,Assembly-CSharp",
"MotionAngles" : false,
"motionApplyRotation" : false,
"elementName" : "New Track Head Point",
"tags" : [
@@ -72378,7 +72378,7 @@
}
},{
"__type" : "Ichni.RhythmGame.Beatmap.TrackHeadPoint_BM,Assembly-CSharp",
"MotionAngles" : false,
"motionApplyRotation" : false,
"elementName" : "New Track Head Point",
"tags" : [
@@ -73292,7 +73292,7 @@
}
},{
"__type" : "Ichni.RhythmGame.Beatmap.TrackHeadPoint_BM,Assembly-CSharp",
"MotionAngles" : false,
"motionApplyRotation" : false,
"elementName" : "New Track Head Point",
"tags" : [

File diff suppressed because one or more lines are too long