34 lines
814 B
C#
34 lines
814 B
C#
using UnityEditor;
|
|
using UnityEngine;
|
|
|
|
namespace AibisDream
|
|
{
|
|
/// <summary>
|
|
/// 齿轮系统编辑器
|
|
/// </summary>
|
|
[CustomEditor(typeof(GearController))]
|
|
public class GearSystemEditor : Editor
|
|
{
|
|
public override void OnInspectorGUI()
|
|
{
|
|
DrawDefaultInspector();
|
|
GearController controller = (GearController)target;
|
|
|
|
GUILayout.Label("关卡编辑功能");
|
|
if (GUILayout.Button("添加一个齿轮轴"))
|
|
{
|
|
Debug.Log("添加齿轮轴");
|
|
}
|
|
|
|
if (GUILayout.Button("添加一个浮动的齿轮"))
|
|
{
|
|
Debug.Log("添加浮动齿轮");
|
|
}
|
|
|
|
GUILayout.Label("关卡加载/编辑");
|
|
|
|
}
|
|
}
|
|
}
|
|
|