Created
December 1, 2018 18:26
-
-
Save luisferblink/73ccee82360fe75ed4bd44b09fb8547b to your computer and use it in GitHub Desktop.
Private variables
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
#region Private Variables create a private variables to make secure your code and to access to the variable make a propierty of this variable | |
[SerializeField] private float damage; | |
public float Damage { | |
get{ | |
return damage; | |
} | |
set{ | |
if (value > 10) | |
damage = value; | |
else | |
damage = 10; | |
} | |
} | |
#endregion |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment