Modding:Simple Particles: Difference between revisions

From Vintage Story Wiki
no edit summary
No edit summary
No edit summary
Line 125: Line 125:


=== Size ===
=== Size ===
<syntaxhighlight lang="c#">
    myParticles.minSize = 0.1F;
    myParticles.maxSize = 1.0F;
</syntaxhighlight>
[[File:Particles (random size).gif|300px]]
<syntaxhighlight lang="c#">
    myParticles.minSize = 0.1F;
    myParticles.maxSize = 1.0F;
    myParticles.SizeEvolve = new EvolvingNatFloat(EnumTransformFunction.LINEAR, 2);
</syntaxhighlight>
[[File:Particles (growing size).gif|300px]]


=== Model ===
=== Model ===
<syntaxhighlight lang="c#">
    myParticles.model = EnumParticleModel.Quad;
</syntaxhighlight>
[[File:Particles (quads).gif|300px]]


=== Opacity ===
=== Opacity ===
<syntaxhighlight lang="c#">
    myParticles.color = ColorUtil.ToRGBABytes(ColorUtil.ColorFromArgb(130, rand.Next(0, 255), rand.Next(0, 255), rand.Next(0, 255)));
</syntaxhighlight>
[[File:Particles (opacity).gif|300px]]
<syntaxhighlight lang="c#">
    myParticles.OpacityEvolve = new EvolvingNatFloat(EnumTransformFunction.LINEAR, -255);
</syntaxhighlight>
[[File:Particles (decreasing opacity).gif|300px]]
=== Self Propelled ===


=== Die In Air/ Liquid ===
=== Die In Air/ Liquid ===


= Other Particles =
= Other Particles =
Confirmedusers, editor, Administrators
886

edits