Cross Track Point和Trail的进一步制作,修复Duplicate的Guid Bug
Ctrl+M切摄像机
This commit is contained in:
@@ -67,21 +67,24 @@ namespace Ichni.RhythmGame
|
||||
/// <returns>返回距离当前时间最近的前一个AnimatedInt</returns>
|
||||
AnimatedInt GetAnimatedInt(float nowTime)
|
||||
{
|
||||
if (nowTime < animations[0].time)
|
||||
{
|
||||
return animations[0];
|
||||
}
|
||||
|
||||
if (nowTime > animations[animations.Count - 1].time)
|
||||
{
|
||||
return animations[animations.Count - 1];
|
||||
}
|
||||
|
||||
for (int i = 0; i < animations.Count; i++)
|
||||
{
|
||||
if (nowTime < animations[i].time)
|
||||
{
|
||||
if (i == 0)
|
||||
{
|
||||
return animations[i];
|
||||
}
|
||||
else
|
||||
{
|
||||
return animations[i - 1];
|
||||
}
|
||||
return animations[i - 1];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return new AnimatedInt(0, 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -102,10 +102,10 @@ namespace Ichni.RhythmGame
|
||||
var currentRotText =
|
||||
inspector.GenerateParameterText(this, container, "Current Rotation", nameof(currentEulerAngles), true);
|
||||
|
||||
if (attachedGameElement is PathNode pathNode) // 如果是PathNode,显示法线方向
|
||||
if (attachedGameElement is PathNode or Trail) // 如果是PathNode,显示法线方向
|
||||
{
|
||||
var currentNormalText =
|
||||
inspector.GenerateHintText(this, container, () => "Normal: " + pathNode.transform.forward);
|
||||
inspector.GenerateHintText(this, container, () => "Normal: " + attachedGameElement.transform.forward);
|
||||
}
|
||||
|
||||
var currentScaleText =
|
||||
|
||||
@@ -68,6 +68,9 @@ namespace Ichni.RhythmGame
|
||||
{
|
||||
if (element is GameElement_BM gameElement)
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
Debug.Log("Adding element to identifier: " + gameElement.elementName + " " + gameElement.elementGuid);
|
||||
#endif
|
||||
GameElement_BM.identifier.Add(gameElement.elementGuid, gameElement);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user