コード例 #1
0
        /// <summary>
        /// Raises the <see cref="Idle"/> event.
        /// </summary>
        /// <param name="eventArgs">
        /// The <see cref="GameTimerEventArgs"/> instance containing the event data.
        /// </param>
        protected void OnIdle(GameTimerEventArgs eventArgs)
        {
            var handler = Idle;

            if (handler != null)
            {
                handler(this, eventArgs);
            }
        }
コード例 #2
0
        /// <summary>
        /// Raises the <see cref="TimeChanged"/> event.
        /// </summary>
        /// <param name="eventArgs">
        /// The <see cref="GameTimerEventArgs"/> instance containing the event data.
        /// </param>
        protected void OnTimeChanged(GameTimerEventArgs eventArgs)
        {
            var handler = TimeChanged;

            if (handler != null)
            {
                handler(this, eventArgs);
            }
        }
コード例 #3
0
ファイル: Game.cs プロジェクト: Zolniu/DigitalRune
 /// <summary>
 /// Perform tasks while game is idle.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="eventArgs">
 /// The <see cref="GameTimerEventArgs"/> instance containing the event data.
 /// </param>
 static void Idle(object sender, GameTimerEventArgs eventArgs)
 {
     Console.Out.WriteLine("Idle(" + eventArgs.IdleTime + ")");
 }
コード例 #4
0
ファイル: Game.cs プロジェクト: Zolniu/DigitalRune
 /// <summary>
 /// Performs a time step.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="eventArgs">
 /// The <see cref="GameTimerEventArgs"/> instance containing the event data.
 /// </param>
 static void Update(object sender, GameTimerEventArgs eventArgs)
 {
     Console.Out.WriteLine("Update(" + eventArgs.DeltaTime + ")");
 }
コード例 #5
0
        /// <summary>
        /// Raises the <see cref="TimeChanged"/> event.
        /// </summary>
        /// <param name="eventArgs">
        /// The <see cref="GameTimerEventArgs"/> instance containing the event data.
        /// </param>
        protected void OnTimeChanged(GameTimerEventArgs eventArgs)
        {
            var handler = TimeChanged;

              if (handler != null)
            handler(this, eventArgs);
        }
コード例 #6
0
        /// <summary>
        /// Raises the <see cref="Idle"/> event.
        /// </summary>
        /// <param name="eventArgs">
        /// The <see cref="GameTimerEventArgs"/> instance containing the event data.
        /// </param>
        protected void OnIdle(GameTimerEventArgs eventArgs)
        {
            var handler = Idle;

              if (handler != null)
            handler(this, eventArgs);
        }