@@ -116,7 +116,6 @@ public CCounter()
116116 this . n現在の値 = 0 ;
117117 this . n現在の経過時間ms = CTimer . nUnused ;
118118
119- this . timerdb = null ;
120119 this . db開始値 = 0 ;
121120 this . db終了値 = 0 ;
122121 this . _db間隔 = 0 ;
@@ -131,6 +130,13 @@ public CCounter(int n開始値, int n終了値, int n間隔ms, CTimer timer)
131130 this . t開始 ( n開始値 , n終了値 , n間隔ms , timer ) ;
132131 }
133132
133+ /// <summary>生成と同時に開始する。(double版)</summary>
134+ public CCounter ( double db開始値 , double db終了値 , double db間隔 , CTimer timer )
135+ : this ( )
136+ {
137+ this . t開始 ( db開始値 , db終了値 , db間隔 * 1000.0 , timer ) ;
138+ }
139+
134140 /// <summary>生成と同時に開始する。(double版)</summary>
135141 public CCounter ( double db開始値 , double db終了値 , double db間隔 , CSoundTimer timer )
136142 : this ( )
@@ -148,7 +154,7 @@ public CCounter(double db開始値, double db終了値, double db間隔, CSoundT
148154 /// <param name="n終了値">最後のカウント値。</param>
149155 /// <param name="n間隔ms">カウント値を1増加させるのにかける時間(ミリ秒単位)。</param>
150156 /// <param name="timer">カウントに使用するタイマ。</param>
151- public void t開始 ( int n開始値 , int n終了値 , int n間隔ms , CTimer timer )
157+ public void t開始 ( int n開始値 , int n終了値 , int n間隔ms , CTimerBase timer )
152158 {
153159 this . n開始値 = n開始値 ;
154160 this . n終了値 = n終了値 ;
@@ -165,13 +171,13 @@ public void t開始(int n開始値, int n終了値, int n間隔ms, CTimer timer)
165171 /// <param name="db終了値">最後のカウント値。</param>
166172 /// <param name="db間隔">カウント値を1増加させるのにかける時間(秒単位)。</param>
167173 /// <param name="timer">カウントに使用するタイマ。</param>
168- public void t開始 ( double db開始値 , double db終了値 , double db間隔 , CSoundTimer timer )
174+ public void t開始 ( double db開始値 , double db終了値 , double db間隔 , CTimerBase timer )
169175 {
170176 this . db開始値 = db開始値 ;
171177 this . db終了値 = db終了値 ;
172178 this . _db間隔 = db間隔 ;
173- this . timerdb = timer ;
174- this . db現在の経過時間 = this . timerdb . dbシステム時刻ms ;
179+ this . timer = timer ;
180+ this . db現在の経過時間 = this . timer . dbシステム時刻ms ;
175181 this . db現在の値 = db開始値 ;
176182 }
177183
@@ -216,9 +222,9 @@ public void t時間Reset()
216222 /// </summary>
217223 public void t時間Resetdb ( )
218224 {
219- if ( ( this . timerdb is not null ) && ( this . db現在の経過時間 != CSoundTimer . nUnused ) )
225+ if ( ( this . timer is not null ) && ( this . db現在の経過時間 != CSoundTimer . nUnused ) )
220226 {
221- this . db現在の経過時間 = this . timerdb . n現在時刻ms ;
227+ this . db現在の経過時間 = this . timer . n現在時刻ms ;
222228 }
223229 }
224230
@@ -229,9 +235,9 @@ public void t時間Resetdb()
229235 /// </summary>
230236 public void t進行db ( )
231237 {
232- if ( ( this . timerdb is not null ) && ( this . db現在の経過時間 != CSoundTimer . nUnused ) )
238+ if ( ( this . timer is not null ) && ( this . db現在の経過時間 != CSoundTimer . nUnused ) )
233239 {
234- double num = this . timerdb . n現在時刻ms ;
240+ double num = this . timer . n現在時刻ms ;
235241 if ( num < this . db現在の経過時間 )
236242 this . db現在の経過時間 = num ;
237243
@@ -273,9 +279,9 @@ public void t進行Loop()
273279 /// </summary>
274280 public void t進行LoopDb ( )
275281 {
276- if ( ( this . timerdb is not null ) && ( this . db現在の経過時間 != CSoundTimer . nUnused ) )
282+ if ( ( this . timer is not null ) && ( this . db現在の経過時間 != CSoundTimer . nUnused ) )
277283 {
278- double num = this . timerdb . n現在時刻ms ;
284+ double num = this . timer . n現在時刻ms ;
279285 if ( num < this . n現在の経過時間ms )
280286 this . db現在の経過時間 = num ;
281287
@@ -365,8 +371,7 @@ public void tキー反復(bool bキー押下, DGキー処理 tキー処理)
365371
366372 #region [ private ]
367373 //-----------------
368- private CTimer ? timer ;
369- private CSoundTimer ? timerdb ;
374+ private CTimerBase ? timer ;
370375 private int n間隔ms ;
371376 private double db間隔 ;
372377 //-----------------
0 commit comments