entity changes, classes
This commit is contained in:
parent
bda2b88796
commit
8bd4aedcf9
20 changed files with 1917 additions and 27 deletions
27
Assets/Scripts/OfficerAbilities.cs
Normal file
27
Assets/Scripts/OfficerAbilities.cs
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
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()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue