diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-10-05 21:59:57 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-10-05 21:59:57 -0400 |
commit | 63fb4dbe8ae4d611c4854f863b9b29265e02fdee (patch) | |
tree | ceebeaa5739b04112f6efdc8fceabd17f8b6797c /src/SMAPI/Events/GameLoopUpdatedEventArgs.cs | |
parent | 0530824cc2c573cae0a80f7def2b46bf8aeb9af9 (diff) | |
download | SMAPI-63fb4dbe8ae4d611c4854f863b9b29265e02fdee.tar.gz SMAPI-63fb4dbe8ae4d611c4854f863b9b29265e02fdee.tar.bz2 SMAPI-63fb4dbe8ae4d611c4854f863b9b29265e02fdee.zip |
tweak new event naming convention (#310)
Diffstat (limited to 'src/SMAPI/Events/GameLoopUpdatedEventArgs.cs')
-rw-r--r-- | src/SMAPI/Events/GameLoopUpdatedEventArgs.cs | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/src/SMAPI/Events/GameLoopUpdatedEventArgs.cs b/src/SMAPI/Events/GameLoopUpdatedEventArgs.cs deleted file mode 100644 index 3ad34b69..00000000 --- a/src/SMAPI/Events/GameLoopUpdatedEventArgs.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; - -namespace StardewModdingAPI.Events -{ - /// <summary>Event arguments for an <see cref="IGameLoopEvents.Updated"/> event.</summary> - public class GameLoopUpdatedEventArgs : EventArgs - { - /********* - ** Accessors - *********/ - /// <summary>The number of ticks elapsed since the game started, including the current tick.</summary> - public uint Ticks { get; } - - /// <summary>Whether <see cref="Ticks"/> is a multiple of 60, which happens approximately once per second.</summary> - public bool IsOneSecond { get; } - - - /********* - ** Public methods - *********/ - /// <summary>Construct an instance.</summary> - /// <param name="ticks">The number of ticks elapsed since the game started, including the current tick.</param> - public GameLoopUpdatedEventArgs(uint ticks) - { - this.Ticks = ticks; - this.IsOneSecond = this.IsMultipleOf(60); - } - - /// <summary>Get whether <see cref="Ticks"/> is a multiple of the given <paramref name="number"/>. This is mainly useful if you want to run logic intermittently (e.g. <code>e.IsMultipleOf(30)</code> for every half-second).</summary> - /// <param name="number">The factor to check.</param> - public bool IsMultipleOf(uint number) - { - return this.Ticks % number == 0; - } - } -} |