点击选中
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
|
||||
namespace Ichni.RhythmGame
|
||||
{
|
||||
public class SelectSubmodule : SubmoduleBase
|
||||
{
|
||||
private GameElement elementToSelect;
|
||||
|
||||
public SelectSubmodule(GameElement attachedGameElement, GameElement elementToSelect = null) : base(attachedGameElement)
|
||||
{
|
||||
(attachedGameElement as IHaveSelectSubmodule).selectSubmodule = this;
|
||||
(attachedGameElement).gameObject.layer = LayerMask.NameToLayer("Selectable");
|
||||
this.elementToSelect = elementToSelect == null ? attachedGameElement : elementToSelect;
|
||||
}
|
||||
|
||||
public void SelectGameElement()
|
||||
{
|
||||
Debug.Log(elementToSelect);
|
||||
EditorManager.instance.operationManager.ClearSelectedElements();
|
||||
EditorManager.instance.operationManager.AddSelectElement(elementToSelect);
|
||||
EditorManager.instance.uiManager.inspector.SetInspector(elementToSelect);
|
||||
EditorManager.instance.timeline.SetTimeLine(elementToSelect);
|
||||
}
|
||||
|
||||
public override void SaveBM()
|
||||
{
|
||||
//这个模块不需要存档
|
||||
}
|
||||
}
|
||||
|
||||
public interface IHaveSelectSubmodule
|
||||
{
|
||||
public SelectSubmodule selectSubmodule { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e91fffff157a0d543850b1ce45419ff8
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user