Blood tokens

This commit is contained in:
Yann Dupont 01 2022-04-02 12:34:07 -04:00
parent 24d739af4a
commit 2284280d01
2 changed files with 6 additions and 3 deletions

View File

@ -72,12 +72,14 @@ public class BloodSucker : MonoBehaviour {
void PerformSuck(float deltaTime) {
currentSuckTimer -= deltaTime;
if (currentSuckTimer < 0f) {
currentTarget.bloodTokens -= 1;
// print("One token sucked");
// TODO check if no token left
if(currentTarget.bloodTokens == 0) {
SetTarget(null);
isSucking = false;
}
}
}
void HighlightTarget() {

View File

@ -6,6 +6,7 @@ using UnityEngine;
public class Entity : MonoBehaviour
{
[field: SerializeField]public float Health { get; private set; }
public int bloodTokens = 1;
[SerializeField]private float movementSpeed;
[SerializeField]private float rotSpeed;
[SerializeField]private float fov;