部分改动
我还是难以理解(
This commit is contained in:
@@ -95,6 +95,8 @@ MonoBehaviour:
|
|||||||
ElementPrefab: {fileID: 67623903627768998, guid: 43149b488eb37d14185b05d5d2ee0a9a,
|
ElementPrefab: {fileID: 67623903627768998, guid: 43149b488eb37d14185b05d5d2ee0a9a,
|
||||||
type: 3}
|
type: 3}
|
||||||
GelementPointer: []
|
GelementPointer: []
|
||||||
|
MoveArea: {fileID: 7453192480244305691}
|
||||||
|
timeline: {fileID: 0}
|
||||||
--- !u!1 &1843458013635033358
|
--- !u!1 &1843458013635033358
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -261,7 +263,7 @@ RectTransform:
|
|||||||
m_Father: {fileID: 2856594644468795856}
|
m_Father: {fileID: 2856594644468795856}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 0.5}
|
m_AnchorMin: {x: 0, y: 0.5}
|
||||||
m_AnchorMax: {x: 0, y: 0.5}
|
m_AnchorMax: {x: 1, y: 0.5}
|
||||||
m_AnchoredPosition: {x: 1046.8994, y: 0.0000076293945}
|
m_AnchoredPosition: {x: 897.3994, y: 0.0000076293945}
|
||||||
m_SizeDelta: {x: 1494.721, y: 25.652}
|
m_SizeDelta: {x: 1195.721, y: 25.652}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -24,24 +24,28 @@ public class SubTab : MonoBehaviour
|
|||||||
Time = time;
|
Time = time;
|
||||||
connectObj.Add(Objs);
|
connectObj.Add(Objs);
|
||||||
button.GetComponentInChildren<TMP_Text>().text = connectObj.Count().ToString();
|
button.GetComponentInChildren<TMP_Text>().text = connectObj.Count().ToString();
|
||||||
}
|
transform.position = new Vector3(
|
||||||
public void Update()
|
Time / timeline.timePerBeat * timePointerModule.timePointerInterval + 165f - timePointerModule.delayDistanceOffset
|
||||||
{
|
|
||||||
if (Time - timePointerModule.leftSideSongTime < 0)
|
|
||||||
{
|
|
||||||
transform.localScale = Vector3.zero;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
transform.localScale = Vector3.one;
|
|
||||||
float devideTime = Time - timePointerModule.leftSideSongTime;
|
|
||||||
transform.position = new Vector3(
|
|
||||||
devideTime / timeline.timePerBeat * timePointerModule.timePointerInterval + 165f - timePointerModule.delayDistanceOffset
|
|
||||||
, transform.position.y, 0
|
, transform.position.y, 0
|
||||||
);
|
);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
// public void Update()
|
||||||
|
// {
|
||||||
|
// if (Time - timePointerModule.leftSideSongTime < 0)
|
||||||
|
// {
|
||||||
|
// transform.localScale = Vector3.zero;
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// transform.localScale = Vector3.one;
|
||||||
|
// float devideTime = Time - timePointerModule.leftSideSongTime;
|
||||||
|
// transform.position = new Vector3(
|
||||||
|
// devideTime / timeline.timePerBeat * timePointerModule.timePointerInterval + 165f - timePointerModule.delayDistanceOffset
|
||||||
|
// , transform.position.y, 0
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
public void GetClick()
|
public void GetClick()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -118,6 +118,7 @@ namespace Ichni.Editor
|
|||||||
Destroy(timelineTabList.ElementAt(i).Value.gameObject);
|
Destroy(timelineTabList.ElementAt(i).Value.gameObject);
|
||||||
timelineTabList.Remove(timelineTabList.ElementAt(i).Key);
|
timelineTabList.Remove(timelineTabList.ElementAt(i).Key);
|
||||||
}
|
}
|
||||||
|
print(1);
|
||||||
if (element is Track) Trackfind(element);
|
if (element is Track) Trackfind(element);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,11 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using Ichni;
|
||||||
|
using Ichni.Editor;
|
||||||
using Ichni.RhythmGame;
|
using Ichni.RhythmGame;
|
||||||
using TMPro;
|
using TMPro;
|
||||||
|
using UnityEditor;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
public class TimelineTab : MonoBehaviour
|
public class TimelineTab : MonoBehaviour
|
||||||
@@ -13,7 +16,10 @@ public class TimelineTab : MonoBehaviour
|
|||||||
public SubTab ElementPrefab;
|
public SubTab ElementPrefab;
|
||||||
public List<GameElement> GelementPointer;
|
public List<GameElement> GelementPointer;
|
||||||
|
|
||||||
|
public RectTransform MoveArea;
|
||||||
public Dictionary<float, SubTab> SubTabs = new();
|
public Dictionary<float, SubTab> SubTabs = new();
|
||||||
|
|
||||||
|
public Timeline timeline;
|
||||||
public void SetTab(GameElement element, Type DisplayType)
|
public void SetTab(GameElement element, Type DisplayType)
|
||||||
{
|
{
|
||||||
connectedGameElement = element;
|
connectedGameElement = element;
|
||||||
@@ -33,11 +39,22 @@ public class TimelineTab : MonoBehaviour
|
|||||||
if (SubTabs.ContainsKey(Judgetime)) SubTabs[Judgetime].Set(gameElement, Judgetime);
|
if (SubTabs.ContainsKey(Judgetime)) SubTabs[Judgetime].Set(gameElement, Judgetime);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SubTab i = Instantiate(ElementPrefab, transform);
|
SubTab i = Instantiate(ElementPrefab, MoveArea.transform);
|
||||||
|
|
||||||
i.Set(gameElement, Judgetime);
|
i.Set(gameElement, Judgetime);
|
||||||
SubTabs.Add(Judgetime, i);
|
SubTabs.Add(Judgetime, i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
private void Start()
|
||||||
|
{
|
||||||
|
timeline = EditorManager.instance.uiManager.timeline;
|
||||||
|
}
|
||||||
|
public void Update()
|
||||||
|
{
|
||||||
|
MoveArea.position = new Vector3(
|
||||||
|
timeline.timePointerModule.timePointerArea.position.x,
|
||||||
|
MoveArea.position.y,
|
||||||
|
MoveArea.position.z);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ using System;
|
|||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Dreamteck.Splines;
|
using Dreamteck.Splines;
|
||||||
|
using Ichni.Editor;
|
||||||
using Sirenix.OdinInspector;
|
using Sirenix.OdinInspector;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
@@ -12,19 +13,19 @@ namespace Ichni.RhythmGame
|
|||||||
[Title("Basic Info")]
|
[Title("Basic Info")]
|
||||||
public float exactJudgeTime;
|
public float exactJudgeTime;
|
||||||
|
|
||||||
[Title("Track Info")]
|
[Title("Track Info")]
|
||||||
public bool isOnTrack;
|
public bool isOnTrack;
|
||||||
public Track track;
|
public Track track;
|
||||||
public SplinePositioner trackPositioner;
|
public SplinePositioner trackPositioner;
|
||||||
|
|
||||||
[Title("NoteVisual")]
|
[Title("NoteVisual")]
|
||||||
public NoteVisualBase noteVisual;
|
public NoteVisualBase noteVisual;
|
||||||
|
|
||||||
[Title("Submodules")]
|
[Title("Submodules")]
|
||||||
public TransformSubmodule transformSubmodule { get; set; }
|
public TransformSubmodule transformSubmodule { get; set; }
|
||||||
public TimeDurationSubmodule timeDurationSubmodule { get; set; }
|
public TimeDurationSubmodule timeDurationSubmodule { get; set; }
|
||||||
public NoteJudgeSubmodule noteJudgeSubmodule { get; set; }
|
public NoteJudgeSubmodule noteJudgeSubmodule { get; set; }
|
||||||
|
|
||||||
[Title("In-Game Info")]
|
[Title("In-Game Info")]
|
||||||
public Vector2 noteScreenPosition;
|
public Vector2 noteScreenPosition;
|
||||||
public bool isJudged;
|
public bool isJudged;
|
||||||
@@ -44,10 +45,10 @@ namespace Ichni.RhythmGame
|
|||||||
{
|
{
|
||||||
float songTime = EditorManager.instance.songInformation.songTime;
|
float songTime = EditorManager.instance.songInformation.songTime;
|
||||||
TrackTimeSubmoduleStatic trackTimeSubmoduleStatic = track.trackTimeSubmodule as TrackTimeSubmoduleStatic;
|
TrackTimeSubmoduleStatic trackTimeSubmoduleStatic = track.trackTimeSubmodule as TrackTimeSubmoduleStatic;
|
||||||
|
|
||||||
float startMove = exactJudgeTime - trackTimeSubmoduleStatic.trackTotalTime;
|
float startMove = exactJudgeTime - trackTimeSubmoduleStatic.trackTotalTime;
|
||||||
float percent = AnimationCurveEvaluator.Evaluate(trackTimeSubmoduleStatic.animationCurveType, (songTime - startMove) / trackTimeSubmoduleStatic.trackTotalTime);
|
float percent = AnimationCurveEvaluator.Evaluate(trackTimeSubmoduleStatic.animationCurveType, (songTime - startMove) / trackTimeSubmoduleStatic.trackTotalTime);
|
||||||
|
|
||||||
percent = Mathf.Max(percent, 0);
|
percent = Mathf.Max(percent, 0);
|
||||||
percent = Mathf.Min(percent, 1);
|
percent = Mathf.Min(percent, 1);
|
||||||
|
|
||||||
@@ -59,7 +60,7 @@ namespace Ichni.RhythmGame
|
|||||||
transformSubmodule = new TransformSubmodule(this);
|
transformSubmodule = new TransformSubmodule(this);
|
||||||
timeDurationSubmodule = new TimeDurationSubmodule(this);
|
timeDurationSubmodule = new TimeDurationSubmodule(this);
|
||||||
noteJudgeSubmodule = new NoteJudgeSubmodule(this);
|
noteJudgeSubmodule = new NoteJudgeSubmodule(this);
|
||||||
|
|
||||||
submoduleList.Add(transformSubmodule);
|
submoduleList.Add(transformSubmodule);
|
||||||
submoduleList.Add(timeDurationSubmodule);
|
submoduleList.Add(timeDurationSubmodule);
|
||||||
submoduleList.Add(noteJudgeSubmodule);
|
submoduleList.Add(noteJudgeSubmodule);
|
||||||
@@ -116,9 +117,9 @@ namespace Ichni.RhythmGame
|
|||||||
|
|
||||||
public void ExecuteStartJudge()
|
public void ExecuteStartJudge()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UpdateNoteInTrack()
|
public void UpdateNoteInTrack()
|
||||||
{
|
{
|
||||||
if (isOnTrack && track.trackTimeSubmodule != null)
|
if (isOnTrack && track.trackTimeSubmodule != null)
|
||||||
@@ -133,6 +134,26 @@ namespace Ichni.RhythmGame
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public override void SetUpInspector()
|
||||||
|
{//我想把时间放在第一层菜单所以
|
||||||
|
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
|
||||||
|
var container = inspector.GenerateContainer("Element Info");
|
||||||
|
var nameInputField = inspector.GenerateParameterInputField(this, container, GetType().Name + "'s Name", nameof(elementName));
|
||||||
|
var guidText = inspector.GenerateParameterText(this, container, "Element GUID", nameof(elementGuid));
|
||||||
|
var tagsListButton = inspector.GenerateButton(this, container, "Tags List", () =>
|
||||||
|
{
|
||||||
|
inspector.GenerateCompositeParameterWindow(this, "Tags List", nameof(tags)).SetAsStringList();
|
||||||
|
});
|
||||||
|
foreach (var submodule in submoduleList)
|
||||||
|
{
|
||||||
|
submodule.SetUpInspector();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
var judgetimeinput =
|
||||||
|
inspector.GenerateParameterInputField(this, container, "exactJudgeTime", nameof(exactJudgeTime));
|
||||||
|
base.SetUpInspector();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract partial class NoteBase
|
public abstract partial class NoteBase
|
||||||
@@ -144,6 +165,7 @@ namespace Ichni.RhythmGame
|
|||||||
Bad,
|
Bad,
|
||||||
Miss
|
Miss
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace Beatmap
|
namespace Beatmap
|
||||||
@@ -151,13 +173,13 @@ namespace Ichni.RhythmGame
|
|||||||
public abstract class NoteBase_BM : GameElement_BM
|
public abstract class NoteBase_BM : GameElement_BM
|
||||||
{
|
{
|
||||||
public float exactJudgeTime;
|
public float exactJudgeTime;
|
||||||
|
|
||||||
public NoteBase_BM()
|
public NoteBase_BM()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public NoteBase_BM(string elementName, Guid elementGuid, List<string> tags, GameElement_BM attachedElement, float exactJudgeTime)
|
public NoteBase_BM(string elementName, Guid elementGuid, List<string> tags, GameElement_BM attachedElement, float exactJudgeTime)
|
||||||
: base(elementName, elementGuid, tags, attachedElement)
|
: base(elementName, elementGuid, tags, attachedElement)
|
||||||
{
|
{
|
||||||
this.exactJudgeTime = exactJudgeTime;
|
this.exactJudgeTime = exactJudgeTime;
|
||||||
@@ -165,7 +187,7 @@ namespace Ichni.RhythmGame
|
|||||||
|
|
||||||
public override void ExecuteBM()
|
public override void ExecuteBM()
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override GameElement DuplicateBM(GameElement parent)
|
public override GameElement DuplicateBM(GameElement parent)
|
||||||
|
|||||||
Reference in New Issue
Block a user