Preserve production values in Scriptable Objects
public class EndogenousLikelyhoods : ScriptableObject | |
{ | |
... | |
[DeRange(0, 1)] | |
[SerializeField] | |
float ChanceOfGoalProduction; | |
[DeRange(0, 1)] | |
[SerializeField] | |
float ChanceOfGoalDevelopment; | |
public float ChanceOfGoal() | |
{ | |
if ([check your production criteria]) | |
{ | |
return ChanceOfGoalProduction; | |
} | |
else | |
{ | |
return ChanceOfGoalDevelopment; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment