Compare commits
2 Commits
7f63fa41a5
...
2da00cfaa2
Author | SHA1 | Date |
---|---|---|
|
2da00cfaa2 | |
|
61406ef521 |
|
@ -1,41 +0,0 @@
|
||||||
%YAML 1.1
|
|
||||||
%TAG !u! tag:unity3d.com,2011:
|
|
||||||
--- !u!114 &11400000
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 0}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: e76cdee6cbc443e3a8ff5761a0708f21, type: 3}
|
|
||||||
m_Name: wcc
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
BasicStats:
|
|
||||||
Name: wcc
|
|
||||||
Profession: 0
|
|
||||||
StarLevel: 0
|
|
||||||
Health:
|
|
||||||
AttackDamage:
|
|
||||||
AttackSpeed: []
|
|
||||||
Mana:
|
|
||||||
StartingMana:
|
|
||||||
AttackRange:
|
|
||||||
CriticalHitChance:
|
|
||||||
Armor:
|
|
||||||
MagicResistance:
|
|
||||||
Ability:
|
|
||||||
AbilityName:
|
|
||||||
AbilityDescription:
|
|
||||||
TriggerMode: 0
|
|
||||||
AbilityDamage:
|
|
||||||
Cooldown:
|
|
||||||
Target: 0
|
|
||||||
Profession:
|
|
||||||
Name:
|
|
||||||
Description:
|
|
||||||
AmplifyType: 0
|
|
||||||
AmplifyTargetType: 0
|
|
||||||
AmplifyTimeType: 0
|
|
||||||
AmplifyTimes: []
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: ad8ff2ae296533542a049e5c37378b0e
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: f9f22d34cb535b44a9fbe8ec3925675c
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 42f2072c2c625d3459e7831271847568
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -0,0 +1,22 @@
|
||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!114 &11400000
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 0}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 1549551891, guid: 74721b9f0af448f5ae2e91102a1a5edd, type: 3}
|
||||||
|
m_Name: GlobalSerializationConfig
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
HideSerializationCautionaryMessage: 1
|
||||||
|
HidePrefabCautionaryMessage: 0
|
||||||
|
HideOdinSerializeAttributeWarningMessages: 0
|
||||||
|
HideNonSerializedShowInInspectorWarningMessages: 0
|
||||||
|
buildSerializationFormat: 0
|
||||||
|
editorSerializationFormat: 2
|
||||||
|
loggingPolicy: 0
|
||||||
|
errorHandlingPolicy: 0
|
|
@ -1,5 +1,5 @@
|
||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 480d9b00ab6631c4898f283d73e2eefa
|
guid: 535ad94524419ad45b2bcc1ee19b2941
|
||||||
NativeFormatImporter:
|
NativeFormatImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
mainObjectFileID: 11400000
|
mainObjectFileID: 11400000
|
|
@ -19,9 +19,7 @@ namespace ZEditor
|
||||||
[LabelText("路径")] [FolderPath] public string savePath = "Assets/Configs/Character";
|
[LabelText("路径")] [FolderPath] public string savePath = "Assets/Configs/Character";
|
||||||
|
|
||||||
[LabelText("英雄配置")] [ReadOnly] public string title = "英雄配置";
|
[LabelText("英雄配置")] [ReadOnly] public string title = "英雄配置";
|
||||||
[LabelText("基本属性")] public BasicStats BasicStats = new BasicStats();
|
[LabelText("基本属性")] public HeroConfig HeroConfig = new HeroConfig();
|
||||||
[LabelText("技能")] public Ability Ability = new Ability();
|
|
||||||
[LabelText("职业/羁绊")] public Profession Profession = new Profession();
|
|
||||||
|
|
||||||
[Button("保存Config")]
|
[Button("保存Config")]
|
||||||
void SaveConfig()
|
void SaveConfig()
|
||||||
|
@ -29,14 +27,13 @@ namespace ZEditor
|
||||||
if (!Directory.Exists(savePath))
|
if (!Directory.Exists(savePath))
|
||||||
Directory.CreateDirectory(savePath);
|
Directory.CreateDirectory(savePath);
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(BasicStats.Name))
|
if (string.IsNullOrEmpty(HeroConfig.BasicStats.Name))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
string path = $"{savePath}/{BasicStats.Name}.asset";
|
string path = $"{savePath}/{HeroConfig.BasicStats.Name}.asset";
|
||||||
var config = CreateInstance<HeroConfig>();
|
var config = CreateInstance<HeroConfigObject>();
|
||||||
config.BasicStats = BasicStats;
|
config.heroConfig = HeroConfig;
|
||||||
config.Ability = Ability;
|
|
||||||
config.Profession = Profession;
|
|
||||||
AssetDatabase.CreateAsset(config, path);
|
AssetDatabase.CreateAsset(config, path);
|
||||||
AssetDatabase.SaveAssets();
|
AssetDatabase.SaveAssets();
|
||||||
AssetDatabase.Refresh();
|
AssetDatabase.Refresh();
|
||||||
|
@ -45,9 +42,7 @@ namespace ZEditor
|
||||||
|
|
||||||
void Refresh()
|
void Refresh()
|
||||||
{
|
{
|
||||||
BasicStats = new BasicStats();
|
HeroConfig = new HeroConfig();
|
||||||
Ability = new Ability();
|
|
||||||
Profession = new Profession();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,47 @@
|
||||||
namespace ZEditor
|
using System.Collections.Generic;
|
||||||
{
|
using System.IO;
|
||||||
public class EquipmentEditor
|
using Game;
|
||||||
{
|
using Sirenix.OdinInspector;
|
||||||
|
using Sirenix.OdinInspector.Editor;
|
||||||
|
using UnityEditor;
|
||||||
|
|
||||||
|
namespace ZEditor
|
||||||
|
{
|
||||||
|
public class EquipmentEditor : OdinEditorWindow
|
||||||
|
{
|
||||||
|
[MenuItem("Game/Editor Equipment Editor")]
|
||||||
|
static void GetWindow()
|
||||||
|
{
|
||||||
|
GetWindow<EquipmentEditor>("EquipmentEditor").Show();
|
||||||
|
}
|
||||||
|
|
||||||
|
[LabelText("路径")] [FolderPath] public string savePath = "Assets/Configs/Equipment";
|
||||||
|
|
||||||
|
[LabelText("装备配置")] [ReadOnly] public string title = "装备配置";
|
||||||
|
[LabelText("基本属性")] public EquipmentConfig Equipment = new EquipmentConfig();
|
||||||
|
|
||||||
|
[Button("保存Config")]
|
||||||
|
void SaveConfig()
|
||||||
|
{
|
||||||
|
if (!Directory.Exists(savePath))
|
||||||
|
Directory.CreateDirectory(savePath);
|
||||||
|
|
||||||
|
if (string.IsNullOrEmpty(Equipment.Name))
|
||||||
|
return;
|
||||||
|
|
||||||
|
string path = $"{savePath}/{Equipment.Name}.asset";
|
||||||
|
var config = CreateInstance<EquipmentConfigObject>();
|
||||||
|
config.equipmentConfig = Equipment;
|
||||||
|
|
||||||
|
AssetDatabase.CreateAsset(config, path);
|
||||||
|
AssetDatabase.SaveAssets();
|
||||||
|
AssetDatabase.Refresh();
|
||||||
|
Refresh();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Refresh()
|
||||||
|
{
|
||||||
|
Equipment = new EquipmentConfig();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,47 +0,0 @@
|
||||||
using UnityEditor;
|
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
namespace ZEditor
|
|
||||||
{
|
|
||||||
public class TestCharacterEditor: EditorWindow
|
|
||||||
{
|
|
||||||
private string newName = "NewObjectName";
|
|
||||||
private int startNumber = 1;
|
|
||||||
|
|
||||||
// 在菜单中添加一个选项以打开自定义窗口
|
|
||||||
[MenuItem("Tools/Rename Selected Objects")]
|
|
||||||
public static void ShowWindow()
|
|
||||||
{
|
|
||||||
// 获取或创建窗口实例
|
|
||||||
GetWindow<TestCharacterEditor>("Rename Selected Objects");
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnGUI()
|
|
||||||
{
|
|
||||||
// 显示一个文本框,用于输入新的名称
|
|
||||||
newName = EditorGUILayout.TextField("New Name", newName);
|
|
||||||
// 显示一个整数输入框,用于设置起始编号
|
|
||||||
startNumber = EditorGUILayout.IntField("Start Number", startNumber);
|
|
||||||
|
|
||||||
if (GUILayout.Button("Rename Selected"))
|
|
||||||
{
|
|
||||||
// 调用重命名方法
|
|
||||||
RenameSelectedObjects();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void RenameSelectedObjects()
|
|
||||||
{
|
|
||||||
// 获取当前选中的所有游戏对象
|
|
||||||
GameObject[] selectedObjects = Selection.gameObjects;
|
|
||||||
int currentNumber = startNumber;
|
|
||||||
|
|
||||||
foreach (GameObject obj in selectedObjects)
|
|
||||||
{
|
|
||||||
// 按照设定的规则生成新名称
|
|
||||||
obj.name = $"{newName}_{currentNumber}";
|
|
||||||
currentNumber++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,3 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: 72b8c3711c024a72bf20d21a70ea29ad
|
|
||||||
timeCreated: 1739516980
|
|
|
@ -29,6 +29,8 @@ namespace Game
|
||||||
|
|
||||||
bool AddEquipment(IEquipment equipment);
|
bool AddEquipment(IEquipment equipment);
|
||||||
bool RemoveAllEquipment(out List<IEquipment> equipments);
|
bool RemoveAllEquipment(out List<IEquipment> equipments);
|
||||||
|
|
||||||
|
void OnAttack(Character character);
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Character : ICharacter
|
public class Character : ICharacter
|
||||||
|
@ -99,30 +101,38 @@ namespace Game
|
||||||
// return false;
|
// return false;
|
||||||
|
|
||||||
_equipments.Add(equipment);
|
_equipments.Add(equipment);
|
||||||
tmphp += equipment.Config.Hp;
|
// tmphp += equipment.Config.Hp;
|
||||||
tmpmp += equipment.Config.Mp;
|
// tmpmp += equipment.Config.Mp;
|
||||||
tmpattack += equipment.Config.Attack;
|
// tmpattack += equipment.Config.Attack;
|
||||||
tmpdefense += equipment.Config.Defense;
|
// tmpdefense += equipment.Config.Defense;
|
||||||
tmpmoveSpeed += equipment.Config.MoveSpeed;
|
// tmpmoveSpeed += equipment.Config.MoveSpeed;
|
||||||
tmpattackSpeed += equipment.Config.AttackSpeed;
|
// tmpattackSpeed += equipment.Config.AttackSpeed;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool RemoveAllEquipment(out List<IEquipment> equipments)
|
public bool RemoveAllEquipment(out List<IEquipment> equipments)
|
||||||
{
|
{
|
||||||
equipments = _equipments.ToList();
|
equipments = _equipments.ToList();
|
||||||
foreach (var equipment in _equipments)
|
// foreach (var equipment in _equipments)
|
||||||
{
|
// {
|
||||||
tmphp -= equipment.Config.Hp;
|
// tmphp -= equipment.Config.Hp;
|
||||||
tmpmp -= equipment.Config.Mp;
|
// tmpmp -= equipment.Config.Mp;
|
||||||
tmpattack -= equipment.Config.Attack;
|
// tmpattack -= equipment.Config.Attack;
|
||||||
tmpdefense -= equipment.Config.Defense;
|
// tmpdefense -= equipment.Config.Defense;
|
||||||
tmpmoveSpeed -= equipment.Config.MoveSpeed;
|
// tmpmoveSpeed -= equipment.Config.MoveSpeed;
|
||||||
tmpattackSpeed -= equipment.Config.AttackSpeed;
|
// tmpattackSpeed -= equipment.Config.AttackSpeed;
|
||||||
}
|
// }
|
||||||
|
|
||||||
_equipments.Clear();
|
_equipments.Clear();
|
||||||
return equipments.Count != 0;
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnAttack(Character target)
|
||||||
|
{
|
||||||
|
foreach (var equipment in _equipments)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,58 +1,85 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using Sirenix.OdinInspector;
|
||||||
|
|
||||||
namespace Game
|
namespace Game
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// 装备配置
|
|
||||||
/// </summary>
|
|
||||||
[System.Serializable]
|
[System.Serializable]
|
||||||
public class EquipmentConfig
|
public class EquipmentConfig
|
||||||
{
|
{
|
||||||
/// <summary>
|
[LabelText("装备名称")] public string Name; // 装备名称
|
||||||
/// ID
|
[LabelText("装备描述")] public string Description; // 装备描述
|
||||||
/// </summary>
|
[LabelText("装备类型")] public EquipmentType Type; // 装备类型(基础装备、合成装备)
|
||||||
public int ID;
|
[LabelText("装备的属性加成")] public List<StatModifier> Stats; // 装备的属性加成(攻击力、生命值等)
|
||||||
|
[LabelText("装备附带的技能效果")] public List<Effect> Effects; // 装备附带的技能效果
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 名字
|
/// 装备类型
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Name;
|
public enum EquipmentType
|
||||||
|
{
|
||||||
|
[LabelText("基础装备")] Base = 0,
|
||||||
|
[LabelText("合成装备")] Composite // 合成装备
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 描述
|
/// 装备的属性加成
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Description;
|
[System.Serializable]
|
||||||
|
public class StatModifier
|
||||||
|
{
|
||||||
|
[LabelText("属性加成类型")] public StatType StatType; // 攻击力、生命值等
|
||||||
|
[LabelText("属性加成数值")] public float Value; // 数值
|
||||||
|
|
||||||
/// <summary>
|
public StatModifier(StatType statType, float value)
|
||||||
/// 血量
|
{
|
||||||
/// </summary>
|
StatType = statType;
|
||||||
public int Hp;
|
Value = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 蓝量
|
/// 属性加成类型
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int Mp;
|
public enum StatType
|
||||||
|
{
|
||||||
|
[LabelText("攻击伤害")] AttackDamage = 0,
|
||||||
|
[LabelText("护甲")] Armor,
|
||||||
|
[LabelText("魔法抗性")] MagicResist,
|
||||||
|
[LabelText("血量")] Health,
|
||||||
|
[LabelText("攻击速度")] AttackSpeed,
|
||||||
|
[LabelText("法术强度")] AbilityPower
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 攻击力
|
/// 特效
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public float Attack;
|
[System.Serializable]
|
||||||
|
public class Effect
|
||||||
|
{
|
||||||
|
[LabelText("特效名称")] public string Name; // 特效名称
|
||||||
|
[LabelText("特效描述")] public string Description; // 特效描述
|
||||||
|
[LabelText("特效类型")] public EffectType EffectType; // 特效类型
|
||||||
|
[LabelText("特效的数值")] public float Value; // 特效的数值
|
||||||
|
|
||||||
/// <summary>
|
public Effect(string name, string description, EffectType effectType, float value)
|
||||||
/// 防御力
|
{
|
||||||
/// </summary>
|
Name = name;
|
||||||
public float Defense;
|
Description = description;
|
||||||
|
EffectType = effectType;
|
||||||
|
Value = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 移动速度
|
/// 特效类型
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public float MoveSpeed;
|
public enum EffectType
|
||||||
|
{
|
||||||
/// <summary>
|
[LabelText("攻击")] OnAttack = 0,
|
||||||
/// 攻击速度
|
[LabelText("受伤")] OnHit,
|
||||||
/// </summary>
|
[LabelText("被动")] Passive,
|
||||||
public float AttackSpeed;
|
[LabelText("死亡")] OnDeath,
|
||||||
|
[LabelText("活着")] Active
|
||||||
public List<Buff> Buffs;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,3 +1,3 @@
|
||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 47a7d9b0ed9e47da9853f87dab16a22d
|
guid: 42237bc46d9e421b94e6a470cc444ea0
|
||||||
timeCreated: 1739341647
|
timeCreated: 1739781022
|
|
@ -1,10 +1,9 @@
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Game
|
namespace Game
|
||||||
{
|
{
|
||||||
public class EquipmentConfigObject : ScriptableObject
|
public class EquipmentConfigObject : ScriptableObject
|
||||||
{
|
{
|
||||||
public List<EquipmentConfig> configs = new List<EquipmentConfig>();
|
public EquipmentConfig equipmentConfig;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,3 +1,3 @@
|
||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 9760057cf54c41f5a73fd4c9bf233107
|
guid: 801ddbf83bed40c68c1fb4410ffa1b26
|
||||||
timeCreated: 1739501374
|
timeCreated: 1739781541
|
|
@ -1,11 +1,10 @@
|
||||||
using Game;
|
using Game;
|
||||||
using Sirenix.OdinInspector;
|
using Sirenix.OdinInspector;
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
namespace Game
|
namespace Game
|
||||||
{
|
{
|
||||||
[System.Serializable]
|
[System.Serializable]
|
||||||
public class HeroConfig : ScriptableObject
|
public class HeroConfig
|
||||||
{
|
{
|
||||||
[LabelText("基本属性")] public BasicStats BasicStats = new BasicStats();
|
[LabelText("基本属性")] public BasicStats BasicStats = new BasicStats();
|
||||||
[LabelText("技能")] public Ability Ability = new Ability();
|
[LabelText("技能")] public Ability Ability = new Ability();
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace Game
|
||||||
|
{
|
||||||
|
public class HeroConfigObject : ScriptableObject
|
||||||
|
{
|
||||||
|
public HeroConfig heroConfig;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: f5857a6e57b946778e3be8421becb813
|
||||||
|
timeCreated: 1739781602
|
|
@ -0,0 +1,38 @@
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace Game
|
||||||
|
{
|
||||||
|
public interface IEquipment
|
||||||
|
{
|
||||||
|
string Name { get; }
|
||||||
|
string Description { get; }
|
||||||
|
EquipmentType Type { get; }
|
||||||
|
List<StatModifier> Stats { get; }
|
||||||
|
List<Effect> Effects { get; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class Equipment : IEquipment
|
||||||
|
{
|
||||||
|
private string _name;
|
||||||
|
private string _description;
|
||||||
|
private EquipmentType _type;
|
||||||
|
private List<StatModifier> _stats;
|
||||||
|
private List<Effect> _effects;
|
||||||
|
|
||||||
|
public string Name => _name; // 装备名称
|
||||||
|
public string Description => _description; // 装备描述
|
||||||
|
public EquipmentType Type => _type; // 装备类型(基础装备、合成装备)
|
||||||
|
public List<StatModifier> Stats => _stats; // 装备的属性加成(攻击力、生命值等)
|
||||||
|
public List<Effect> Effects => _effects; // 装备附带的技能效果
|
||||||
|
|
||||||
|
public Equipment(string name, string description, EquipmentType type, List<StatModifier> stats,
|
||||||
|
List<Effect> effects)
|
||||||
|
{
|
||||||
|
_name = name;
|
||||||
|
_description = description;
|
||||||
|
_type = type;
|
||||||
|
_stats = stats;
|
||||||
|
_effects = effects;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 08abb694332d4d68addfd7eeca9e0a00
|
||||||
|
timeCreated: 1739772915
|
|
@ -0,0 +1,24 @@
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace Game
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 装备合成系统
|
||||||
|
/// </summary>
|
||||||
|
public class EquipmentCraftingSystem
|
||||||
|
{
|
||||||
|
// 合成装备的方法
|
||||||
|
public Equipment Combine(Equipment base1, Equipment base2)
|
||||||
|
{
|
||||||
|
if (base1.Name == "长剑" && base2.Name == "锁子甲")
|
||||||
|
{
|
||||||
|
return new Equipment("巨人杀手", "增加对高生命值单位的伤害", EquipmentType.Composite,
|
||||||
|
new List<StatModifier> { new StatModifier(StatType.AttackDamage, 25) },
|
||||||
|
new List<Effect> { new Effect("巨人杀手效果", "对高生命值单位造成额外伤害", EffectType.OnAttack, 0.5f) });
|
||||||
|
}
|
||||||
|
// 可以加入更多合成配方
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 74d23ffeab1f4a7eb1e64aee0f83a542
|
||||||
|
timeCreated: 1739772807
|
|
@ -1,23 +0,0 @@
|
||||||
|
|
||||||
|
|
||||||
namespace Game
|
|
||||||
{
|
|
||||||
public interface IEquipment
|
|
||||||
{
|
|
||||||
public EquipmentConfig Config { get; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public class Equipment: IEquipment
|
|
||||||
{
|
|
||||||
private readonly EquipmentConfig _config;
|
|
||||||
|
|
||||||
public EquipmentConfig Config => _config;
|
|
||||||
|
|
||||||
public Equipment(EquipmentConfig config)
|
|
||||||
{
|
|
||||||
_config = config;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,3 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: 9d49492e3d874d77bcfd8d0c6f8c9cdf
|
|
||||||
timeCreated: 1739341157
|
|
|
@ -1,30 +1,30 @@
|
||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||||
# Visual Studio 2010
|
# Visual Studio 2010
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp", "Assembly-CSharp.csproj", "{db430628-afcc-15b9-a13d-1b1445c0ac9e}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UniTask", "UniTask.csproj", "{b33caf15-00db-b242-2798-94edfc2cf1ca}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UniTask", "UniTask.csproj", "{b33caf15-00db-b242-2798-94edfc2cf1ca}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UniTask.Linq", "UniTask.Linq.csproj", "{1e901612-5c3c-b94d-9db5-2be9b9df0073}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UniTask.Linq", "UniTask.Linq.csproj", "{1e901612-5c3c-b94d-9db5-2be9b9df0073}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IngameDebugConsole.Runtime", "IngameDebugConsole.Runtime.csproj", "{7be0dff6-09ef-113f-7cd3-fef37a443a86}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp", "Assembly-CSharp.csproj", "{db430628-afcc-15b9-a13d-1b1445c0ac9e}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp-firstpass", "Assembly-CSharp-firstpass.csproj", "{661b6135-93f9-52e6-06de-5ff2d18ce282}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp-firstpass", "Assembly-CSharp-firstpass.csproj", "{661b6135-93f9-52e6-06de-5ff2d18ce282}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UniTask.TextMeshPro", "UniTask.TextMeshPro.csproj", "{c8404026-038c-5766-1448-fc8a21f634ef}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UniTask.DOTween", "UniTask.DOTween.csproj", "{d741516d-fe49-ad54-6737-d1a789d3fd68}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UniTask.DOTween", "UniTask.DOTween.csproj", "{d741516d-fe49-ad54-6737-d1a789d3fd68}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IngameDebugConsole.Runtime", "IngameDebugConsole.Runtime.csproj", "{7be0dff6-09ef-113f-7cd3-fef37a443a86}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UniTask.TextMeshPro", "UniTask.TextMeshPro.csproj", "{c8404026-038c-5766-1448-fc8a21f634ef}"
|
||||||
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UniTask.Addressables", "UniTask.Addressables.csproj", "{984919b2-accc-eb35-0e1e-d329cdd4ed80}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UniTask.Addressables", "UniTask.Addressables.csproj", "{984919b2-accc-eb35-0e1e-d329cdd4ed80}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp-Editor", "Assembly-CSharp-Editor.csproj", "{545f664e-4dc3-d197-fc2a-dc342731d9f8}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp-Editor-firstpass", "Assembly-CSharp-Editor-firstpass.csproj", "{01b899be-da25-212b-20cb-9f7efc1eb26d}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UniTask.Editor", "UniTask.Editor.csproj", "{1a76d137-0d21-c471-5d99-592d7abeae97}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UniTask.Editor", "UniTask.Editor.csproj", "{1a76d137-0d21-c471-5d99-592d7abeae97}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp-Editor-firstpass", "Assembly-CSharp-Editor-firstpass.csproj", "{01b899be-da25-212b-20cb-9f7efc1eb26d}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IngameDebugConsole.Editor", "IngameDebugConsole.Editor.csproj", "{ad421ac5-8ea7-b58b-bdb3-3168c60dfc12}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IngameDebugConsole.Editor", "IngameDebugConsole.Editor.csproj", "{ad421ac5-8ea7-b58b-bdb3-3168c60dfc12}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp-Editor", "Assembly-CSharp-Editor.csproj", "{545f664e-4dc3-d197-fc2a-dc342731d9f8}"
|
||||||
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sirenix.OdinInspector.Modules.UnityMathematics", "Sirenix.OdinInspector.Modules.UnityMathematics.csproj", "{6e2d16b1-6570-c20b-4370-8c536f56d41b}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sirenix.OdinInspector.Modules.UnityMathematics", "Sirenix.OdinInspector.Modules.UnityMathematics.csproj", "{6e2d16b1-6570-c20b-4370-8c536f56d41b}"
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
|
@ -32,30 +32,30 @@ Global
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
{db430628-afcc-15b9-a13d-1b1445c0ac9e}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{db430628-afcc-15b9-a13d-1b1445c0ac9e}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{b33caf15-00db-b242-2798-94edfc2cf1ca}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{b33caf15-00db-b242-2798-94edfc2cf1ca}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{b33caf15-00db-b242-2798-94edfc2cf1ca}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{b33caf15-00db-b242-2798-94edfc2cf1ca}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{1e901612-5c3c-b94d-9db5-2be9b9df0073}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{1e901612-5c3c-b94d-9db5-2be9b9df0073}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{1e901612-5c3c-b94d-9db5-2be9b9df0073}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{1e901612-5c3c-b94d-9db5-2be9b9df0073}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{7be0dff6-09ef-113f-7cd3-fef37a443a86}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{db430628-afcc-15b9-a13d-1b1445c0ac9e}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{7be0dff6-09ef-113f-7cd3-fef37a443a86}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{db430628-afcc-15b9-a13d-1b1445c0ac9e}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{661b6135-93f9-52e6-06de-5ff2d18ce282}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{661b6135-93f9-52e6-06de-5ff2d18ce282}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{661b6135-93f9-52e6-06de-5ff2d18ce282}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{661b6135-93f9-52e6-06de-5ff2d18ce282}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{c8404026-038c-5766-1448-fc8a21f634ef}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{c8404026-038c-5766-1448-fc8a21f634ef}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{d741516d-fe49-ad54-6737-d1a789d3fd68}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{d741516d-fe49-ad54-6737-d1a789d3fd68}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{d741516d-fe49-ad54-6737-d1a789d3fd68}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{d741516d-fe49-ad54-6737-d1a789d3fd68}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{7be0dff6-09ef-113f-7cd3-fef37a443a86}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{7be0dff6-09ef-113f-7cd3-fef37a443a86}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{c8404026-038c-5766-1448-fc8a21f634ef}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{c8404026-038c-5766-1448-fc8a21f634ef}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{984919b2-accc-eb35-0e1e-d329cdd4ed80}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{984919b2-accc-eb35-0e1e-d329cdd4ed80}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{984919b2-accc-eb35-0e1e-d329cdd4ed80}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{984919b2-accc-eb35-0e1e-d329cdd4ed80}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{545f664e-4dc3-d197-fc2a-dc342731d9f8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{545f664e-4dc3-d197-fc2a-dc342731d9f8}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{1a76d137-0d21-c471-5d99-592d7abeae97}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{1a76d137-0d21-c471-5d99-592d7abeae97}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{01b899be-da25-212b-20cb-9f7efc1eb26d}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{01b899be-da25-212b-20cb-9f7efc1eb26d}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{01b899be-da25-212b-20cb-9f7efc1eb26d}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{01b899be-da25-212b-20cb-9f7efc1eb26d}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{1a76d137-0d21-c471-5d99-592d7abeae97}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{1a76d137-0d21-c471-5d99-592d7abeae97}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{ad421ac5-8ea7-b58b-bdb3-3168c60dfc12}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{ad421ac5-8ea7-b58b-bdb3-3168c60dfc12}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{ad421ac5-8ea7-b58b-bdb3-3168c60dfc12}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{ad421ac5-8ea7-b58b-bdb3-3168c60dfc12}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{545f664e-4dc3-d197-fc2a-dc342731d9f8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{545f664e-4dc3-d197-fc2a-dc342731d9f8}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{6e2d16b1-6570-c20b-4370-8c536f56d41b}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{6e2d16b1-6570-c20b-4370-8c536f56d41b}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{6e2d16b1-6570-c20b-4370-8c536f56d41b}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{6e2d16b1-6570-c20b-4370-8c536f56d41b}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
|
|
Loading…
Reference in New Issue