27 lines
539 B
C#
27 lines
539 B
C#
using System;
|
|
using UnityEngine;
|
|
|
|
public class OfficerAbilities : MonoBehaviour
|
|
{
|
|
[SerializeField] private int killQuota;
|
|
private int currentKills;
|
|
public PlayerEntity thisEntity;
|
|
private void Start()
|
|
{
|
|
Enemy.OnKill += UpdateKillQuota;
|
|
}
|
|
|
|
private void UpdateKillQuota(Entity entity)
|
|
{
|
|
if (entity == thisEntity)
|
|
{
|
|
currentKills++;
|
|
currentKills = Mathf.Clamp(currentKills, 0, killQuota);
|
|
}
|
|
}
|
|
|
|
public void ActivateAbility()
|
|
{
|
|
|
|
}
|
|
}
|