基础内容11 - SAVE LOAD EXPORT
This commit is contained in:
@@ -39,7 +39,7 @@ namespace Ichni.RhythmGame
|
||||
this.elementName = name;
|
||||
this.elementGuid = elementGuid;
|
||||
this.tags = tags;
|
||||
EditorManager.instance.elementList.Add(this);
|
||||
EditorManager.instance.beatmapContainer.gameElementList.Add(this);
|
||||
submoduleList = new List<SubmoduleBase>();
|
||||
if (isFirstGenerated)
|
||||
{
|
||||
@@ -123,7 +123,7 @@ namespace Ichni.RhythmGame
|
||||
#if UNITY_EDITOR
|
||||
Debug.Log("Delete " + elementName + "(" + elementGuid + ")");
|
||||
#endif
|
||||
EditorManager.instance.elementList.Remove(this); //从保存列表中剔除
|
||||
EditorManager.instance.beatmapContainer.gameElementList.Remove(this); //从保存列表中剔除
|
||||
this.parentElement.childElementList.Remove(this);
|
||||
Destroy(gameObject); //销毁
|
||||
}
|
||||
@@ -167,20 +167,19 @@ namespace Ichni.RhythmGame
|
||||
{
|
||||
return element_BM;
|
||||
}
|
||||
|
||||
Debug.LogAssertion("Element not found or do not have id");
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static GameElement GetElement(Guid id)
|
||||
{
|
||||
return GetElementBM(id)?.matchedElement;
|
||||
if(identifier.TryGetValue(id, out GameElement_BM element_BM))
|
||||
{
|
||||
return element_BM.matchedElement;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 从存档类中生成游戏物体
|
||||
/// </summary>
|
||||
public abstract void ExecuteBM();
|
||||
|
||||
/// <summary>
|
||||
/// 复制物体
|
||||
|
||||
Reference in New Issue
Block a user