Created
June 24, 2021 08:42
-
-
Save daniele-quero/9b8bf741daf80b9b1414bab826ffd718 to your computer and use it in GitHub Desktop.
damage player method
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void Damage(int dmg) | |
{ | |
_lives -= dmg; | |
if (_lives < 0) | |
GameObject.Destroy(this.gameObject); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment