sth
做了点功能 bug在冰花那张谱里
This commit is contained in:
@@ -9,14 +9,14 @@ namespace Ichni.Editor
|
||||
public class OperationManager
|
||||
{
|
||||
public GameElement currentSelectedElement { get; private set; }
|
||||
|
||||
|
||||
public CopyPasteDeleteModule CopyPasteDeleteModule;
|
||||
|
||||
|
||||
public OperationManager()
|
||||
{
|
||||
CopyPasteDeleteModule = new CopyPasteDeleteModule();
|
||||
}
|
||||
|
||||
|
||||
public void SelectElement(GameElement gameElement)
|
||||
{
|
||||
if (currentSelectedElement != null)
|
||||
@@ -30,7 +30,7 @@ namespace Ichni.Editor
|
||||
|
||||
currentSelectedElement = gameElement;
|
||||
currentSelectedElement.connectedTab.isSelected = true;
|
||||
currentSelectedElement.connectedTab.BgImage.color = new Color(0.5f,0.5f, 0.5f, 0.2f);
|
||||
currentSelectedElement.connectedTab.BgImage.color = new Color(0.5f, 0.5f, 0.5f, 0.2f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace Ichni.Editor
|
||||
LogWindow.Log("Copied element: " + gameElement.elementName);
|
||||
copiedElement = gameElement;
|
||||
}
|
||||
|
||||
|
||||
public void PasteElement(GameElement parentElement)
|
||||
{
|
||||
if (copiedElement == null)
|
||||
@@ -52,24 +52,25 @@ namespace Ichni.Editor
|
||||
LogWindow.Log("No element copied.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
LogWindow.Log("Pasted element: " + copiedElement.elementName + " to " + parentElement.elementName);
|
||||
pastedElementList = new List<GameElement>();
|
||||
AffiliatedPaste(copiedElement, parentElement);
|
||||
}
|
||||
|
||||
|
||||
public void DeleteElement(GameElement gameElement)
|
||||
{
|
||||
LogWindow.Log("Deleted element: " + gameElement.elementName + " and all its children.");
|
||||
|
||||
|
||||
if (gameElement.parentElement != null)
|
||||
{
|
||||
gameElement.parentElement.childElementList.Remove(gameElement); //从父物体的子物体列表中移除,避免报null
|
||||
gameElement.parentElement.connectedTab.childTabList.Remove(gameElement.connectedTab);
|
||||
}
|
||||
|
||||
gameElement.Delete();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 使用递归的方式复制粘贴物体及其所有子物体
|
||||
/// </summary>
|
||||
@@ -88,7 +89,7 @@ namespace Ichni.Editor
|
||||
submodule.SaveBM();
|
||||
(submodule.matchedBM as Submodule_BM).DuplicateBM(pastedElement);
|
||||
});
|
||||
|
||||
|
||||
if (gameElement.childElementList != null)
|
||||
{
|
||||
for (int i = 0; i < gameElement.childElementList.Count; i++)
|
||||
|
||||
Reference in New Issue
Block a user