Last active
November 30, 2017 22:49
-
-
Save Kryzarel/0ba2d436b13f32e28aa9d2ce1158c080 to your computer and use it in GitHub Desktop.
Added Order
This file contains 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
// 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