看完了
顺手加了个element改名同步hierarchy 3D遮挡!!! 然后发现当track或者folder旋转时pathnode的法线(旋转)不会跟着 以上测试放在IceFlowerMaster项目中 还有 现在没中文字体
This commit is contained in:
@@ -20,9 +20,10 @@ namespace Ichni.RhythmGame
|
||||
public TimeDurationSubmodule timeDurationSubmodule { get; set; }
|
||||
public ColorSubmodule colorSubmodule { get; set; }
|
||||
public bool haveEmission => false;
|
||||
|
||||
|
||||
[Title("Editor独有参数")]
|
||||
[SerializeField] [HideInPlayMode]
|
||||
[SerializeField]
|
||||
[HideInPlayMode]
|
||||
private GameObject pathNodeSphere;
|
||||
public bool isShowingSphere;
|
||||
|
||||
@@ -60,6 +61,7 @@ namespace Ichni.RhythmGame
|
||||
{
|
||||
public override void Refresh()
|
||||
{
|
||||
base.Refresh();
|
||||
Vector3 position = transformSubmodule.currentPosition;
|
||||
Vector3 normal = Quaternion.Euler(transformSubmodule.currentEulerAngles) * Vector3.up;
|
||||
float size = transformSubmodule.currentScale.x;
|
||||
@@ -80,7 +82,7 @@ namespace Ichni.RhythmGame
|
||||
{
|
||||
matchedBM = new Beatmap.PathNode_BM(elementName, elementGuid, tags, parentElement.matchedBM as GameElement_BM, isShowingSphere);
|
||||
}
|
||||
|
||||
|
||||
public void SetPathNodeSphere(bool isShowing)
|
||||
{
|
||||
isShowingSphere = isShowing;
|
||||
@@ -92,7 +94,7 @@ namespace Ichni.RhythmGame
|
||||
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
|
||||
|
||||
base.SetUpInspector();
|
||||
|
||||
|
||||
var container = inspector.GenerateContainer("Path Node");
|
||||
var indexText = inspector.GenerateHintText(this, container, "Index: " + index);
|
||||
var isShowingSphereToggle = inspector.GenerateToggle(this, container, "Is Showing Sphere", nameof(isShowingSphere));
|
||||
@@ -110,7 +112,7 @@ namespace Ichni.RhythmGame
|
||||
|
||||
}
|
||||
|
||||
public PathNode_BM(string elementName, Guid elementGuid, List<string> tags, GameElement_BM attachedElement,
|
||||
public PathNode_BM(string elementName, Guid elementGuid, List<string> tags, GameElement_BM attachedElement,
|
||||
bool isShowingSphere)
|
||||
: base(elementName, elementGuid, tags, attachedElement)
|
||||
{
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace Ichni.RhythmGame
|
||||
trackTimeSubmodule = null;
|
||||
trackRendererSubmodule = null;
|
||||
}
|
||||
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (timeDurationSubmodule.CheckTimeInDuration(EditorManager.instance.songInformation.songTime))
|
||||
@@ -51,13 +51,14 @@ namespace Ichni.RhythmGame
|
||||
{
|
||||
trackPathSubmodule.ClosePath();
|
||||
}
|
||||
|
||||
|
||||
Refresh();
|
||||
}
|
||||
|
||||
|
||||
public override void Refresh()
|
||||
{
|
||||
base.Refresh();
|
||||
trackPathSubmodule?.Refresh();
|
||||
trackTimeSubmodule?.Refresh();
|
||||
trackRendererSubmodule?.Refresh();
|
||||
@@ -117,7 +118,7 @@ namespace Ichni.RhythmGame
|
||||
trackRendererSubmodule = new TrackRendererSubmodulePathGenerator(this, false, 0);
|
||||
inspectorMain.SetInspector(this);
|
||||
});
|
||||
|
||||
|
||||
var trackRendererSurfaceButton = inspector.GenerateButton(this, trackSubmodulesContainer, "Track Renderer Surface",
|
||||
() =>
|
||||
{
|
||||
@@ -126,53 +127,53 @@ namespace Ichni.RhythmGame
|
||||
});
|
||||
|
||||
var generateContainer = inspector.GenerateContainer("Generate Elements"); //物体生成
|
||||
|
||||
|
||||
var pathNodeButton = inspector.GenerateButton(this, generateContainer, "Path Node",
|
||||
() =>
|
||||
{
|
||||
PathNode.GenerateElement("New Path Node", Guid.NewGuid(), new List<string>(), true, this, true);
|
||||
}); //路径点
|
||||
|
||||
|
||||
var trackPercentPointButton = inspector.GenerateButton(this, generateContainer, "Track Percent Point",
|
||||
() =>
|
||||
{
|
||||
TrackPercentPoint.GenerateElement("New Track Percent Point", Guid.NewGuid(), new List<string>(),
|
||||
TrackPercentPoint.GenerateElement("New Track Percent Point", Guid.NewGuid(), new List<string>(),
|
||||
true, this, new FlexibleFloat());
|
||||
}); //百分比点
|
||||
|
||||
|
||||
var trackHeadPointButton = inspector.GenerateButton(this, generateContainer, "Track Head Point",
|
||||
() =>
|
||||
{
|
||||
TrackHeadPoint.GenerateElement("New Track Head Point", Guid.NewGuid(), new List<string>(),
|
||||
TrackHeadPoint.GenerateElement("New Track Head Point", Guid.NewGuid(), new List<string>(),
|
||||
true, this);
|
||||
}); //头部点(必须先有TrackTimeSubmoduleMovable)
|
||||
if (trackTimeSubmodule is not TrackTimeSubmoduleMovable) trackHeadPointButton.button.interactable = false;
|
||||
|
||||
|
||||
var tapButton = inspector.GenerateButton(this, generateContainer, "Tap",
|
||||
() =>
|
||||
{
|
||||
Tap.GenerateElement("New Tap", Guid.NewGuid(), new List<string>(), true, this, 0f);
|
||||
}); //Note Tap
|
||||
|
||||
|
||||
var stayButton = inspector.GenerateButton(this, generateContainer, "Stay",
|
||||
() =>
|
||||
{
|
||||
Stay.GenerateElement("New Stay", Guid.NewGuid(), new List<string>(), true, this, 0f);
|
||||
}); //Note Stay
|
||||
|
||||
|
||||
// var holdButton = inspector.GenerateButton(this, generateContainer, "Hold",
|
||||
// () =>
|
||||
// {
|
||||
// Hold.GenerateElement("New Hold", Guid.NewGuid(), new List<string>(), true, this, 0f);
|
||||
// }); //Note Hold
|
||||
|
||||
|
||||
var flickButton = inspector.GenerateButton(this, generateContainer, "Flick",
|
||||
() =>
|
||||
{
|
||||
Flick.GenerateElement("New Flick", Guid.NewGuid(), new List<string>(), true, this, 0f,
|
||||
new List<Vector2>());
|
||||
}); //Note Flick
|
||||
|
||||
|
||||
var displacementButton = inspector.GenerateButton(this, generateContainer, "Displacement",
|
||||
() =>
|
||||
{
|
||||
@@ -207,8 +208,8 @@ namespace Ichni.RhythmGame
|
||||
trackRendererAutoOrientButton.button.interactable = false;
|
||||
trackRendererPathGeneratorButton.button.interactable = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
var toolsContainerTrack = inspector.GenerateContainer("Track Tools"); //轨道(整体)快捷工具
|
||||
var quickCopyButton = inspector.GenerateButton(this, toolsContainerTrack, "QuickCopy", () =>
|
||||
{
|
||||
@@ -229,7 +230,7 @@ namespace Ichni.RhythmGame
|
||||
QuickCopy(positionOffset, timeOffset, includeAnimation, iteration);
|
||||
});
|
||||
}); //快速复制
|
||||
|
||||
|
||||
var wholeTrackMoveButton = inspector.GenerateButton(this, toolsContainerTrack, "Whole Track Move", () =>
|
||||
{
|
||||
IHaveInspection wholeMoveWindow = inspectorMain.GenerateSecondaryWindow(this, elementName + "'s Whole Track Move");
|
||||
@@ -243,7 +244,7 @@ namespace Ichni.RhythmGame
|
||||
WholeTrackMove(positionOffset);
|
||||
});
|
||||
}); //整体移动
|
||||
|
||||
|
||||
var wholeTrackSwirlButton = inspector.GenerateButton(this, toolsContainerTrack, "Whole Track Swirl", () =>
|
||||
{
|
||||
IHaveInspection wholeSwirlWindow = inspectorMain.GenerateSecondaryWindow(this, elementName + "'s Whole Track Swirl");
|
||||
@@ -263,7 +264,7 @@ namespace Ichni.RhythmGame
|
||||
WholeTrackSwirl(angle, center, axisDirection);
|
||||
});
|
||||
}); //整体旋转
|
||||
|
||||
|
||||
// var wholeTrackFlipButton = inspector.GenerateButton(this, toolsContainerTrack, "Whole Track Flip", () =>
|
||||
// {
|
||||
// IHaveInspection wholeFlipWindow = inspectorMain.GenerateSecondaryWindow(this, elementName + "'s Whole Track Flip");
|
||||
@@ -281,20 +282,20 @@ namespace Ichni.RhythmGame
|
||||
// WholeTrackFlip(axisStart, axisEnd);
|
||||
// });
|
||||
// }); //整体翻转
|
||||
|
||||
|
||||
var toolsContainerPathNode = inspector.GenerateContainer("Path Node Tools"); //路径点快捷工具
|
||||
var setAllPathNodeSphereButton = inspector.GenerateButton(this, toolsContainerPathNode,
|
||||
var setAllPathNodeSphereButton = inspector.GenerateButton(this, toolsContainerPathNode,
|
||||
"Set All Path Node Sphere", () =>
|
||||
{
|
||||
bool firstPathNodeSphere = trackPathSubmodule.pathNodeList[0].isShowingSphere;
|
||||
SetAllPathNodeSphere(!firstPathNodeSphere);
|
||||
});
|
||||
|
||||
var setOnlyStartEndPathNodeSphereEnabledButton = inspector.GenerateButton(this, toolsContainerPathNode,
|
||||
|
||||
var setOnlyStartEndPathNodeSphereEnabledButton = inspector.GenerateButton(this, toolsContainerPathNode,
|
||||
"Only Start & End Path Node's sphere enabled", SetOnlyStartEndPathNodeSphereEnabled);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public partial class Track
|
||||
{
|
||||
public enum TrackSpaceType
|
||||
@@ -310,20 +311,20 @@ namespace Ichni.RhythmGame
|
||||
DistanceDistributed = 1
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace Beatmap
|
||||
{
|
||||
public class Track_BM : GameElement_BM
|
||||
{
|
||||
public Track_BM()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
public Track_BM(string elementName, Guid elementGuid, List<string> tags, GameElement_BM attachedElement)
|
||||
public Track_BM(string elementName, Guid elementGuid, List<string> tags, GameElement_BM attachedElement)
|
||||
: base(elementName, elementGuid, tags, attachedElement)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
public override void ExecuteBM()
|
||||
|
||||
Reference in New Issue
Block a user