コード例 #1
0
        /// <summary>
        /// Constructor
        /// </summary>
        public GameBase()
        {
            Trace.WriteDebugLine("[GameBase] Constructor()");
            Trace.TraceInventory();

            Clock              = new GameClock();
            GameTime           = new GameTime();
            MaximumElapsedTime = TimeSpan.FromMilliseconds(500.0);
            TargetElapsedTime  = TimeSpan.FromTicks(166667L);
            IsFixedTimeStep    = true;

            Random     = new Random((int)DateTime.Now.Ticks);
            Components = new GameComponentCollection();

            Application.ApplicationExit += new EventHandler(Application_ApplicationExit);
        }
コード例 #2
0
 /// <summary>
 /// Default constructor
 /// </summary>
 public GameTime()
 {
     Clock = new GameClock();
 }