/// <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); } }
/// <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); } }
/// <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 + ")"); }
/// <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 + ")"); }
/// <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); }
/// <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); }