Blood tokens
This commit is contained in:
parent
24d739af4a
commit
2284280d01
@ -72,12 +72,14 @@ public class BloodSucker : MonoBehaviour {
|
|||||||
void PerformSuck(float deltaTime) {
|
void PerformSuck(float deltaTime) {
|
||||||
currentSuckTimer -= deltaTime;
|
currentSuckTimer -= deltaTime;
|
||||||
if (currentSuckTimer < 0f) {
|
if (currentSuckTimer < 0f) {
|
||||||
|
currentTarget.bloodTokens -= 1;
|
||||||
// print("One token sucked");
|
// print("One token sucked");
|
||||||
// TODO check if no token left
|
if(currentTarget.bloodTokens == 0) {
|
||||||
SetTarget(null);
|
SetTarget(null);
|
||||||
isSucking = false;
|
isSucking = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void HighlightTarget() {
|
void HighlightTarget() {
|
||||||
|
|
||||||
|
|||||||
@ -6,6 +6,7 @@ using UnityEngine;
|
|||||||
public class Entity : MonoBehaviour
|
public class Entity : MonoBehaviour
|
||||||
{
|
{
|
||||||
[field: SerializeField]public float Health { get; private set; }
|
[field: SerializeField]public float Health { get; private set; }
|
||||||
|
public int bloodTokens = 1;
|
||||||
[SerializeField]private float movementSpeed;
|
[SerializeField]private float movementSpeed;
|
||||||
[SerializeField]private float rotSpeed;
|
[SerializeField]private float rotSpeed;
|
||||||
[SerializeField]private float fov;
|
[SerializeField]private float fov;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user