JinChanChan/Assets/Scripts/Game/Buff/Buff.cs

52 lines
1.6 KiB
C#
Raw Normal View History

2025-02-17 18:00:01 +08:00
using System.Collections.Generic;
using UnityEngine;
namespace Game
{
2025-02-17 18:00:01 +08:00
public class Buff
{
2025-02-17 18:00:01 +08:00
public string Name; // Buff的名称例如"战士"、"游侠"等
public string Description; // Buff的描述
public List<BuffEffect> Effects; // Buff带来的效果可以是多个效果
2025-02-17 18:00:01 +08:00
public Buff(string name, string description, List<BuffEffect> effects)
{
2025-02-17 18:00:01 +08:00
Name = name;
Description = description;
Effects = effects;
}
2025-02-17 18:00:01 +08:00
// // 血量、蓝量、攻击力、防御力、攻击速度、回蓝速度、回血速度、
// public string BuffName;
// public float BuffDuration; // Buff 持续时间(秒)
// public float TimeRemaining; // 剩余时间
// public Character ApplyCharacter;
//
// protected Buff(string buffName, float buffDuration)
// {
// BuffName = buffName;
// BuffDuration = buffDuration;
// }
//
// // Buff 更新,减少剩余时间
// public void Update(float deltaTime)
// {
// TimeRemaining -= deltaTime;
// if (TimeRemaining <= 0)
// {
// OnBuffExpire();
// }
// } // Buff 过期时调用
//
// protected virtual void OnBuffExpire()
// {
// Debug.Log($"{BuffName} expired!");
// }
//
// // Buff 应用效果
// public abstract void ApplyEffect(Character character);
//
// // Buff 移除效果
// public abstract void RemoveEffect(Character character);
}
}