feat(): 大量更新

This commit is contained in:
2025-10-15 21:31:13 +08:00
parent 546f08c53a
commit 668bfe12eb
178 changed files with 11318 additions and 446 deletions

View File

@@ -0,0 +1,16 @@
using UnityEngine;
using Share;
namespace Gameplay
{
public class CardContext
{
public ICharacter Owner;
public ICharacter Enemy;
public CardContext(ICharacter owner,ICharacter enemy)
{
Owner = owner;
Enemy = enemy;
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 7279b5677f724ab4b93bd1028542d110
timeCreated: 1760420712

View File

@@ -0,0 +1,26 @@
using UnityEngine;
namespace Gameplay
{
[System.Serializable]
public class EffectData
{
public EffectType type; // 效果类型,例如攻击、治疗、抽卡
public int value; // 参数值
public TargetType target; // 可选参数:目标类型("self", "enemy", "all"
}
public enum TargetType
{
Self,
Enemy,
All,
None
}
public enum EffectType
{
Damage,
Heal,
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 5790e0b2fbce41c99a775bbacca0e2bc
timeCreated: 1760420527

View File

@@ -0,0 +1,24 @@
using UnityEngine;
namespace Gameplay
{
public static class EffectHandler
{
public static void Execute(EffectData effect, CardContext context)
{
switch (effect.type)
{
case EffectType.Damage:
context.Enemy.TakeDamage(effect.value);
break;
case EffectType.Heal:
context.Enemy.Heal(effect.value);
break;
default:
Debug.Log($"未知效果类型: {effect.type}");
break;
}
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 032e368e3d5846d78caf5f3239de979f
timeCreated: 1760420695