Example #1
0
 /// <summary>
 /// 段位認定の条件を初期化し、生成します。
 /// </summary>
 /// <param name="examType">条件の種別。</param>
 /// <param name="value">条件の合格量。</param>
 /// <param name="examRange">条件の合格の範囲。</param>
 public Dan_C(Exam.Type examType, int[] value, Exam.Range examRange)
 {
     IsEnable   = true;
     NotReached = false;
     SetExamType(examType);
     SetValue(value[0], value[1]);
     SetExamRange(examRange);
 }
Example #2
0
        /// <summary>
        /// 段位認定の条件を初期化し、生成します。
        /// </summary>
        /// <param name="examType">条件の種別。</param>
        /// <param name="value">条件の合格量。</param>
        /// <param name="examRange">条件の合格の範囲。</param>
        public Dan_C(Exam.Type examType, int[] value, Exam.Range examRange)
        {
            IsEnable   = true;
            NotReached = false;
            Type       = examType;
            Range      = examRange;

            if (value.Length > 2 && examType != Exam.Type.Gauge && examType != Exam.Type.Combo && examType != Exam.Type.Score)
            {
                IsForEachSongs = true;
            }
            else
            {
                IsForEachSongs = false;
            }

            #region [Valueの代入]
            List <int> valuetmp = new List <int>();
            this.Value = new int[value.Length];
            for (int i = 0; i < value.Length; i++)
            {
                if (value[i] != -1)
                {
                    valuetmp.Add(value[i]);
                }
            }
            if (valuetmp.Count % 2 != 0)
            {
                valuetmp.Add(valuetmp[valuetmp.Count - 1]);
            }
            this.Value = valuetmp.ToArray();
            #endregion

            #region [IsClearedの代入]
            this.IsCleared = new bool[Value.Length];
            for (int i = 0; i < Value.Length; i++)
            {
                IsCleared[i] = false;
            }
            #endregion

            #region [Amountの初期化]
            Amount = new int[Value.Length / 2];
            for (int i = 0; i < Value.Length / 2; i++)
            {
                Amount[i] = 0;
            }
            #endregion

            this.NowSongNum = 0;
        }
Example #3
0
 /// <summary>
 /// 条件の種別を設定します。
 /// </summary>
 /// <param name="type">条件の種別。</param>
 private void SetExamType(Exam.Type type)
 {
     this.Type = type;
 }