Skip to content

Instantly share code, notes, and snippets.

@jawinn
Created July 14, 2016 22:26
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Unity Number Ranges and Serialized Class (Expandable)
[System.Serializable]
public class Movement
{
[Range(1f, 12.0f)]
public float speed = 6.0F;
[Range(1f, 12.0f)]
public float runSpeed = 8.0F;
[Range(1f, 12.0f)]
public float jumpSpeed = 8.0F;
[Range(0f, 1.0f)]
[Tooltip("Percent of speed")]
public float inAirControl = 0.25f;
[Range(1f, 12.0f)]
public float crouchWalkSpeed = 2.0F;
}
[Tooltip("Player speeds, etc.")]
public Movement movement;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment