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

52 lines
1.6 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

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