public static PunyonStuffRoll inst(int lv) { PunyonStuffRoll psr = Resources.Load <GameObject>("Prefabs/PunyonStuffRoll").GetComponent <PunyonStuffRoll>(); psr.Initialize(lv); return(psr); }
public static KeyValuePair <float, int>[] GetCounter(int lv, int randomCount) { var s = PunyonStuffRoll.inst(lv); var kp = new Dictionary <float, int>(); float result; for (int i = 0; i < randomCount; i++) { result = GetResult(s.Roll()); if (!kp.ContainsKey(result)) { kp.Add(result, 0); } kp[result]++; } var skp = from data in kp orderby data.Key select data; return(skp.ToArray()); }