In my recreation abilities might be leveled as much as modify base stats like decreasing cooldown by 20% and rising fired projectile depend by one. How would I architect the system so that every ability has its personal customized improve tiers for instance:
Projectile Ability Tier 1:
- Cooldown -20%
- Projectile Rely +1
Projectile Ability Tier 2:
- Cooldown -10%
- Projectile Rely +2
public summary class Ability : ScriptableObject
{
public float Cooldown;
public summary void Activate(Participant participant);
}
And an instance of a subclassed ability:
public class ProjectileSkill : Ability
{
[SerializeField] Projectile _projectile;
[SerializeField] int _projectileCount;
public override void Activate(Participant participant)
{
// Instantiates variety of projectiles
}
}
What I’ve tried:
- Storing the state within the scriptable object and updating the values. Nevertheless that is saved between periods whereas it must reset.
public void LevelUp()
{
_projectileCount++;
}