Difference between revisions of "B2.ParticleSystem:createParticle"

From GiderosMobile
 
(8 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 ===
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
+
=== Parameters ===
<source lang="lua">
+
'''particleDef''': (table) table with particle data<br/>
(number) = b2.ParticleSystem:createParticle(particleDef)
+
 
</source>
+
=== Return values ===
'''particleDef''': (table) table with particle data ''''''<br/>
 
 
'''Returns''' (number) particle id<br/>
 
'''Returns''' (number) particle id<br/>
 +
 +
{{B2.ParticleSystem}}

Latest revision as of 05:56, 8 November 2024