using UnityEditor;
using UnityEngine;

namespace Shared.ScriptableVariables {
  //---------------------------------------------------------------------------
  [CustomEditor(typeof(IntGameEvent))]
  public class IntGameEventEditor : Editor {
    private int testValue = 0;

    //---------------------------------------------------------------------------
    public override void OnInspectorGUI() {
      base.OnInspectorGUI();

      EditorGUILayout.BeginHorizontal();
      testValue = EditorGUILayout.IntField("Test Value", testValue);
      if (GUILayout.Button("Fire Event")) {
        ((IntGameEvent)target).Raise(testValue);
      }
      EditorGUILayout.EndHorizontal();
    }
  }
}