JinChanChan/Assets/Scripts/Editor/CharacterEditor/CharacterEditor.cs

134 lines
5.0 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

using System.Collections.Generic;
using System.IO;
using Game;
using Sirenix.OdinInspector;
using Sirenix.OdinInspector.Editor;
using UnityEditor;
using UnityEngine;
namespace ZEditor
{
public class CharacterEditor : OdinEditorWindow
{
[MenuItem("Game/Editor Character Editor")]
static void GetWindow()
{
GetWindow<CharacterEditor>("CharacterEditor").Show();
}
[LabelText("路径")] [FolderPath] public string savePath = "Assets/Configs/Character";
[LabelText("英雄配置")] [ReadOnly] public string title = "英雄配置";
[LabelText("基本属性")] public BasicStats BasicStats = new BasicStats();
[LabelText("技能")] public Ability Ability = new Ability();
[LabelText("职业/羁绊")] public Profession Profession = new Profession();
[Button("保存Config")]
void SaveConfig()
{
if (!Directory.Exists(savePath))
Directory.CreateDirectory(savePath);
if (string.IsNullOrEmpty(BasicStats.Name))
return;
string path = $"{savePath}/{BasicStats.Name}.asset";
var config = CreateInstance<HeroConfig>();
config.BasicStats = BasicStats;
config.Ability = Ability;
config.Profession = Profession;
AssetDatabase.CreateAsset(config, path);
AssetDatabase.SaveAssets();
AssetDatabase.Refresh();
Refresh();
}
void Refresh()
{
BasicStats = new BasicStats();
Ability = new Ability();
Profession = new Profession();
}
}
/// <summary>
/// 成长属性Stat Growth
/// </summary>
class StatGrowth
{
// 生命值成长Health Growth每升一级时角色生命值的增长。
public string HealthGrowth;
// 攻击力成长Attack Damage Growth每升一级时角色攻击力的增长。
public string AttackDamageGrowth;
// 攻击速度成长Attack Speed Growth每升一级时角色攻击速度的增长。
public string AttackSpeedGrowth;
// 法力值成长Mana Growth每升一级时角色法力值的增长。
public string ManaGrowth;
// 护甲成长Armor Growth每升一级时角色护甲的增长。
public string ArmorGrowth;
// 魔抗成长Magic Resist Growth每升一级时角色魔抗的增长。
public string MagicResistGrowth;
}
/// <summary>
/// 增益与减益Buffs and Debuffs
/// </summary>
class BuffsAndDebuffs
{
// 增益效果Buff角色或队友可以通过技能或装备获得增益效果如增加攻击力、增加生命恢复、提高攻击速度等。
List<string> Buffs = new List<string>();
// 减益效果Debuff敌人可能会受到减益效果的影响如降低攻击力、沉默、眩晕、减速等。
List<string> Debuffs = new List<string>();
}
/// <summary>
/// 战斗行为Behavior and AI
/// </summary>
class BehaviorAndAI
{
// 攻击目标选择Targeting Priority角色选择攻击目标的优先级可能是血量最低、攻击力最高或距离最近的敌人。
public string TargetingPriority;
// 技能施放目标Ability Targeting角色的技能通常会有特定的目标选择规则。例如某些技能会选择最前排的敌人或指定区域。
public string AbilityTargeting;
}
// TODO: ----------------------以下是系统的内容了,不属于角色配置了---------------------------
/// <summary>
/// 金币与经济系统Gold and Economy
/// </summary>
class GoldAndEconomy
{
// 金币收入Gold Earnings每回合通过击败敌人、出售角色等方式获得的金币数量。
// 利息Interest每回合根据持有的金币数量获得额外的利息通常为每50金币获得5金币的利息。
// 经验值Experience用于提升玩家的等级等级提升后可以增加商店中的英雄种类。
}
/// <summary>
/// 卡池与商店Pool and Shop
/// </summary>
class PoolAndShop
{
// 卡池Champion Pool每个角色在本局游戏中的总数量限制。随着游戏的进行玩家会遇到越来越强的敌人和更丰富的选择。
// 商店刷新Shop Refresh商店在每回合会根据玩家的等级刷新提供不同的英雄。
}
/// <summary>
/// 随机事件与挑战Random Events and Challenges
/// </summary>
class RandomEventsAndChallenges
{
// 特殊事件:在某些回合中,可能会触发随机事件,如商店大促销、商店特殊刷新、英雄强度增强等。
// 特殊挑战:某些回合可能会有特别的挑战模式,要求玩家适应特定条件进行战斗。
}
}