From 63fb4dbe8ae4d611c4854f863b9b29265e02fdee Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Fri, 5 Oct 2018 21:59:57 -0400 Subject: tweak new event naming convention (#310) --- src/SMAPI/Events/GameLoopUpdatedEventArgs.cs | 36 ---------------------------- 1 file changed, 36 deletions(-) delete mode 100644 src/SMAPI/Events/GameLoopUpdatedEventArgs.cs (limited to 'src/SMAPI/Events/GameLoopUpdatedEventArgs.cs') 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 -{ - /// Event arguments for an event. - public class GameLoopUpdatedEventArgs : EventArgs - { - /********* - ** Accessors - *********/ - /// The number of ticks elapsed since the game started, including the current tick. - public uint Ticks { get; } - - /// Whether is a multiple of 60, which happens approximately once per second. - public bool IsOneSecond { get; } - - - /********* - ** Public methods - *********/ - /// Construct an instance. - /// The number of ticks elapsed since the game started, including the current tick. - public GameLoopUpdatedEventArgs(uint ticks) - { - this.Ticks = ticks; - this.IsOneSecond = this.IsMultipleOf(60); - } - - /// Get whether is a multiple of the given . This is mainly useful if you want to run logic intermittently (e.g. e.IsMultipleOf(30) for every half-second). - /// The factor to check. - public bool IsMultipleOf(uint number) - { - return this.Ticks % number == 0; - } - } -} -- cgit