Modding:Simple Particles/ru: Difference between revisions

From Vintage Story Wiki
(Created page with "Итак, давайте создадим несколько базовых частиц. Я предлагаю создать статическое поле для ваши...")
(Created page with "Теперь у нас есть свойство, осталось только установить положение и создать частицы в мире. Я буд...")
Line 10: Line 10:
</syntaxhighlight>
</syntaxhighlight>


Now we have the property, the only thing left to do is to set the position and spawn the particles into the world. I'm gonna use the <code>OnHeldInteractStart</code> and *Step method inside a custom made Item class (you can read more about this in the [[Collectible|Collectibles Tutorial]]):
Теперь у нас есть свойство, осталось только установить положение и создать частицы в мире. Я буду использовать метод <code>OnHeldInteractStart</code> и *Step внутри пользовательского класса Item (подробнее об этом можно прочитать в [[Collectible/ru|Collectibles Tutorial]]):
<syntaxhighlight lang="c#">
<syntaxhighlight lang="c#">
         public override void OnHeldInteractStart(ItemSlot slot, EntityAgent byEntity, BlockSelection blockSel, EntitySelection entitySel, ref EnumHandHandling handHandling)
         public override void OnHeldInteractStart(ItemSlot slot, EntityAgent byEntity, BlockSelection blockSel, EntitySelection entitySel, ref EnumHandHandling handHandling)