Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Mr BigSock
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gard Aleksander Furre
Mr BigSock
Commits
32eb2753
Commit
32eb2753
authored
2 years ago
by
Gard Aleksander Furre
Browse files
Options
Downloads
Patches
Plain Diff
fixed hp bar did not update on heal
parent
ff2699ba
No related branches found
No related tags found
1 merge request
!87
Gardaf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
MrBigsock/Assets/Code/Character.cs
+5
-0
5 additions, 0 deletions
MrBigsock/Assets/Code/Character.cs
MrBigsock/Assets/Code/PlayerController.cs
+4
-0
4 additions, 0 deletions
MrBigsock/Assets/Code/PlayerController.cs
with
9 additions
and
0 deletions
MrBigsock/Assets/Code/Character.cs
+
5
−
0
View file @
32eb2753
...
...
@@ -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.
*/
...
...
This diff is collapsed.
Click to expand it.
MrBigsock/Assets/Code/PlayerController.cs
+
4
−
0
View file @
32eb2753
...
...
@@ -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
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment