using UnityEditor;
using UnityEngine;

using System.Collections;

[CustomEditor(typeof(Player))]
public class EditorPlayer : Editor 
{
    #region 变量

    private Player Script;

    #endregion

    private void OnEnable()
    {
        Script = (Player) target;
    }

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

        #region 换装操作

        if (GUILayout.Button("NextHead"))
        {
            Script.NextHead();
        }

        if (GUILayout.Button("PreviousHead"))
        {
            Script.PreviousHead();
        }

        if (GUILayout.Button("NextEye"))
        {
            Script.NextEye();
        }

        if (GUILayout.Button("PreviousEye"))
        {
            Script.PreviousEye();
        }

        if (GUILayout.Button("NextMouse"))
        {
            Script.NextMouse();
        }

        if (GUILayout.Button("PreviousMouse"))
        {
            Script.PreviousMouse();
        }

        if (GUILayout.Button("NextHeadWear"))
        {
            Script.NextHeadWear();
        }

        if (GUILayout.Button("PreviousHeadWear"))
        {
            Script.PreviousHeadWear();
        }

        if (GUILayout.Button("NextTop"))
        {
            Script.NextTop();
        }

        if (GUILayout.Button("PreviousTop"))
        {
            Script.PreviousTop();
        }

        if (GUILayout.Button("NextDress"))
        {
            Script.NextDress();
        }

        if (GUILayout.Button("PreviousDress"))
        {
            Script.PreviousDress();
        }

        if (GUILayout.Button("NextShoe"))
        {
            Script.NextShoe();
        }

        if (GUILayout.Button("PreviousShoe"))
        {
            Script.PreviousShoe();
        }

        #endregion
    }
}