Modding:Adding Block Behavior: Difference between revisions
From Vintage Story Wiki
CreativeMD (talk | contribs) No edit summary |
CreativeMD (talk | contribs) |
||
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> | ||