Skip to content
Snippets Groups Projects
Commit 32eb2753 authored by Gard Aleksander Furre's avatar Gard Aleksander Furre
Browse files

fixed hp bar did not update on heal

parent ff2699ba
No related branches found
No related tags found
1 merge request!87Gardaf
......@@ -315,6 +315,7 @@ namespace BigSock {
var res = HP + amount;
if(res > MaxHP) res = MaxHP;
HP = res;
AfterHeal();
return true;
}
......@@ -326,6 +327,10 @@ namespace BigSock {
KnockBack(attack);
}
protected virtual void AfterHeal() {
}
/*
Method for what to do when the character dies.
*/
......
......@@ -312,6 +312,10 @@ namespace BigSock {
utilBar?.WithHealth(Convert.ToInt32(HP));
}
protected override void AfterHeal() {
utilBar?.WithHealth(Convert.ToInt32(HP));
}
public void GainXp(float xp) {
GiveXp(xp * XP_SCALE_RATE);
CheckXp();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment