更改

第3行: 第3行:  
SMAPI provides several C# events which let your mod respond when something happens (like when the player places an object) or run code periodically (like once per update tick).
 
SMAPI provides several C# events which let your mod respond when something happens (like when the player places an object) or run code periodically (like once per update tick).
   −
==FAQs==
+
== 常见问题==
===What are events?===
+
=== 什么是事件 events ===
Events let you run code when something happens. You can add any number of ''event handlers'' (methods to call) when an ''event'' (what happened) is raised. You can think of events and handlers as a ''when..then'' statement:
+
事件使你可以在发生某些事情时运行代码。可以在引发“事件”(发生的情况)时添加任意数量的“事件处理程序”(调用方法)。 可以将事件和处理程序视为“when...then ”语句:
 
<pre>
 
<pre>
WHEN the save is loaded,  <-- event
+
存档已加载        <-- 事件
THEN run my code      <-- event handler
+
然后运行我的代码     <-- 事件处理程序
 
</pre>
 
</pre>
  
203

个编辑