129 lines
4.7 KiB
C#
129 lines
4.7 KiB
C#
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 HeroConfig HeroConfig = new HeroConfig();
|
||
|
||
[Button("保存Config")]
|
||
void SaveConfig()
|
||
{
|
||
if (!Directory.Exists(savePath))
|
||
Directory.CreateDirectory(savePath);
|
||
|
||
if (string.IsNullOrEmpty(HeroConfig.BasicStats.Name))
|
||
return;
|
||
|
||
string path = $"{savePath}/{HeroConfig.BasicStats.Name}.asset";
|
||
var config = CreateInstance<HeroConfigObject>();
|
||
config.heroConfig = HeroConfig;
|
||
|
||
AssetDatabase.CreateAsset(config, path);
|
||
AssetDatabase.SaveAssets();
|
||
AssetDatabase.Refresh();
|
||
Refresh();
|
||
}
|
||
|
||
void Refresh()
|
||
{
|
||
HeroConfig = new HeroConfig();
|
||
}
|
||
}
|
||
|
||
/// <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
|
||
{
|
||
// 特殊事件:在某些回合中,可能会触发随机事件,如商店大促销、商店特殊刷新、英雄强度增强等。
|
||
// 特殊挑战:某些回合可能会有特别的挑战模式,要求玩家适应特定条件进行战斗。
|
||
}
|
||
} |