yeah i think that's commit worthy

This commit is contained in:
reisenlol 2026-01-23 00:55:00 -08:00
parent 49cf2f2bb9
commit fada3af715
No known key found for this signature in database
16 changed files with 658 additions and 29 deletions

View file

@ -3,12 +3,17 @@ using UnityEngine;
public class OfficerAbilities : MonoBehaviour
{
public PlayerEntity thisEntity;
[Header("Kills")]
[SerializeField] private int killQuota;
private int currentKills;
public PlayerEntity thisEntity;
[Header("Length")]
[SerializeField] private int abilityLength;
[SerializeField] private int roundsRemaining;
private void Start()
{
Enemy.OnKill += UpdateKillQuota;
TurnHandler.waveUpdate += UpdateRounds;
}
private void UpdateKillQuota(Entity entity)
@ -19,8 +24,34 @@ public class OfficerAbilities : MonoBehaviour
currentKills = Mathf.Clamp(currentKills, 0, killQuota);
}
}
private void UpdateRounds()
{
if (roundsRemaining > 0)
{
roundsRemaining--;
if (roundsRemaining <= 0)
{
DeactivateAbility();
}
}
}
public void ActivateAbility()
{
if (currentKills >= killQuota)
{
currentKills = 0;
roundsRemaining = abilityLength;
AbilityEffects();
}
}
protected virtual void AbilityEffects()
{
}
protected virtual void DeactivateAbility()
{
}