/// <summary> /// 各ステージでのステップ情報を与えられた条件からランダム生成します。 /// </summary> /// <returns>The step infos.</returns> /// <param name="size">Size.</param> /// <param name="panelNum">Panel number.</param> /// <param name="minFlush">Minimum flush.</param> /// <param name="maxFlush">Max flush.</param> /// <param name="weightedIntervals">Weighted intervals.</param> protected List <StepInfo> CreateStepInfos(int size, int panelNum, float minFlush, float maxFlush, Dictionary <float, int> weightedIntervals) { List <StepInfo> stepInfos = new List <StepInfo>(); float startTime = 0.1f; for (int i = 0; i < size; i++) { float flushTime = RandomUtil.RandomFloat(minFlush, maxFlush); Color color = RandomUtil.RandomColor(); while (color.grayscale < 0.5f) { // 黒っぽい色だと取り直し color = RandomUtil.RandomColor(); } stepInfos.Add(new StepInfo(RandomUtil.DrawNewInt(0, panelNum - 1), color, startTime, flushTime)); startTime += (flushTime + RandomUtil.Draw(weightedIntervals)); } return(stepInfos); }