Changes

Jump to navigation Jump to search
m
Line 183: Line 183:     
===Per-screen data===
 
===Per-screen data===
[[Multiplayer|Split-screen multiplayer]] swaps the entire game state between each player, so each mod runs across every player. For example, with four local players the [[Modding:Modder Guide/APIs/Events#UpdateTicked|<tt>UpdateTicked</tt>]] event would be raised four times per tick. The game manages its own state automatically (e.g. <tt>Game1.activeClickableMenu</tt>), but if your mod stores info in its own fields you may need to handle those yourself.
+
[[Multiplayer|Split-screen multiplayer]] swaps the entire game state between each player, so each mod runs across every player. For example, with four local players the [[Modding:Modder Guide/APIs/Events#GameLoop.UpdateTicked|<tt>UpdateTicked</tt>]] event would be raised four times per tick. The game manages its own state automatically (e.g. <tt>Game1.activeClickableMenu</tt>), but if your mod stores info in its own fields you may need to handle those yourself.
    
That can be tricky, so SMAPI provides <code>PerScreen&lt;T&gt;</code> to take care of it. A <code>PerScreen&lt;T&gt;</code> field manages a separate value for each local screen.
 
That can be tricky, so SMAPI provides <code>PerScreen&lt;T&gt;</code> to take care of it. A <code>PerScreen&lt;T&gt;</code> field manages a separate value for each local screen.
translators
8,404

edits

Navigation menu