Fix
This commit is contained in:
@@ -231,22 +231,26 @@ namespace Ichni.Editor
|
||||
case "Tap":
|
||||
Tap a = Tap.GenerateElement("New Tap", Guid.NewGuid(), new List<string>(), false, findTrack(id), timestamp);
|
||||
((TransformSubmodule)a.noteVisual.submoduleList.Where(i => i is TransformSubmodule)?.First()).originalPosition = new Vector3(value, 0, 0);
|
||||
a.noteVisual.SetEditorSubmodules(); // 设置selset
|
||||
a.Refresh();
|
||||
break;
|
||||
case "Stay":
|
||||
|
||||
Stay b = Stay.GenerateElement("New Stay", Guid.NewGuid(), new List<string>(), false, findTrack(id), timestamp);
|
||||
((TransformSubmodule)b.noteVisual.submoduleList.Where(i => i is TransformSubmodule)?.First()).originalPosition = new Vector3(value, 0, 0);
|
||||
b.noteVisual.SetEditorSubmodules(); // 设置selset
|
||||
b.Refresh();
|
||||
break;
|
||||
case "Hold":
|
||||
Hold c = Hold.GenerateElement("New Hold", Guid.NewGuid(), new List<string>(), false, findTrack(id), timestamp, timestamp + holdDuration);
|
||||
((TransformSubmodule)c.noteVisual.submoduleList.Where(i => i is TransformSubmodule)?.First()).originalPosition = new Vector3(value, 0, 0);
|
||||
c.noteVisual.SetEditorSubmodules(); // 设置selset
|
||||
c.Refresh();
|
||||
break;
|
||||
case "Flick":
|
||||
Flick d = Flick.GenerateElement("New Flick", Guid.NewGuid(), new List<string>(), false, findTrack(id), timestamp, new List<Vector2>());
|
||||
((TransformSubmodule)d.noteVisual.submoduleList.Where(i => i is TransformSubmodule)?.First()).originalPosition = new Vector3(value, 0, 0);
|
||||
d.noteVisual.SetEditorSubmodules(); // 设置selset
|
||||
d.Refresh();
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace Ichni.Editor
|
||||
hierarchy.GetComponent<RectTransform>().sizeDelta = new Vector2(hierarchy.GetComponent<RectTransform>().sizeDelta.x,
|
||||
HierarchyTopLocatedPoint.transform.localPosition.y - HierarchyBottomLocatedPoint.transform.localPosition.y);
|
||||
hierarchy.transform.localPosition = new Vector3(hierarchy.transform.localPosition.x, HierarchyTopLocatedPoint.transform.localPosition.y - (hierarchy.GetComponent<RectTransform>().sizeDelta.y / 2f), 0);
|
||||
hierarchy.addFolderButton.transform.position = new Vector3(hierarchy.addFolderButton.transform.position.x, HierarchyBottomLocatedPoint.transform.position.y, 0);
|
||||
hierarchy.addFolderButton.transform.position = new Vector3(hierarchy.addFolderButton.transform.position.x, HierarchyBottomLocatedPoint.transform.position.y + 30, 0);
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace Ichni.RhythmGame
|
||||
{
|
||||
public partial class GameCamera : GameElement, IHaveTransformSubmodule, IHaveTimeDurationSubmodule
|
||||
{
|
||||
[FormerlySerializedAs("camera")] public new Camera gameCamera;
|
||||
[FormerlySerializedAs("camera")] public Camera gameCamera;
|
||||
public Transform rotationPoint;
|
||||
public Transform positionPoint;
|
||||
public Transform cameraTransform;
|
||||
|
||||
@@ -85,7 +85,7 @@ namespace Ichni.RhythmGame
|
||||
/// </summary>
|
||||
public virtual void AfterInitialize()
|
||||
{
|
||||
SetEditorSubmodules();
|
||||
//SetEditorSubmodules();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -64,7 +64,17 @@ namespace Ichni.RhythmGame
|
||||
timeDurationSubmodule = new TimeDurationSubmodule(this);
|
||||
noteJudgeSubmodule = new NoteJudgeSubmodule(this);
|
||||
}
|
||||
public override void Refresh()
|
||||
{
|
||||
base.Refresh();
|
||||
|
||||
|
||||
|
||||
if (noteVisual != null)
|
||||
{
|
||||
noteVisual.Refresh();
|
||||
}
|
||||
}
|
||||
protected virtual void Update()
|
||||
{
|
||||
if (isOnTrack)
|
||||
|
||||
@@ -11,28 +11,28 @@ namespace Ichni.RhythmGame
|
||||
public NoteBase note;
|
||||
|
||||
public bool isHighlighted;
|
||||
|
||||
|
||||
public GameObject noteMain;
|
||||
public GameObject judgeEffect;
|
||||
|
||||
public List<GameObject> notePartList;
|
||||
public List<GameObject> effectPartList;
|
||||
|
||||
|
||||
public EffectSubmodule effectSubmodule { get; set; }
|
||||
public SelectSubmodule selectSubmodule { get; set; }
|
||||
|
||||
public new static NoteVisualBase GenerateElement(string elementName, Guid id, List<string> tags,
|
||||
public static NoteVisualBase GenerateElement(string elementName, Guid id, List<string> tags,
|
||||
bool isFirstGenerated, string themeBundleName, string objectName, GameElement parentElement, bool isHighlighted)
|
||||
{
|
||||
NoteVisualBase noteVisual = SubstantialObject.GenerateElement(elementName, id, tags,
|
||||
isFirstGenerated, themeBundleName, objectName, parentElement).GetComponent<NoteVisualBase>();
|
||||
|
||||
|
||||
noteVisual.isHighlighted = isHighlighted;
|
||||
noteVisual.SetHighlight();
|
||||
|
||||
noteVisual.SetEditorSubmodules();
|
||||
return noteVisual;
|
||||
}
|
||||
|
||||
|
||||
public override void SetDefaultSubmodules()
|
||||
{
|
||||
base.SetDefaultSubmodules();
|
||||
@@ -41,13 +41,13 @@ namespace Ichni.RhythmGame
|
||||
|
||||
public override void SetEditorSubmodules()
|
||||
{
|
||||
selectSubmodule = new SelectSubmodule(this, note);
|
||||
selectSubmodule ??= new SelectSubmodule(this, note);
|
||||
}
|
||||
|
||||
public override void SetUpInspector()
|
||||
{
|
||||
base.SetUpInspector();
|
||||
|
||||
|
||||
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
|
||||
var container = inspector.GenerateContainer("Generate");
|
||||
var generateAnimation = container.GenerateSubcontainer(3);
|
||||
@@ -62,22 +62,21 @@ namespace Ichni.RhythmGame
|
||||
Scale.GenerateElement("New Scale", Guid.NewGuid(), new List<string>(), true, this,
|
||||
new FlexibleFloat(), new FlexibleFloat(), new FlexibleFloat());
|
||||
}); //缩放
|
||||
|
||||
|
||||
var settings = inspector.GenerateContainer("Settings");
|
||||
var settingsSubcontainer = container.GenerateSubcontainer(3);
|
||||
var highlightToggle =
|
||||
var highlightToggle =
|
||||
inspector.GenerateToggle(this, settingsSubcontainer, "Highlight", nameof(isHighlighted))
|
||||
.AddListenerFunction(SetHighlight);
|
||||
}
|
||||
|
||||
public virtual void Recover()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
public virtual void SetHighlight()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,7 +96,7 @@ namespace Ichni.RhythmGame
|
||||
{
|
||||
this.isHighlighted = isHighlighted;
|
||||
}
|
||||
|
||||
|
||||
public override void ExecuteBM()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
@@ -109,5 +108,5 @@ namespace Ichni.RhythmGame
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user