public void SetData(RankData data) { if (!initialized) { Init(); } rankDatas[(int)data.Kind] = data; }
void RandomGenerate(RankKind kind, int lengthTop, int lengthAroundPlayer) { var allTimes = RandomUtil .Generate(() => Random.Range(20f, 100f), lengthTop + lengthAroundPlayer) .OrderBy(time => time); RankDatum[] top = allTimes .Take(lengthTop) .Select((time, i) => new RankDatum(RandName(), i + 1, time)) .ToArray(); RankDatum[] aroundYou = allTimes .Skip(lengthTop) .Select((time, i) => new RankDatum(RandName(), lengthTop + 67 + i + 1, time)) //67は適当 .ToArray(); datas[(int)kind] = new RankData(kind, top, aroundYou); }
public void Show(RankKind kind) { current = datas[(int)kind]; }
public void SetData(RankData data) { datas[(int)data.Kind] = data; }
public void SetData(RankData data) { this.data = data; }