Implemented armor and diamond ability
This commit is contained in:
parent
c42406e615
commit
0c4592ac7c
6 changed files with 113 additions and 1 deletions
|
|
@ -6,7 +6,8 @@ using UnityEngine.Serialization;
|
|||
public class Player : MonoBehaviour
|
||||
{
|
||||
public event Action<int> DiamondCountUpdated;
|
||||
public event Action<int> HealthUpdated;
|
||||
public event Action<int> HealthUpdated;
|
||||
public event Action<int> DamageTaken;
|
||||
|
||||
[SerializeField] private int maxHealth;
|
||||
[SerializeField] private int diamonds;
|
||||
|
|
@ -44,6 +45,7 @@ public class Player : MonoBehaviour
|
|||
_healthIndex += damage;
|
||||
UpdateGUI();
|
||||
}
|
||||
DamageTaken?.Invoke(damage);
|
||||
}
|
||||
|
||||
public void Heal(int healAmount)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue