DodongosQuest.RandomNumberProvider.CheckIfChanceOccurs C# (CSharp) Méthode

CheckIfChanceOccurs() public static méthode

public static CheckIfChanceOccurs ( int percentChance ) : bool
percentChance int
Résultat bool
        public static bool CheckIfChanceOccurs(int percentChance)
        {
            int outcome = GetRandomNumber(0, 100);
            if (outcome <= percentChance)
                return true;
            else
                return false;
        }