Modding:Adding Block Behavior: Difference between revisions

From Vintage Story Wiki
No edit summary
Line 127: Line 127:
         public int distance = 1;
         public int distance = 1;
         public bool pull = false;
         public bool pull = false;
</syntaxhighlight>
Now we can parse the two properties like so:
<syntaxhighlight lang="c#">
        distance = properties["distance"].AsInt(1);
        pull = properties["pull"].AsBool(false);
</syntaxhighlight>
</syntaxhighlight>