projectEli/Assets/NeoFPS/Core/Damage/IShieldManager.cs
2022-11-06 20:28:33 -05:00

37 lines
1.1 KiB
C#

using UnityEngine;
namespace NeoFPS
{
public interface IShieldManager
{
float shield { get; set; }
float shieldChargeRate { get; set; }
float shieldStepCapacity { get; set; }
int shieldStepCount { get; set; }
ShieldState shieldState { get; }
event ShieldDelegates.OnShieldValueChanged onShieldValueChanged;
event ShieldDelegates.OnShieldStateChanged onShieldStateChanged;
event ShieldDelegates.OnShieldConfigChanged onShieldConfigChanged;
float GetShieldedDamage(float damage, DamageType t);
int FillShieldSteps(int count = 1);
int EmptyShieldSteps(int count = 1);
}
public enum ShieldState
{
Stable,
Empty,
Recharging,
Interrupted
}
public static class ShieldDelegates
{
public delegate void OnShieldStateChanged(IShieldManager shield, ShieldState state);
public delegate void OnShieldValueChanged(IShieldManager shield, float from, float to);
public delegate void OnShieldConfigChanged(IShieldManager shield);
}
}