看完了
顺手加了个element改名同步hierarchy 3D遮挡!!! 然后发现当track或者folder旋转时pathnode的法线(旋转)不会跟着 以上测试放在IceFlowerMaster项目中 还有 现在没中文字体
This commit is contained in:
@@ -35,7 +35,7 @@ namespace Ichni.RhythmGame
|
||||
|
||||
//次级模块
|
||||
public List<SubmoduleBase> submoduleList = new List<SubmoduleBase>();
|
||||
|
||||
|
||||
//存档类
|
||||
public BaseElement_BM matchedBM { get; set; }
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace Ichni.RhythmGame
|
||||
/// 首次初始化
|
||||
/// </summary>
|
||||
/// <param name="name">物体名</param>
|
||||
public virtual void Initialize(string name, Guid elementGuid, List<string> tags,
|
||||
public virtual void Initialize(string name, Guid elementGuid, List<string> tags,
|
||||
bool isFirstGenerated, GameElement parentElement)
|
||||
{
|
||||
this.elementName = name;
|
||||
@@ -65,7 +65,7 @@ namespace Ichni.RhythmGame
|
||||
/// </summary>
|
||||
protected virtual void SetDefaultSubmodules()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -73,7 +73,7 @@ namespace Ichni.RhythmGame
|
||||
/// </summary>
|
||||
public virtual void AfterInitialize()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -93,12 +93,12 @@ namespace Ichni.RhythmGame
|
||||
|
||||
public abstract partial class GameElement //存档,删除,复制,粘贴
|
||||
{
|
||||
|
||||
|
||||
public virtual void Refresh()
|
||||
{
|
||||
|
||||
if (connectedTab != null) connectedTab.tabButtonText.text = this.elementName;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 用于生成存档
|
||||
/// </summary>
|
||||
@@ -106,16 +106,16 @@ namespace Ichni.RhythmGame
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 当物体被删除时执行的方法
|
||||
/// </summary>
|
||||
public virtual void OnDelete()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 删除物体,包括所有子物体
|
||||
/// </summary>
|
||||
@@ -130,11 +130,11 @@ namespace Ichni.RhythmGame
|
||||
}
|
||||
|
||||
OnDelete();
|
||||
|
||||
|
||||
//LogWindow.Log("Deleted element: " + elementName);
|
||||
|
||||
|
||||
EditorManager.instance.beatmapContainer.gameElementList.Remove(this); //从保存列表中剔除
|
||||
|
||||
|
||||
if (connectedTab != null)
|
||||
{
|
||||
Destroy(connectedTab.gameObject);
|
||||
@@ -176,27 +176,27 @@ namespace Ichni.RhythmGame
|
||||
GetAllChildrenRecursively(child, elements);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
List<GameElement> gameElements = new List<GameElement> { this };
|
||||
GetAllChildrenRecursively(this, gameElements);
|
||||
|
||||
if(!includeThis) gameElements.Remove(this);
|
||||
|
||||
if (!includeThis) gameElements.Remove(this);
|
||||
|
||||
return gameElements;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace Beatmap
|
||||
{
|
||||
[System.Serializable]
|
||||
public abstract class GameElement_BM : BaseElement_BM
|
||||
{
|
||||
[System.NonSerialized]
|
||||
[System.NonSerialized]
|
||||
public static Dictionary<Guid, GameElement_BM> identifier = new(); //存档类的标识符
|
||||
|
||||
[System.NonSerialized]
|
||||
|
||||
[System.NonSerialized]
|
||||
public GameElement matchedElement; //存档类对应的游戏物体
|
||||
|
||||
|
||||
public string elementName;
|
||||
public List<string> tags;
|
||||
public Guid elementGuid;
|
||||
@@ -223,17 +223,17 @@ namespace Ichni.RhythmGame
|
||||
{
|
||||
return element_BM;
|
||||
}
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public static GameElement GetElement(Guid id)
|
||||
{
|
||||
if(identifier.TryGetValue(id, out GameElement_BM element_BM))
|
||||
if (identifier.TryGetValue(id, out GameElement_BM element_BM))
|
||||
{
|
||||
return element_BM.matchedElement;
|
||||
}
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user