Changes

Jump to navigation Jump to search
→‎Buff overhaul: use unique string ID format in example code
Line 6,221: Line 6,221:  
<syntaxhighlight lang="c#">
 
<syntaxhighlight lang="c#">
 
Buff buff = new Buff(
 
Buff buff = new Buff(
     id: "Example.ModId/ZoomZoom",
+
     id: "Example.ModId_ZoomZoom",
 
     displayName: "Zoom Zoom", // can optionally specify description text too
 
     displayName: "Zoom Zoom", // can optionally specify description text too
 
     iconTexture: this.Helper.ModContent.Load<Texture2D>("assets/zoom.png"),
 
     iconTexture: this.Helper.ModContent.Load<Texture2D>("assets/zoom.png"),
Line 6,234: Line 6,234:  
</syntaxhighlight>
 
</syntaxhighlight>
   −
You can also implement your own custom effects in code by checking if the buff is active, like <code>Game1.player.hasBuff("Example.ModId/ZoomZoom")</code>.
+
You can also implement your own custom effects in code by checking if the buff is active, like <code>Game1.player.hasBuff("Example.ModId_ZoomZoom")</code>.
    
===Custom audio===
 
===Custom audio===
translators
8,445

edits

Navigation menu