-
-
Save ppolsinelli/2b72c398abf80eb1fac22aaeb6eaa1d7 to your computer and use it in GitHub Desktop.
Preserve production values in Scriptable Objects
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
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