Exemple #1
0
 private void GameLoop_UpdateTicked(object sender, StardewModdingAPI.Events.UpdateTickedEventArgs e)
 {
     if (frame > 0 && e.IsMultipleOf(rate))
     {
         frame = Math.Min(frame + (closing ? -1 : 1), max);
     }
 }
Exemple #2
0
        /*********
        ** Private methods
        *********/

        /// <summary>Raised after the game state is updated (≈60 times per second).</summary>
        /// <param name="sender">The event sender.</param>
        /// <param name="e">The event arguments.</param>
        private void GameLoop_UpdateTicked(object sender, StardewModdingAPI.Events.UpdateTickedEventArgs e)
        {
            if (Context.IsWorldReady && e.IsMultipleOf(10))
            {
                this.ToggleGates(Game1.currentLocation);
            }
        }