Changes

Jump to navigation Jump to search
→‎Buff overhaul: improve example
Line 299: Line 299:  
* You can change how buff attributes are displayed (or add new attributes) by extending the <samp>BuffsDisplay.displayAttributes</samp> list.
 
* You can change how buff attributes are displayed (or add new attributes) by extending the <samp>BuffsDisplay.displayAttributes</samp> list.
   −
For example, here's how to create a custom buff which adds +3 speed:
+
For example, here's how to add a custom buff which adds +3 speed:
    
<syntaxhighlight lang="c#">
 
<syntaxhighlight lang="c#">
Line 312: Line 312:  
         speed = { 10 } // shortcut for buff.speed.Value = 10
 
         speed = { 10 } // shortcut for buff.speed.Value = 10
 
     }
 
     }
)
+
);
 +
Game1.player.applyBuff(buff);
 
</syntaxhighlight>
 
</syntaxhighlight>
  
translators
8,447

edits

Navigation menu