﻿using LudumUtils.Pausing;
using UnityEditor;
using UnityEngine;

namespace LudumUtils.Editor.Inspector {
    [CustomEditor(typeof(PauseMotor))]
    public class PauseMotorInspector : Inspector<PauseMotor> {
        protected override void OnInspectorGui(PauseMotor t) {
            if (Application.isPlaying) {
                if (GUILayout.Button(t.Paused ? "Unpause" : "Pause")) {
                    t.Paused = !t.Paused;
                }
            }

            DrawDefaultInspector();
        }
    }
}
