Esempio n. 1
0
    public override void OnInspectorGUI()
    {
        selectSprite = image.sprite;
        string assetPath = AssetDatabase.GetAssetPath(selectSprite);
        string assetName = Path.GetFileNameWithoutExtension(assetPath);

        currentSelect = EditorGUILayout.IntPopup("语言", currentSelect, languageType, EnumTables.GetSequentialArray(languageType.Length));

        if (assetPath.Contains(LocalizeImagePath))
        {
            t.key = assetName;
            EditorGUILayout.LabelField("Key", t.key);
        }
        else
        {
            EditorGUILayout.HelpBox("请从" + LocalizeImagePath + "文件夹里选择相应的文件", MessageType.Error);
        }

        if (lastSelect == -1)
        {
            lastSelect = currentSelect;
        }
        if (lastSelect != currentSelect)
        {
            lastSelect = currentSelect;
            //selectSprite = AssetDatabase.LoadAssetAtPath<Sprite>(LocalizeImagePath +"/"+ languageType[currentSelect] + "/" + assetName);
            selectSprite = Resources.Load <Sprite>("LocalizedImage/" + languageType[currentSelect] + "/" + assetName);
        }
        image.sprite = EditorGUILayout.ObjectField("图片", selectSprite, typeof(Sprite), false) as Sprite;
        EditorUtility.SetDirty(image);
    }
Esempio n. 2
0
        public override void OnInspectorGUI()
        {
            Rect blockLabelRect = new Rect(120, 5, 120, 55);

            EditorGUI.LabelField(blockLabelRect, new GUIContent("章节"), RPGEditorGUI.Head1Style);

            if (chapter.Icon != null)
            {
                EditorGUI.DrawPreviewTexture(new Rect(5, 5, 37, 37), chapter.Icon.texture);
            }

            chapter.CommonProperty.ID          = EditorGUILayout.IntField(guiContent_ID, chapter.CommonProperty.ID);
            chapter.CommonProperty.Name        = EditorGUILayout.TextField(guiContent_Name, chapter.CommonProperty.Name);
            chapter.CommonProperty.Description = EditorGUILayout.TextField(guiContent_Desc, chapter.CommonProperty.Description);

            chapter.Icon           = (Sprite)EditorGUILayout.ObjectField("图标", chapter.Icon, typeof(Sprite), false);
            chapter.TeamIndex      = EditorGUILayout.IntSlider("所属队伍", chapter.TeamIndex, 0, ConstTable.TEAM_COUNT - 1);
            chapter.MaxPlayerCount = EditorGUILayout.IntSlider("最大出场人数", chapter.MaxPlayerCount, 1, ConstTable.CONST_MAX_BATTLE_PLAYER_COUNT);
            string[] displayPlayerNames = RPGData.PlayerNameList.ToArray();
            int[]    valuePlayerNames   = EnumTables.GetSequentialArray(RPGData.PlayerNameList.Count);
            RPGEditorGUI.DynamicArrayView(ref forceInvolveCount, ref chapter.ForceInvolve, "强制出场人数", "强制出场人物", displayPlayerNames, valuePlayerNames, chapter.MaxPlayerCount);

            chapter.Weather     = (EnumWeather)EditorGUILayout.EnumPopup("默认天气", chapter.Weather);
            chapter.Preparation = EditorGUILayout.Toggle("是否有准备画面", chapter.Preparation);
            chapter.BrokeWallHP = EditorGUILayout.IntField("破坏墙壁的HP", chapter.BrokeWallHP);
            WinConditionInspectorGUI(chapter.WinCondition);
            FailConditionInspectorGUI(chapter.FailCondition);

            foldout_BGM = EditorGUILayout.Foldout(foldout_BGM, "BGM设定");
            if (foldout_BGM)
            {
                for (int i = 0; i < bgmType.Length; i++)
                {
                    chapter.BGMSetting[i] = EditorGUILayout.IntPopup(bgmType[i], chapter.BGMSetting[i], AudioPreviewWindow.BGMList, EnumTables.GetSequentialArray(AudioPreviewWindow.BGMList.Length));
                }
            }
            RPGEditorGUI.DynamicArrayView(ref weaponRoomCount, ref chapter.WeaponRoom, "武器屋", "武器", RPGData.WeaponNameList.ToArray(), EnumTables.GetSequentialArray(RPGData.WeaponNameList.Count));
            RPGEditorGUI.DynamicArrayView(ref propRoomCount, ref chapter.PropRoom, "道具屋", "道具", RPGData.PropNameList.ToArray(), EnumTables.GetSequentialArray(RPGData.PropNameList.Count));

            chapter.Event = (SLGChapter)EditorGUILayout.ObjectField("章节事件", chapter.Event, typeof(SLGChapter), false);

            if (GUI.changed)
            {
                EditorUtility.SetDirty(target);
            }
        }
Esempio n. 3
0
        void ShowEnemyDefContent()
        {
            if (ActiveEnemyDef == null)
            {
                return;
            }

            unit.Enemy = ActiveEnemyDef;
            EditorGUILayout.BeginVertical();
            EditorGUILayout.BeginHorizontal(GUILayout.MaxWidth(300));
            {
                EditorGUILayout.LabelField("坐标", GUILayout.Width(50));
                unit.Coord.x = EditorGUILayout.IntField("x", unit.Coord.x, GUILayout.MaxWidth(200));
                unit.Coord.y = EditorGUILayout.IntField("y", unit.Coord.y, GUILayout.MaxWidth(200));
            }
            EditorGUILayout.EndHorizontal();
            EditorGUI.BeginDisabledGroup(true);
            unit.Enemy.CommonProperty.ID          = EditorGUILayout.IntField("人物ID", unit.Enemy.CommonProperty.ID);
            unit.Enemy.CommonProperty.Name        = EditorGUILayout.TextField("人物名称", unit.Enemy.CommonProperty.Name);
            unit.Enemy.CommonProperty.Description = EditorGUILayout.TextField("人物描述", unit.Enemy.CommonProperty.Description);

            unit.Enemy.PlayerDef.Portrait            = (Sprite)EditorGUILayout.ObjectField("图标", unit.Enemy.PlayerDef.Portrait, typeof(Sprite), false);
            unit.Enemy.PlayerDef.BattleModel         = EditorGUILayout.ObjectField("人物模型", unit.Enemy.PlayerDef.BattleModel, typeof(GameObject), true) as GameObject;
            unit.Enemy.PlayerDef.CharacterImportance = (EnumCharacterImportance)EditorGUILayout.EnumPopup("重要性", unit.Enemy.PlayerDef.CharacterImportance);
            unit.Enemy.PlayerDef.Career       = EditorGUILayout.IntPopup("职业", unit.Enemy.PlayerDef.Career, RPGData.CareerNameList.ToArray(), EnumTables.GetSequentialArray(RPGData.CareerNameList.Count));
            unit.Enemy.PlayerDef.DefaultLevel = EditorGUILayout.IntSlider("初始等级", unit.Enemy.PlayerDef.DefaultLevel, 1, 40);

            unit.Enemy.PlayerDef.DefaultAttribute.HP              = EditorGUILayout.IntSlider("HP", unit.Enemy.PlayerDef.DefaultAttribute.HP, 0, RPGEditorGlobal.MAX_ATTRIBUTE_HP);
            unit.Enemy.PlayerDef.DefaultAttribute.PhysicalPower   = EditorGUILayout.IntSlider("物理攻击", unit.Enemy.PlayerDef.DefaultAttribute.PhysicalPower, 0, RPGEditorGlobal.MAX_ATTRIBUTE_MISC);
            unit.Enemy.PlayerDef.DefaultAttribute.MagicalPower    = EditorGUILayout.IntSlider("魔法攻击", unit.Enemy.PlayerDef.DefaultAttribute.MagicalPower, 0, RPGEditorGlobal.MAX_ATTRIBUTE_MISC);
            unit.Enemy.PlayerDef.DefaultAttribute.Skill           = EditorGUILayout.IntSlider("技术", unit.Enemy.PlayerDef.DefaultAttribute.Skill, 0, RPGEditorGlobal.MAX_ATTRIBUTE_MISC);
            unit.Enemy.PlayerDef.DefaultAttribute.Speed           = EditorGUILayout.IntSlider("速度", unit.Enemy.PlayerDef.DefaultAttribute.Speed, 0, RPGEditorGlobal.MAX_ATTRIBUTE_MISC);
            unit.Enemy.PlayerDef.DefaultAttribute.Intel           = EditorGUILayout.IntSlider("智力", unit.Enemy.PlayerDef.DefaultAttribute.Intel, 0, RPGEditorGlobal.MAX_ATTRIBUTE_MISC);
            unit.Enemy.PlayerDef.DefaultAttribute.PhysicalDefense = EditorGUILayout.IntSlider("物理防御", unit.Enemy.PlayerDef.DefaultAttribute.PhysicalDefense, 0, RPGEditorGlobal.MAX_ATTRIBUTE_MISC);
            unit.Enemy.PlayerDef.DefaultAttribute.MagicalDefense  = EditorGUILayout.IntSlider("魔法防御", unit.Enemy.PlayerDef.DefaultAttribute.MagicalDefense, 0, RPGEditorGlobal.MAX_ATTRIBUTE_MISC);
            unit.Enemy.PlayerDef.DefaultAttribute.BodySize        = EditorGUILayout.IntSlider("体格", unit.Enemy.PlayerDef.DefaultAttribute.BodySize, 0, RPGEditorGlobal.MAX_ATTRIBUTE_MISC);
            unit.Enemy.PlayerDef.DefaultAttribute.Movement        = EditorGUILayout.IntSlider("移动", unit.Enemy.PlayerDef.DefaultAttribute.Movement, 0, RPGEditorGlobal.MAX_ATTRIBUTE_MOVEMENT);
            EditorGUI.BeginDisabledGroup(true);
            EditorGUILayout.EndVertical();
        }
Esempio n. 4
0
        public override void OnInspectorGUI()
        {
            base.OnInspectorGUI();

            /*Rect blockLabelRect = new Rect(60, 5, 120, 55);
             * EditorGUI.LabelField(blockLabelRect, new GUIContent("人物"), RPGEditorGUI.Head1Style);
             *
             * if (player.Portrait != null)
             *  EditorGUI.DrawPreviewTexture(new Rect(5, 5, 37, 37), player.Portrait.texture);
             *
             * player.CommonProperty.ID = EditorGUILayout.IntField(guiContent_ID, player.CommonProperty.ID);
             * player.CommonProperty.Name = EditorGUILayout.TextField(guiContent_Name, player.CommonProperty.Name);
             * player.CommonProperty.Description = EditorGUILayout.TextField(guiContent_Desc, player.CommonProperty.Description);
             *
             * player.Portrait = (Sprite)EditorGUILayout.ObjectField("图标", player.Portrait, typeof(Sprite), false);
             * player.BattleModel = EditorGUILayout.ObjectField("人物模型", player.BattleModel, typeof(GameObject), true) as GameObject;
             * player.CharacterImportance = (EnumCharacterImportance)EditorGUILayout.EnumPopup("重要性", player.CharacterImportance);
             * player.Career = EditorGUILayout.IntPopup("职业", player.Career, RPGData.CareerNameList.ToArray(), EnumTables.GetSequentialArray(RPGData.CareerNameList.Count));
             * player.DefaultLevel = EditorGUILayout.IntSlider("初始等级", player.DefaultLevel, 1, 40);
             *
             * foldout_Attribute = EditorGUILayout.Foldout(foldout_Attribute, "初始属性");
             * if (foldout_Attribute)
             * {
             *  EditorGUILayout.BeginHorizontal(GUILayout.MaxWidth(Screen.width - 16));
             *  EditorGUILayout.Space();
             *  EditorGUILayout.BeginVertical();
             *
             *  player.DefaultAttribute.HP = EditorGUILayout.IntSlider("HP", player.DefaultAttribute.HP, 0, RPGEditorGlobal.MAX_ATTRIBUTE_HP);
             *  player.DefaultAttribute.PhysicalPower = EditorGUILayout.IntSlider("物理攻击", player.DefaultAttribute.PhysicalPower, 0, RPGEditorGlobal.MAX_ATTRIBUTE_MISC);
             *  player.DefaultAttribute.MagicalPower = EditorGUILayout.IntSlider("魔法攻击", player.DefaultAttribute.MagicalPower, 0, RPGEditorGlobal.MAX_ATTRIBUTE_MISC);
             *  player.DefaultAttribute.Skill = EditorGUILayout.IntSlider("技术", player.DefaultAttribute.Skill, 0, RPGEditorGlobal.MAX_ATTRIBUTE_MISC);
             *  player.DefaultAttribute.Speed = EditorGUILayout.IntSlider("速度", player.DefaultAttribute.Speed, 0, RPGEditorGlobal.MAX_ATTRIBUTE_MISC);
             *  player.DefaultAttribute.Lucky = EditorGUILayout.IntSlider("智力", player.DefaultAttribute.Lucky, 0, RPGEditorGlobal.MAX_ATTRIBUTE_MISC);
             *  player.DefaultAttribute.PhysicalDefense = EditorGUILayout.IntSlider("物理防御", player.DefaultAttribute.PhysicalDefense, 0, RPGEditorGlobal.MAX_ATTRIBUTE_MISC);
             *  player.DefaultAttribute.MagicalDefense = EditorGUILayout.IntSlider("魔法防御", player.DefaultAttribute.MagicalDefense, 0, RPGEditorGlobal.MAX_ATTRIBUTE_MISC);
             *  player.DefaultAttribute.Movement = EditorGUILayout.IntSlider("移动", player.DefaultAttribute.Movement, 0, RPGEditorGlobal.MAX_ATTRIBUTE_MOVEMENT);
             *
             *  EditorGUILayout.EndVertical();
             *  EditorGUILayout.EndHorizontal();
             * }*/

            foldout_AttributeGrow = EditorGUILayout.Foldout(foldout_AttributeGrow, "成长率");
            if (foldout_Attribute)
            {
                EditorGUILayout.BeginHorizontal(GUILayout.MaxWidth(Screen.width - 16));
                EditorGUILayout.Space();
                EditorGUILayout.BeginVertical();

                player.DefaultAttributeGrow.HP              = EditorGUILayout.IntSlider("HP", player.DefaultAttributeGrow.HP, 0, RPGEditorGlobal.MAX_ATTRIBUTE_HP);
                player.DefaultAttributeGrow.PhysicalPower   = EditorGUILayout.IntSlider("物理攻击", player.DefaultAttributeGrow.PhysicalPower, 0, RPGEditorGlobal.MAX_ATTRIBUTE_MISC);
                player.DefaultAttributeGrow.MagicalPower    = EditorGUILayout.IntSlider("魔法攻击", player.DefaultAttributeGrow.MagicalPower, 0, RPGEditorGlobal.MAX_ATTRIBUTE_MISC);
                player.DefaultAttributeGrow.Skill           = EditorGUILayout.IntSlider("技术", player.DefaultAttributeGrow.Skill, 0, RPGEditorGlobal.MAX_ATTRIBUTE_MISC);
                player.DefaultAttributeGrow.Speed           = EditorGUILayout.IntSlider("速度", player.DefaultAttributeGrow.Speed, 0, RPGEditorGlobal.MAX_ATTRIBUTE_MISC);
                player.DefaultAttributeGrow.Intel           = EditorGUILayout.IntSlider("智力", player.DefaultAttributeGrow.Intel, 0, RPGEditorGlobal.MAX_ATTRIBUTE_MISC);
                player.DefaultAttributeGrow.PhysicalDefense = EditorGUILayout.IntSlider("物理防御", player.DefaultAttributeGrow.PhysicalDefense, 0, RPGEditorGlobal.MAX_ATTRIBUTE_MISC);
                player.DefaultAttributeGrow.MagicalDefense  = EditorGUILayout.IntSlider("魔法防御", player.DefaultAttributeGrow.MagicalDefense, 0, RPGEditorGlobal.MAX_ATTRIBUTE_MISC);
                player.DefaultAttributeGrow.BodySize        = EditorGUILayout.IntSlider("体格", player.DefaultAttributeGrow.BodySize, 0, RPGEditorGlobal.MAX_ATTRIBUTE_MISC);
                player.DefaultAttributeGrow.Movement        = EditorGUILayout.IntSlider("移动", player.DefaultAttributeGrow.Movement, 0, RPGEditorGlobal.MAX_ATTRIBUTE_MOVEMENT);

                EditorGUILayout.EndVertical();
                EditorGUILayout.EndHorizontal();
            }
            RPGEditorGUI.DynamicArrayView(ref weaponCount, ref player.DefaultWeapons, "初始武器", "武器", RPGData.WeaponNameList.ToArray(), EnumTables.GetSequentialArray(RPGData.WeaponNameList.Count), 5);
            RPGEditorGUI.DynamicArrayView(ref skillCount, ref player.DefaultSkills, "初始技能", "技能", 10);

            player.DeadSpeech  = EditorGUILayout.TextField("战败话语", player.DeadSpeech);
            player.LeaveSpeech = EditorGUILayout.TextField("战败话语", player.LeaveSpeech);

            if (GUI.changed)
            {
                EditorUtility.SetDirty(target);
            }
        }
Esempio n. 5
0
        public override void OnGUI(PlayerDef Data)
        {
            base.OnGUI(Data);

            foldout_AttributeGrow = EditorGUILayout.Foldout(foldout_AttributeGrow, "成长率");
            if (foldout_Attribute)
            {
                EditorGUILayout.BeginHorizontal(GUILayout.MaxWidth(Screen.width - 16));
                EditorGUILayout.Space();
                EditorGUILayout.BeginVertical();

                Data.DefaultAttributeGrow.HP              = EditorGUILayout.IntSlider("HP", Data.DefaultAttributeGrow.HP, 0, RPGEditorGlobal.MAX_ATTRIBUTE_HP);
                Data.DefaultAttributeGrow.PhysicalPower   = EditorGUILayout.IntSlider("物理攻击", Data.DefaultAttributeGrow.PhysicalPower, 0, RPGEditorGlobal.MAX_ATTRIBUTE_MISC);
                Data.DefaultAttributeGrow.MagicalPower    = EditorGUILayout.IntSlider("魔法攻击", Data.DefaultAttributeGrow.MagicalPower, 0, RPGEditorGlobal.MAX_ATTRIBUTE_MISC);
                Data.DefaultAttributeGrow.Skill           = EditorGUILayout.IntSlider("技术", Data.DefaultAttributeGrow.Skill, 0, RPGEditorGlobal.MAX_ATTRIBUTE_MISC);
                Data.DefaultAttributeGrow.Speed           = EditorGUILayout.IntSlider("速度", Data.DefaultAttributeGrow.Speed, 0, RPGEditorGlobal.MAX_ATTRIBUTE_MISC);
                Data.DefaultAttributeGrow.Intel           = EditorGUILayout.IntSlider("智力", Data.DefaultAttributeGrow.Intel, 0, RPGEditorGlobal.MAX_ATTRIBUTE_MISC);
                Data.DefaultAttributeGrow.PhysicalDefense = EditorGUILayout.IntSlider("物理防御", Data.DefaultAttributeGrow.PhysicalDefense, 0, RPGEditorGlobal.MAX_ATTRIBUTE_MISC);
                Data.DefaultAttributeGrow.MagicalDefense  = EditorGUILayout.IntSlider("魔法防御", Data.DefaultAttributeGrow.MagicalDefense, 0, RPGEditorGlobal.MAX_ATTRIBUTE_MISC);
                Data.DefaultAttributeGrow.BodySize        = EditorGUILayout.IntSlider("体格", Data.DefaultAttributeGrow.BodySize, 0, RPGEditorGlobal.MAX_ATTRIBUTE_MISC);
                Data.DefaultAttributeGrow.Movement        = EditorGUILayout.IntSlider("移动", Data.DefaultAttributeGrow.Movement, 0, RPGEditorGlobal.MAX_ATTRIBUTE_MOVEMENT);

                EditorGUILayout.EndVertical();
                EditorGUILayout.EndHorizontal();
            }
            RPGEditorGUI.DynamicArrayView(ref weaponCount, ref Data.DefaultWeapons, "初始武器", "武器", RPGData.WeaponNameList.ToArray(), EnumTables.GetSequentialArray(RPGData.WeaponNameList.Count), 5);
            RPGEditorGUI.DynamicArrayView(ref skillCount, ref Data.DefaultSkills, "初始技能", "技能", 10);

            Data.DeadSpeech  = EditorGUILayout.TextField("战败话语", Data.DeadSpeech);
            Data.LeaveSpeech = EditorGUILayout.TextField("战败话语", Data.LeaveSpeech);
        }
Esempio n. 6
0
        public override void OnInspectorGUI()
        {
            SetTalkPortraitListCount();
            Rect blockLabelRect = new Rect(60, 5, 120, 55);

            EditorGUI.LabelField(blockLabelRect, new GUIContent("人物"), RPGEditorGUI.Head1Style);

            if (character.Portrait != null)
            {
                EditorGUI.DrawPreviewTexture(new Rect(5, 5, 37, 37), character.Portrait.texture);
            }
            character.CommonProperty.ID          = EditorGUILayout.IntField(guiContent_ID, character.CommonProperty.ID);
            character.CommonProperty.Name        = EditorGUILayout.TextField(guiContent_Name, character.CommonProperty.Name);
            character.CommonProperty.Description = EditorGUILayout.TextField(guiContent_Desc, character.CommonProperty.Description);

            character.Portrait            = (Sprite)EditorGUILayout.ObjectField("图标", character.Portrait, typeof(Sprite), false);
            character.BattleModel         = EditorGUILayout.ObjectField("人物模型", character.BattleModel, typeof(GameObject), true) as GameObject;
            character.CharacterImportance = (EnumCharacterImportance)EditorGUILayout.EnumPopup("重要性", character.CharacterImportance);
            character.Career       = EditorGUILayout.IntPopup("职业", character.Career, RPGData.CareerNameList.ToArray(), EnumTables.GetSequentialArray(RPGData.CareerNameList.Count));
            character.DefaultLevel = EditorGUILayout.IntSlider("初始等级", character.DefaultLevel, 1, 40);

            foldout_Attribute = EditorGUILayout.Foldout(foldout_Attribute, "初始属性");
            if (foldout_Attribute)
            {
                EditorGUILayout.BeginHorizontal(GUILayout.MaxWidth(Screen.width - 16));
                EditorGUILayout.Space();
                EditorGUILayout.BeginVertical();

                character.DefaultAttribute.HP              = EditorGUILayout.IntSlider("HP", character.DefaultAttribute.HP, 20, RPGEditorGlobal.MAX_ATTRIBUTE_HP);
                character.DefaultAttribute.PhysicalPower   = EditorGUILayout.IntSlider("物理攻击", character.DefaultAttribute.PhysicalPower, 1, RPGEditorGlobal.MAX_ATTRIBUTE_MISC);
                character.DefaultAttribute.MagicalPower    = EditorGUILayout.IntSlider("魔法攻击", character.DefaultAttribute.MagicalPower, 1, RPGEditorGlobal.MAX_ATTRIBUTE_MISC);
                character.DefaultAttribute.Skill           = EditorGUILayout.IntSlider("技术", character.DefaultAttribute.Skill, 1, RPGEditorGlobal.MAX_ATTRIBUTE_MISC);
                character.DefaultAttribute.Speed           = EditorGUILayout.IntSlider("速度", character.DefaultAttribute.Speed, 1, RPGEditorGlobal.MAX_ATTRIBUTE_MISC);
                character.DefaultAttribute.Intel           = EditorGUILayout.IntSlider("智力", character.DefaultAttribute.Intel, 1, RPGEditorGlobal.MAX_ATTRIBUTE_MISC);
                character.DefaultAttribute.PhysicalDefense = EditorGUILayout.IntSlider("物理防御", character.DefaultAttribute.PhysicalDefense, 1, RPGEditorGlobal.MAX_ATTRIBUTE_MISC);
                character.DefaultAttribute.MagicalDefense  = EditorGUILayout.IntSlider("魔法防御", character.DefaultAttribute.MagicalDefense, 1, RPGEditorGlobal.MAX_ATTRIBUTE_MISC);
                character.DefaultAttribute.BodySize        = EditorGUILayout.IntSlider("体格", character.DefaultAttribute.BodySize, 1, RPGEditorGlobal.MAX_ATTRIBUTE_MISC);
                character.DefaultAttribute.Movement        = EditorGUILayout.IntSlider("移动", character.DefaultAttribute.Movement, 1, RPGEditorGlobal.MAX_ATTRIBUTE_MOVEMENT);

                EditorGUILayout.EndVertical();
                EditorGUILayout.EndHorizontal();
            }
            for (int i = 0; i < TALK_PORTRAIT_COUNT; i++)
            {
                character.TalkPortrait[i] = (Sprite)EditorGUILayout.ObjectField("对话头像:" + i, character.Portrait, typeof(Sprite), false);
            }
            if (GUI.changed)
            {
                EditorUtility.SetDirty(target);
            }
        }
Esempio n. 7
0
        public override void OnGUI(T Data)
        {
            if (Data.TalkPortrait == null)
            {
                Data.TalkPortrait = new System.Collections.Generic.List <Sprite>();
            }
            int x = TALK_PORTRAIT_COUNT - Data.TalkPortrait.Count;

            for (int i = 0; i < x; i++)
            {
                Data.TalkPortrait.Add(null);
            }
            Data.CommonProperty.ID          = EditorGUILayout.IntField("ID", Data.CommonProperty.ID);
            Data.CommonProperty.Name        = EditorGUILayout.TextField("Name", Data.CommonProperty.Name);
            Data.CommonProperty.Description = EditorGUILayout.TextField("描述", Data.CommonProperty.Description);

            Data.Portrait            = (Sprite)EditorGUILayout.ObjectField("图标", Data.Portrait, typeof(Sprite), false);
            Data.BattleModel         = EditorGUILayout.ObjectField("人物模型", Data.BattleModel, typeof(GameObject), true) as GameObject;
            Data.CharacterImportance = (EnumCharacterImportance)EditorGUILayout.EnumPopup("重要性", Data.CharacterImportance);
            Data.Career       = EditorGUILayout.IntPopup("职业", Data.Career, DataBaseWindow.CareerNameList.ToArray(), EnumTables.GetSequentialArray(DataBaseWindow.CareerNameList.Count));
            Data.DefaultLevel = EditorGUILayout.IntSlider("初始等级", Data.DefaultLevel, 1, 40);

            foldout_Attribute = EditorGUILayout.Foldout(foldout_Attribute, "初始属性");
            if (foldout_Attribute)
            {
                EditorGUILayout.BeginHorizontal(GUILayout.MaxWidth(Screen.width - 16));
                EditorGUILayout.Space();
                EditorGUILayout.BeginVertical();

                Data.DefaultAttribute.HP              = EditorGUILayout.IntSlider("HP", Data.DefaultAttribute.HP, 20, RPGEditorGlobal.MAX_ATTRIBUTE_HP);
                Data.DefaultAttribute.PhysicalPower   = EditorGUILayout.IntSlider("物理攻击", Data.DefaultAttribute.PhysicalPower, 1, RPGEditorGlobal.MAX_ATTRIBUTE_MISC);
                Data.DefaultAttribute.MagicalPower    = EditorGUILayout.IntSlider("魔法攻击", Data.DefaultAttribute.MagicalPower, 1, RPGEditorGlobal.MAX_ATTRIBUTE_MISC);
                Data.DefaultAttribute.Skill           = EditorGUILayout.IntSlider("技术", Data.DefaultAttribute.Skill, 1, RPGEditorGlobal.MAX_ATTRIBUTE_MISC);
                Data.DefaultAttribute.Speed           = EditorGUILayout.IntSlider("速度", Data.DefaultAttribute.Speed, 1, RPGEditorGlobal.MAX_ATTRIBUTE_MISC);
                Data.DefaultAttribute.Intel           = EditorGUILayout.IntSlider("智力", Data.DefaultAttribute.Intel, 1, RPGEditorGlobal.MAX_ATTRIBUTE_MISC);
                Data.DefaultAttribute.PhysicalDefense = EditorGUILayout.IntSlider("物理防御", Data.DefaultAttribute.PhysicalDefense, 1, RPGEditorGlobal.MAX_ATTRIBUTE_MISC);
                Data.DefaultAttribute.MagicalDefense  = EditorGUILayout.IntSlider("魔法防御", Data.DefaultAttribute.MagicalDefense, 1, RPGEditorGlobal.MAX_ATTRIBUTE_MISC);
                Data.DefaultAttribute.BodySize        = EditorGUILayout.IntSlider("体格", Data.DefaultAttribute.BodySize, 1, RPGEditorGlobal.MAX_ATTRIBUTE_MISC);
                Data.DefaultAttribute.Movement        = EditorGUILayout.IntSlider("移动", Data.DefaultAttribute.Movement, 4, RPGEditorGlobal.MAX_ATTRIBUTE_MOVEMENT);

                EditorGUILayout.EndVertical();
                EditorGUILayout.EndHorizontal();
            }
            for (int i = 0; i < TALK_PORTRAIT_COUNT; i++)
            {
                Data.TalkPortrait[i] = (Sprite)EditorGUILayout.ObjectField("对话头像:" + i, Data.Portrait, typeof(Sprite), false);
            }
        }
Esempio n. 8
0
 public override void OnInspectorGUI()
 {
     _target.Camp  = (EnumCharacterCamp)EditorGUILayout.EnumPopup("阵营", _target.Camp);
     _target.ID    = EditorGUILayout.IntField("人物ID", _target.ID);
     _target.Coord = EditorGUILayout.Vector2IntField("坐标", _target.Coord);
     if (_target.Camp == EnumCharacterCamp.Enemy)
     {
         RPGEditorGUI.DynamicArrayView(ref weaponCount, ref _target.Items, "初始武器", "武器", RPGData.WeaponNameList.ToArray(), EnumTables.GetSequentialArray(RPGData.WeaponNameList.Count), 5);
     }
     _target.UseDefaultAttribute = EditorGUILayout.Toggle("使用默认属性", _target.UseDefaultAttribute);
     if (!_target.UseDefaultAttribute)
     {
         CharacterDefEditor.CharacterAttributeInspector(ref _target.Attribute, ref foldOut);
     }
     if (GUI.changed)
     {
         serializedObject.ApplyModifiedProperties();
     }
 }
Esempio n. 9
0
        void RefreshTilePropertyEditor(int x, int y)
        {
            if (CurrentTileAttribute == null)
            {
                RefreshTileSelectInfo(0, 0);
            }
            int id = y * TILESET_W + x;

            CurrentTileAttribute.CommonProperty.ID = id;

            GUILayout.BeginArea(new Rect(350, 0, 300, 600));

            EditorGUILayout.LabelField("ID:" + CurrentTileAttribute.CommonProperty.ID);
            CurrentTileAttribute.CommonProperty.Name = EditorGUILayout.TextField("名称", CurrentTileAttribute.CommonProperty.Name);
            CurrentTileAttribute.Avoid = EditorGUILayout.IntSlider("回避", CurrentTileAttribute.Avoid, 0, 10);

            CurrentTileAttribute.PhysicalDefense = EditorGUILayout.IntSlider("防御", CurrentTileAttribute.PhysicalDefense, 0, 10);
            CurrentTileAttribute.MagicalDefense  = EditorGUILayout.IntSlider("魔防", CurrentTileAttribute.MagicalDefense, 0, 10);

            CurrentTileAttribute.Recover            = EditorGUILayout.IntSlider("恢复比例", CurrentTileAttribute.Recover, 0, 100);
            CurrentTileAttribute.BattleBackgroundID = EditorGUILayout.IntPopup("战斗背景", CurrentTileAttribute.BattleBackgroundID, new string[] { "草原", "冰川", "草屋" }, EnumTables.GetSequentialArray(3));;

            EditorGUILayout.BeginHorizontal();
            GUILayout.Box("移动消耗");
            GUILayout.Space(20);
            if (GUILayout.Button("全部不可通行", GUILayout.Width(80)))
            {
                for (int i = 0; i < tileEnableTable.Length; i++)
                {
                    tileEnableTable[i]             = false;
                    CurrentTileAttribute.PassDown  = false;
                    CurrentTileAttribute.PassUp    = false;
                    CurrentTileAttribute.PassLeft  = false;
                    CurrentTileAttribute.PassRight = false;
                }
            }
            if (GUILayout.Button("全部可以通行", GUILayout.Width(80)))
            {
                for (int i = 0; i < tileEnableTable.Length; i++)
                {
                    tileEnableTable[i] = true;
                    CurrentTileAttribute.MovementConsume[i] = 1;
                    CurrentTileAttribute.PassDown           = true;
                    CurrentTileAttribute.PassUp             = true;
                    CurrentTileAttribute.PassLeft           = true;
                    CurrentTileAttribute.PassRight          = true;
                }
            }
            EditorGUILayout.EndHorizontal();
            EditorGUILayout.BeginHorizontal(GUILayout.MaxWidth(Screen.width - 16));
            EditorGUILayout.Space();
            EditorGUILayout.BeginVertical();

            for (int i = 0; i < TileSeriesCount; i++)
            {
                EditorGUILayout.BeginHorizontal();
                tileEnableTable[i] = EditorGUILayout.Toggle(TileSeries[i], tileEnableTable[i]);
                if (tileEnableTable[i])
                {
                    if (CurrentTileAttribute.MovementConsume[i] < 1)
                    {
                        CurrentTileAttribute.MovementConsume[i] = 1;
                    }
                    CurrentTileAttribute.MovementConsume[i] = EditorGUILayout.IntSlider(CurrentTileAttribute.MovementConsume[i], 1, 8);
                }
                else
                {
                    CurrentTileAttribute.MovementConsume[i] = 100;
                }
                EditorGUILayout.EndHorizontal();
            }
            EditorGUILayout.EndHorizontal();
            EditorGUILayout.EndVertical();

            EditorGUILayout.HelpBox("通行方向,蓝底背景表示可以从这个方向通过这个块", MessageType.None);

            EditorGUILayout.BeginVertical(RPGEditorGUI.BoxStyle, GUILayout.Width(100));

            EditorGUILayout.BeginHorizontal();
            {
                GUILayout.FlexibleSpace();
                if (GUILayout.Button(RPGEditorGUI.Icon_Arrow2_Up, CurrentTileAttribute.PassUp ? RPGEditorGUI.BoxStyle : RPGEditorGUI.RichLabelStyle, GUILayout.Width(32), GUILayout.Height(32)))
                {
                    CurrentTileAttribute.PassUp = !CurrentTileAttribute.PassUp;
                }
                GUILayout.FlexibleSpace();
            }
            EditorGUILayout.EndHorizontal();

            EditorGUILayout.BeginHorizontal();
            if (GUILayout.Button(RPGEditorGUI.Icon_Arrow3_Left, CurrentTileAttribute.PassLeft ? RPGEditorGUI.BoxStyle : RPGEditorGUI.RichLabelStyle, GUILayout.Width(32), GUILayout.Height(32)))
            {
                CurrentTileAttribute.PassLeft = !CurrentTileAttribute.PassLeft;
            }
            EditorGUILayout.Space();
            if (GUILayout.Button(RPGEditorGUI.Icon_Arrow3_Right, CurrentTileAttribute.PassRight ? RPGEditorGUI.BoxStyle : RPGEditorGUI.RichLabelStyle, GUILayout.Width(32), GUILayout.Height(32)))
            {
                CurrentTileAttribute.PassRight = !CurrentTileAttribute.PassRight;
            }
            EditorGUILayout.EndHorizontal();

            EditorGUILayout.BeginHorizontal();
            {
                GUILayout.FlexibleSpace();
                if (GUILayout.Button(RPGEditorGUI.Icon_Arrow2_Down, CurrentTileAttribute.PassDown ? RPGEditorGUI.BoxStyle : RPGEditorGUI.RichLabelStyle, GUILayout.Width(32), GUILayout.Height(32)))
                {
                    CurrentTileAttribute.PassDown = !CurrentTileAttribute.PassDown;
                }
                GUILayout.FlexibleSpace();
            }
            EditorGUILayout.EndHorizontal();

            EditorGUILayout.EndVertical();

            GUILayout.EndArea();
        }
Esempio n. 10
0
        public override void OnInspectorGUI()
        {
            Rect blockLabelRect = new Rect(45, 5, 120, 16);

            EditorGUI.LabelField(blockLabelRect, new GUIContent("武器"), RPGEditorGUI.CenterLabelStyle);
            //EditorGUI.InspectorTitlebar(new Rect(5, 5, 128, 128),true , new Object[] { Resources.Load("CharIcon/0_0") },true );
            if (wea.Icon != null)
            {
                EditorGUI.DrawPreviewTexture(new Rect(5, 5, 37, 37), wea.Icon.texture);
            }

            wea.CommonProperty.ID          = EditorGUILayout.IntField(guiContent_ID, wea.CommonProperty.ID);
            wea.CommonProperty.Name        = EditorGUILayout.TextField(guiContent_Name, wea.CommonProperty.Name);
            wea.CommonProperty.Description = EditorGUILayout.TextField(guiContent_Desc, wea.CommonProperty.Description);

            wea.Icon        = (Sprite)EditorGUILayout.ObjectField("图标", wea.Icon, typeof(Sprite), false);
            wea.WeaponType  = (EnumWeaponType)EditorGUILayout.EnumPopup("武器类型", wea.WeaponType);
            wea.WeaponLevel = (EnumWeaponLevel)EditorGUILayout.EnumPopup("武器等级", wea.WeaponLevel);
            wea.SinglePrice = EditorGUILayout.IntField("单价", wea.SinglePrice);
            wea.UseNumber   = EditorGUILayout.IntField("使用次数", wea.UseNumber);
            //根据枚举类型决定该以何种形式呈现
            foldout_Range = EditorGUILayout.Foldout(foldout_Range, "武器攻击范围");
            if (foldout_Range)
            {
                EditorGUILayout.BeginHorizontal(GUILayout.MaxWidth(Screen.width - 16));
                EditorGUILayout.Space();
                EditorGUILayout.BeginVertical();

                wea.RangeType.SelectType  = (EnumSelectEffectRangeType)EditorGUILayout.EnumPopup("选择范围类型", wea.RangeType.SelectType);
                wea.RangeType.EffectType  = (EnumSelectEffectRangeType)EditorGUILayout.EnumPopup("生效范围类型", wea.RangeType.EffectType);
                wea.RangeType.SelectRange = EditorGUILayout.Vector2IntField("选择距离", wea.RangeType.SelectRange);
                wea.RangeType.EffectRange = EditorGUILayout.Vector2IntField("生效距离", wea.RangeType.EffectRange);

                EditorGUILayout.EndVertical();
                EditorGUILayout.EndHorizontal();
            }
            //////////
            wea.Weight = EditorGUILayout.IntField("重量", wea.Weight);
            wea.Power  = EditorGUILayout.IntField("威力", wea.Power);
            wea.Hit    = EditorGUILayout.IntField("命中率", wea.Hit);
            wea.Crit   = EditorGUILayout.IntField("必杀率", wea.Crit);

            RPGEditorGUI.DynamicArrayView(ref dedicatedCharacterCount, ref wea.DedicatedCharacter, "专用人物", "人物");
            string[] display = RPGData.CareerNameList.ToArray();
            int[]    value   = EnumTables.GetSequentialArray(RPGData.CareerNameList.Count);
            RPGEditorGUI.DynamicArrayView(ref dedicatedJobCount, ref wea.DedicatedJob, "专用职业", "职业", display, value);
            RPGEditorGUI.DynamicArrayView(ref careerEffectCount, ref wea.CareerEffect, "克制职业", "职业", display, value);

            //Log.Write(EnumTables.MaskFieldIdentify(wea.CareerEffect, 0), EnumTables.MaskFieldIdentify(wea.CareerEffect, 1), EnumTables.MaskFieldIdentify(wea.CareerEffect, 2), EnumTables.MaskFieldIdentify(wea.CareerEffect, 3));
            //Log.Write(EnumTables.MaskFieldSetTrue(2, 1));
            //Log.Write(EnumTables.MaskFieldSetFalse(2, 0));

            wea.SuperEffect     = EditorGUILayout.MaskField(guiContent_SuperEffect, wea.SuperEffect, new string[] { "必杀", "不可反击", "狂乱", "吸血" });
            wea.AttackEffect    = (EnumWeaponAttackEffectType)EditorGUILayout.EnumPopup("特殊攻击效果", wea.AttackEffect);
            wea.ImportantWeapon = EditorGUILayout.Toggle(guiContent_ImportantWeapon, wea.ImportantWeapon);
            wea.NoExchange      = EditorGUILayout.Toggle(guiContent_NoExchange, wea.NoExchange);

            foldout_AdditionalAttribute = EditorGUILayout.Foldout(foldout_AdditionalAttribute, "人物属性修正");
            if (foldout_AdditionalAttribute)
            {
                EditorGUILayout.BeginHorizontal(GUILayout.MaxWidth(Screen.width - 16));
                EditorGUILayout.Space();
                EditorGUILayout.BeginVertical();

                wea.AdditionalAttribute.HP              = EditorGUILayout.IntSlider("HP", wea.AdditionalAttribute.HP, 0, RPGEditorGlobal.MAX_ADDATTIBUTE);
                wea.AdditionalAttribute.PhysicalPower   = EditorGUILayout.IntSlider("物理攻击", wea.AdditionalAttribute.PhysicalPower, 0, RPGEditorGlobal.MAX_ADDATTIBUTE);
                wea.AdditionalAttribute.MagicalPower    = EditorGUILayout.IntSlider("魔法攻击", wea.AdditionalAttribute.MagicalPower, 0, RPGEditorGlobal.MAX_ADDATTIBUTE);
                wea.AdditionalAttribute.Skill           = EditorGUILayout.IntSlider("技术", wea.AdditionalAttribute.Skill, 0, RPGEditorGlobal.MAX_ADDATTIBUTE);
                wea.AdditionalAttribute.Speed           = EditorGUILayout.IntSlider("速度", wea.AdditionalAttribute.Speed, 0, RPGEditorGlobal.MAX_ADDATTIBUTE);
                wea.AdditionalAttribute.Intel           = EditorGUILayout.IntSlider("智力", wea.AdditionalAttribute.Intel, 0, RPGEditorGlobal.MAX_ADDATTIBUTE);
                wea.AdditionalAttribute.PhysicalDefense = EditorGUILayout.IntSlider("物理防御", wea.AdditionalAttribute.PhysicalDefense, 0, RPGEditorGlobal.MAX_ADDATTIBUTE);
                wea.AdditionalAttribute.MagicalDefense  = EditorGUILayout.IntSlider("魔法防御", wea.AdditionalAttribute.MagicalDefense, 0, RPGEditorGlobal.MAX_ADDATTIBUTE);
                wea.AdditionalAttribute.Movement        = EditorGUILayout.IntSlider("移动", wea.AdditionalAttribute.Movement, 0, RPGEditorGlobal.MAX_ADDATTIBUTE);

                EditorGUILayout.EndVertical();
                EditorGUILayout.EndHorizontal();
            }
            foldout_AdditionalAttiburteGrow = EditorGUILayout.Foldout(foldout_AdditionalAttiburteGrow, "成长率修正");
            //人物成长率修正
            if (foldout_AdditionalAttiburteGrow)
            {
                EditorGUILayout.BeginHorizontal(GUILayout.MaxWidth(Screen.width - 16));
                EditorGUILayout.Space();
                EditorGUILayout.BeginVertical();

                wea.AdditionalAttributeGrow.HP              = EditorGUILayout.IntSlider("HP成长率", wea.AdditionalAttributeGrow.HP, 0, RPGEditorGlobal.MAX_ADDGROW);
                wea.AdditionalAttributeGrow.PhysicalPower   = EditorGUILayout.IntSlider("物理攻击成长率", wea.AdditionalAttributeGrow.PhysicalPower, 0, RPGEditorGlobal.MAX_ADDGROW);
                wea.AdditionalAttributeGrow.MagicalPower    = EditorGUILayout.IntSlider("魔法攻击成长率", wea.AdditionalAttributeGrow.MagicalPower, 0, RPGEditorGlobal.MAX_ADDGROW);
                wea.AdditionalAttributeGrow.Skill           = EditorGUILayout.IntSlider("技术成长率", wea.AdditionalAttributeGrow.Skill, 0, RPGEditorGlobal.MAX_ADDGROW);
                wea.AdditionalAttributeGrow.Speed           = EditorGUILayout.IntSlider("速度成长率", wea.AdditionalAttributeGrow.Speed, 0, RPGEditorGlobal.MAX_ADDGROW);
                wea.AdditionalAttributeGrow.Intel           = EditorGUILayout.IntSlider("智力成长率", wea.AdditionalAttributeGrow.Intel, 0, RPGEditorGlobal.MAX_ADDGROW);
                wea.AdditionalAttributeGrow.PhysicalDefense = EditorGUILayout.IntSlider("物理防御成长率", wea.AdditionalAttributeGrow.PhysicalDefense, 0, RPGEditorGlobal.MAX_ADDGROW);
                wea.AdditionalAttributeGrow.MagicalDefense  = EditorGUILayout.IntSlider("魔法防御成长率", wea.AdditionalAttributeGrow.MagicalDefense, 0, RPGEditorGlobal.MAX_ADDGROW);
                wea.AdditionalAttributeGrow.Movement        = EditorGUILayout.IntSlider("移动成长率", wea.AdditionalAttributeGrow.Movement, 0, RPGEditorGlobal.MAX_ADDGROW);

                EditorGUILayout.EndVertical();
                EditorGUILayout.EndHorizontal();
            }
            if (GUI.changed)
            {
                EditorUtility.SetDirty(target);
            }
        }
Esempio n. 11
0
        public override void OnInspectorGUI()
        {
            //在最开始写Label会显示在最上面
            Rect blockLabelRect = new Rect(45, 5, 120, 16);

            EditorGUI.LabelField(blockLabelRect, new GUIContent("道具"), RPGEditorGUI.CenterLabelStyle);
            //EditorGUI.InspectorTitlebar(new Rect(5, 5, 128, 128),true , new Object[] { Resources.Load("CharIcon/0_0") },true );
            if (props.Icon != null)
            {
                EditorGUI.DrawPreviewTexture(new Rect(5, 5, 37, 37), props.Icon.texture);
            }
            props.CommonProperty.ID          = EditorGUILayout.IntField(guiContent_ID, props.CommonProperty.ID);
            props.CommonProperty.Name        = EditorGUILayout.TextField(guiContent_Name, props.CommonProperty.Name);
            props.CommonProperty.Description = EditorGUILayout.TextField(guiContent_Desc, props.CommonProperty.Description);

            props.Icon        = (Sprite)EditorGUILayout.ObjectField("图标", props.Icon, typeof(Sprite), false);
            props.SinglePrice = EditorGUILayout.IntField("单价", props.SinglePrice);
            props.UseNumber   = EditorGUILayout.IntField("使用次数", props.UseNumber);

            props.PropsEffect = (EnumPropsEffectType)EditorGUILayout.EnumPopup("道具效果", props.PropsEffect);
            props.Power       = EditorGUILayout.IntField("值", props.Power);

            string[] display = RPGData.CareerNameList.ToArray();
            int[]    value   = EnumTables.GetSequentialArray(RPGData.CareerNameList.Count);
            RPGEditorGUI.DynamicArrayView(ref dedicatedCharacterCount, ref props.DedicatedCharacter, "专用人物", "人物", display, value);
            RPGEditorGUI.DynamicArrayView(ref dedicatedJobCount, ref props.DedicatedJob, "专用职业", "职业", display, value);
            props.EquipItem      = EditorGUILayout.Toggle("是否可以装备", props.EquipItem);
            props.ImportantProps = EditorGUILayout.Toggle(guiContent_ImportantWeapon, props.ImportantProps);
            props.NoExchange     = EditorGUILayout.Toggle(guiContent_NoExchange, props.NoExchange);
            props.Sellable       = EditorGUILayout.Toggle("是否可以出售", props.Sellable);

            foldout_AdditionalAttribute = EditorGUILayout.Foldout(foldout_AdditionalAttribute, "人物属性修正");
            if (foldout_AdditionalAttribute)
            {
                EditorGUILayout.BeginHorizontal(GUILayout.MaxWidth(Screen.width - 16));
                EditorGUILayout.Space();
                EditorGUILayout.BeginVertical();

                props.AdditionalAttribute.HP              = EditorGUILayout.IntSlider("HP", props.AdditionalAttribute.HP, 0, RPGEditorGlobal.MAX_ADDATTIBUTE);
                props.AdditionalAttribute.PhysicalPower   = EditorGUILayout.IntSlider("物理攻击", props.AdditionalAttribute.PhysicalPower, 0, RPGEditorGlobal.MAX_ADDATTIBUTE);
                props.AdditionalAttribute.MagicalPower    = EditorGUILayout.IntSlider("魔法攻击", props.AdditionalAttribute.MagicalPower, 0, RPGEditorGlobal.MAX_ADDATTIBUTE);
                props.AdditionalAttribute.Skill           = EditorGUILayout.IntSlider("技术", props.AdditionalAttribute.Skill, 0, RPGEditorGlobal.MAX_ADDATTIBUTE);
                props.AdditionalAttribute.Speed           = EditorGUILayout.IntSlider("速度", props.AdditionalAttribute.Speed, 0, RPGEditorGlobal.MAX_ADDATTIBUTE);
                props.AdditionalAttribute.Intel           = EditorGUILayout.IntSlider("智力", props.AdditionalAttribute.Intel, 0, RPGEditorGlobal.MAX_ADDATTIBUTE);
                props.AdditionalAttribute.PhysicalDefense = EditorGUILayout.IntSlider("物理防御", props.AdditionalAttribute.PhysicalDefense, 0, RPGEditorGlobal.MAX_ADDATTIBUTE);
                props.AdditionalAttribute.MagicalDefense  = EditorGUILayout.IntSlider("魔法防御", props.AdditionalAttribute.MagicalDefense, 0, RPGEditorGlobal.MAX_ADDATTIBUTE);
                props.AdditionalAttribute.BodySize        = EditorGUILayout.IntSlider("体格", props.AdditionalAttribute.BodySize, 0, RPGEditorGlobal.MAX_ADDATTIBUTE);
                props.AdditionalAttribute.Movement        = EditorGUILayout.IntSlider("移动", props.AdditionalAttribute.Movement, 0, RPGEditorGlobal.MAX_ADDATTIBUTE);

                EditorGUILayout.EndVertical();
                EditorGUILayout.EndHorizontal();
            }
            foldout_AdditionalAttiburteGrow = EditorGUILayout.Foldout(foldout_AdditionalAttiburteGrow, "成长率修正");
            //人物成长率修正
            if (foldout_AdditionalAttiburteGrow)
            {
                EditorGUILayout.BeginHorizontal(GUILayout.MaxWidth(Screen.width - 16));
                EditorGUILayout.Space();
                EditorGUILayout.BeginVertical();

                props.AdditionalAttributeGrow.HP              = EditorGUILayout.IntSlider("HP成长率", props.AdditionalAttributeGrow.HP, 0, RPGEditorGlobal.MAX_ADDGROW);
                props.AdditionalAttributeGrow.PhysicalPower   = EditorGUILayout.IntSlider("物理攻击成长率", props.AdditionalAttributeGrow.PhysicalPower, 0, RPGEditorGlobal.MAX_ADDGROW);
                props.AdditionalAttributeGrow.MagicalPower    = EditorGUILayout.IntSlider("魔法攻击成长率", props.AdditionalAttributeGrow.MagicalPower, 0, RPGEditorGlobal.MAX_ADDGROW);
                props.AdditionalAttributeGrow.Skill           = EditorGUILayout.IntSlider("技术成长率", props.AdditionalAttributeGrow.Skill, 0, RPGEditorGlobal.MAX_ADDGROW);
                props.AdditionalAttributeGrow.Speed           = EditorGUILayout.IntSlider("速度成长率", props.AdditionalAttributeGrow.Speed, 0, RPGEditorGlobal.MAX_ADDGROW);
                props.AdditionalAttributeGrow.Intel           = EditorGUILayout.IntSlider("智力成长率", props.AdditionalAttributeGrow.Intel, 0, RPGEditorGlobal.MAX_ADDGROW);
                props.AdditionalAttributeGrow.PhysicalDefense = EditorGUILayout.IntSlider("物理防御成长率", props.AdditionalAttributeGrow.PhysicalDefense, 0, RPGEditorGlobal.MAX_ADDGROW);
                props.AdditionalAttributeGrow.MagicalDefense  = EditorGUILayout.IntSlider("魔法防御成长率", props.AdditionalAttributeGrow.MagicalDefense, 0, RPGEditorGlobal.MAX_ADDGROW);
                props.AdditionalAttributeGrow.BodySize        = EditorGUILayout.IntSlider("体格成长率", props.AdditionalAttributeGrow.BodySize, 0, RPGEditorGlobal.MAX_ADDGROW);
                props.AdditionalAttributeGrow.Movement        = EditorGUILayout.IntSlider("移动成长率", props.AdditionalAttributeGrow.Movement, 0, RPGEditorGlobal.MAX_ADDGROW);

                EditorGUILayout.EndVertical();
                EditorGUILayout.EndHorizontal();
            }
            if (GUI.changed)
            {
                EditorUtility.SetDirty(target);
            }
        }