using UnityEngine; public static class Randomizer { private static readonly int[][] Numbers = new int[][] { new int[] { 320, 40, 20, 12, 4, 3, 1 }, new int[] { 0, 1, 3, 5, 8, 9, 15 } }; public static int GetResult() { var value = Random.Range(0, 400); var count = 0; for (var i = 0; i < Numbers[0].Length; i++) { count += Numbers[0][i]; if (value < count) return Numbers[1][i]; } return Numbers[1][Numbers[1].Length - 1]; } }