Mappp
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
[CustomEditor(typeof(MapTargetController))]
|
||||
public sealed class MapTargetControllerEditor : Editor
|
||||
{
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
DrawDefaultInspector();
|
||||
EditorGUILayout.Space();
|
||||
|
||||
using (new EditorGUI.DisabledScope(!Application.isPlaying))
|
||||
{
|
||||
if (GUILayout.Button("Start Next Wave"))
|
||||
((MapTargetController)target).StartNextWave();
|
||||
}
|
||||
|
||||
if (!Application.isPlaying)
|
||||
{
|
||||
EditorGUILayout.HelpBox(
|
||||
"Start Next Wave becomes available in Play Mode.",
|
||||
MessageType.Info);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user