OSDN Git Service

DTXManiaソリューション、DTXManiaプロジェクト、DTXCreatorプロジェクト、FDKプロジェクトについて英語化。
[dtxmania/dtxmania.git] / FDK / コード / 01.フレームワーク / Core / GameTime.cs
1 /*
2 * Copyright (c) 2007-2009 SlimDX Group
3
4 * Permission is hereby granted, free of charge, to any person obtaining a copy
5 * of this software and associated documentation files (the "Software"), to deal
6 * in the Software without restriction, including without limitation the rights
7 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 * copies of the Software, and to permit persons to whom the Software is
9 * furnished to do so, subject to the following conditions:
10
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 * THE SOFTWARE.
21 */
22
23 namespace SampleFramework
24 {
25     /// <summary>
26     /// Contains the current timing state of the game.
27     /// </summary>
28     public class GameTime
29     {
30                 private float m_FramesPerSecond;
31         /// <summary>
32         /// Gets the current frames-per-second measure.
33         /// </summary>
34         /// <value>The current frames-per-second measure.</value>
35         public float FramesPerSecond
36         {
37                         get { return m_FramesPerSecond; }
38                         internal set { m_FramesPerSecond = value; }
39         }
40
41                 private float m_ElapsedGameTime;
42         /// <summary>
43         /// Gets the elapsed game time, in seconds.
44         /// </summary>
45         /// <value>The elapsed game time.</value>
46         public float ElapsedGameTime
47         {
48                         get { return m_ElapsedGameTime; }
49                         internal set { m_ElapsedGameTime = value; }
50         }
51
52                 private float m_ElapsedRealTime;
53         /// <summary>
54         /// Gets the elapsed real time, in seconds.
55         /// </summary>
56         /// <value>The elapsed real time.</value>
57         public float ElapsedRealTime
58         {
59                         get { return m_ElapsedRealTime; }
60                         internal set { m_ElapsedRealTime = value; }
61         }
62
63                 private float m_TotalGameTime;
64         /// <summary>
65         /// Gets the total game time, in seconds.
66         /// </summary>
67         /// <value>The total game time.</value>
68         public float TotalGameTime
69         {
70             get { return m_TotalGameTime; }
71             internal set { m_TotalGameTime = value; }
72         }
73
74         private float m_TotalRealTime;
75         /// <summary>
76         /// Gets the total real time, in seconds.
77         /// </summary>
78         /// <value>The total real time.</value>
79         public float TotalRealTime
80         {
81             get { return m_TotalRealTime; }
82             internal set { m_TotalRealTime = value; }
83         }
84
85         private bool m_IsRunningSlowly;
86         /// <summary>
87         /// Gets or sets a value indicating whether this instance is running slowly.
88         /// </summary>
89         /// <value>
90         /// <c>true</c> if this instance is running slowly; otherwise, <c>false</c>.
91         /// </value>
92         public bool IsRunningSlowly
93         {
94             get { return m_IsRunningSlowly; }
95             internal set { m_IsRunningSlowly = value; }
96         }
97
98         /// <summary>
99         /// Initializes a new instance of the <see cref="GameTime"/> class.
100         /// </summary>
101         public GameTime()
102         {
103         }
104
105         /// <summary>
106         /// Initializes a new instance of the <see cref="GameTime"/> class.
107         /// </summary>
108         /// <param name="totalRealTime">The total real time.</param>
109         /// <param name="elapsedRealTime">The elapsed real time.</param>
110         /// <param name="totalGameTime">The total game time.</param>
111         /// <param name="elapsedGameTime">The elapsed game time.</param>
112         public GameTime(float totalRealTime, float elapsedRealTime, float totalGameTime, float elapsedGameTime)
113         {
114             TotalRealTime = totalRealTime;
115             ElapsedRealTime = elapsedRealTime;
116             TotalGameTime = totalGameTime;
117             ElapsedGameTime = elapsedGameTime;
118         }
119     }
120 }