Skip to content

Instantly share code, notes, and snippets.

@luisferblink
Created December 1, 2018 18:26
Show Gist options
  • Save luisferblink/73ccee82360fe75ed4bd44b09fb8547b to your computer and use it in GitHub Desktop.
Save luisferblink/73ccee82360fe75ed4bd44b09fb8547b to your computer and use it in GitHub Desktop.
Private variables
#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