I have this interface IHasCooldown with these properties:
int Id { get; }
float CooldownDuration { get; }
In another class (let's call Attack), I set the Id as the atkId and the CooldownDuration as attackCooldown. The attackCooldown being a property so it can be changed.
public float attackCooldown { get; set; }
int atkId = 2;
public int Id => atkId;
public float CooldownDuration => attackCooldown;
Finally, in class SubAttack, I set the attackCooldown to 10. But since CooldownDuration is set at the start, any change afterwards isn't computed.
Also, a lambda operator is a bit hairy for me yet.. Got this part from a tutorial.
I'd love to hear some ideas on how to tackle this!
The cooldown system that I got is from here, but since it doesn't account for variable times, I'm tweaking it a little bit. https://www.youtube.com/watch?v=2zGvt4NnIYw