using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using IHandlers;

namespace IHandlers
{
    #region 三大机制
    public interface IVelocity
    {
        Vector3 getOtherVelocity();
        float getOtherMass();

        float getOtherImpulseDamageRate()
        {
            return 1f;
        }
    }

    public interface IThermal
    {
        float getOtherThermal();
    }

    public interface IElectric
    {
        float getOtherElectric();
    }
    #endregion

    #region 基础系统
    public interface IBasicInfo
    {
        #region 基础信息
        float healt { get; set; }
        float enhanceAtrRate { get; set; }
        float enhanceSkiRate { get; set; }
        #endregion


        #region 机制参数
        float moveSpeed { get; set; }
        float thermalChangeRate { get; set; }
        float electricChangeRate { get; set; }
        #endregion
    }

    public interface IBasicDate
    {
        float getHealth();
        void setHealth(float health);

    }

    public interface ISkill
    {
        public string ISkillNameTag { get; set; }

        //初始化技能的 运行时参数
        virtual bool ISkillInitialize(GameObject sender)
        {
            ISkillNameTag = this.GetType().Name;
            return true;
        }
        void ISkillPlay();          //技能播放调用
        //void ISkillPause();         //技能暂停播放
        void ISkillInterrupt();     //技能中断
        void ISkillEnd();           //技能结束或被中断 进行回收
        bool ISkillBool();          //技能条件检测
    }

    //public interface IBuff
    //{
    //    void IBuffInitialize(GameObject sender);
    //    void IBuffPlay();
    //    void IBuffPause();
    //    void IBuffInterrupt();
    //    void IBuffEnd();
    //    bool IBuffBool(BuffTags tags = BuffTags.None, float value = 0);
    //}
    #endregion

    //#region 基础管理
    //public interface ITime
    //{
    //    float timeRate { get; set; }
    //    float _previousTime { get; set; }
    //    bool systemPause{ get; set; }

    //    public void Pause()
    //    {
    //        if(!systemPause)
    //        {
    //            systemPause = true;
    //            _previousTime = timeRate;
    //            timeRate = 0;
    //        }
    //    }

    //    public void Resume()
    //    {
    //        if(systemPause)
    //        {
    //            systemPause = false;
    //            timeRate = _previousTime;
    //        }
    //    }
    //}

    //#endregion

    #region 特殊设施
    public interface IMonGen
    {
        void IMonsterGenerate(GameObject theMonster);
        void IPreAnimation();
        GameObject GetGenerater();
        int IDoorPos();
    }

    public interface ISpawner
    {
        void ISpawn(GameObject thePlayer);
    }

    public interface IInstallation
    {
        void InstallInit();

    }


    #endregion

    #region 特殊类型
    public interface IBullet
    {
        public void IShoot(GameObject sender, Vector3 direction, float strength);
    }

    public interface IBossPart
    {
        public void IBossPartInit();
        public void IBossPartDestroy();
        public void IBossPartInterrupt();
        
    }
    #endregion
}



//#region 傻逼补丁 

//[CustomEditor(typeof(AgentUnit),true)]
//public class AgentITimeInspector : Editor
//{
//    ITime itimer;
//    public override void OnInspectorGUI()
//    {
//        //base.OnInspectorGUI();
//        itimer = target as ITime;
//        float nowTime = EditorGUILayout.FloatField("TimeRate", itimer.timeRate);
//        EditorGUILayout.FloatField("Previous", itimer._previousTime);
//        EditorGUILayout.Toggle("SystemPause", itimer.systemPause);
//        if(itimer.timeRate != nowTime)
//        {
//            itimer.timeRate = nowTime;
//        }
//        base.DrawDefaultInspector();
//    }
//}

//[CustomEditor(typeof(WeaponBallAgent), true)]
//public class BallITimeInspector : Editor
//{
//    ITime itimer;
//    public override void OnInspectorGUI()
//    {
//        //base.OnInspectorGUI();
//        itimer = target as ITime;
//        float nowTime = EditorGUILayout.FloatField("TimeRate", itimer.timeRate);
//        EditorGUILayout.FloatField("Previous", itimer._previousTime);
//        EditorGUILayout.Toggle("SystemPause", itimer.systemPause);
//        if (itimer.timeRate != nowTime)
//        {
//            itimer.timeRate = nowTime;
//        }
//        base.DrawDefaultInspector();
//    }
//}
//#endregion