Skip to content
Snippets Groups Projects
Commit 6b060ea8 authored by Robin Halseth Sandvik's avatar Robin Halseth Sandvik
Browse files

Made some methods overridable.

- Also removed depricated method.
parent 3fba0830
No related branches found
No related tags found
1 merge request!15Fixing knockback & movement.
......@@ -101,16 +101,7 @@ namespace BigSock {
/*
Adds damage to the player if they don't have IFrames.
*/
public bool TakeDamage(float amount) {
return TakeDamage(new AttackStats{
Damage = amount,
});
}
/*
Adds damage to the player if they don't have IFrames.
*/
public bool TakeDamage(IAttackStats attack) {
public virtual bool TakeDamage(IAttackStats attack) {
// Check if player has IFrames
if(NextTimeCanTakeDamage > DateTime.Now)
return false;
......@@ -155,7 +146,7 @@ namespace BigSock {
/*
Method for what to do when the character dies.
*/
protected void OnDeath() {
protected virtual void OnDeath() {
print($"[Character.TryKill()] start. | {HP}, {Alive}");
Destroy(gameObject);
}
......
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