Difference between revisions of "B2.ParticleSystem:createParticle"

From GiderosMobile
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
 
'''Available since:''' Gideros 2015.06.30<br/>
 
'''Available since:''' Gideros 2015.06.30<br/>
 +
'''Class:''' [[b2.ParticleSystem]]<br/>
 +
 
=== Description ===
 
=== Description ===
<translate>Creates new particle.
+
Creates a new particle.
 +
<syntaxhighlight lang="lua">
 +
(number) = b2.ParticleSystem:createParticle(particleDef)
 +
</syntaxhighlight>
 
Accepts table with possible keys:
 
Accepts table with possible keys:
"flags",
+
*''flags''
"position",
+
*''position''
"velocity",
+
*''velocity''
"color",
+
*''color''
"alpha"
+
*''alpha''
 +
and returns the particle id.
  
and returns particle id</translate>
 
<source lang="lua">
 
(number) = b2.ParticleSystem:createParticle(particleDef)
 
</source>
 
 
=== Parameters ===
 
=== Parameters ===
'''particleDef''': (table) <translate>table with particle data</translate> <br/>
+
'''particleDef''': (table) table with particle data<br/>
 +
 
 
=== Return values ===
 
=== Return values ===
'''Returns''' (number) <translate>particle id</translate><br/>
+
'''Returns''' (number) particle id<br/>
 +
 
 +
{{B2.ParticleSystem}}

Latest revision as of 05:56, 8 November 2024