using System.Collections.Generic; using UnityEngine; namespace Game { public class Buff { public string Name; // Buff的名称,例如"战士"、"游侠"等 public string Description; // Buff的描述 public List Effects; // Buff带来的效果(可以是多个效果) public Buff(string name, string description, List effects) { Name = name; Description = description; Effects = effects; } // // 血量、蓝量、攻击力、防御力、攻击速度、回蓝速度、回血速度、 // 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); } }