Skip to content

Instantly share code, notes, and snippets.

@Kryzarel
Last active November 30, 2017 22:49
Show Gist options
  • Save Kryzarel/0ba2d436b13f32e28aa9d2ce1158c080 to your computer and use it in GitHub Desktop.
Save Kryzarel/0ba2d436b13f32e28aa9d2ce1158c080 to your computer and use it in GitHub Desktop.
Added Order
// Add this variable to the top of the class
public readonly int Order;
// Change the existing constructor to look like this
public StatModifier(float value, StatModType type, int order)
{
Value = value;
Type = type;
Order = order;
}
// Add a new constructor that automatically sets a default Order, in case the user doesn't want to manually define it
public StatModifier(float value, StatModType type) : this(value, type, (int)type) { }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment