Difference between revisions of "B2.ParticleSystem:createParticle"

From GiderosMobile
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
<languages />
+
'''Available since:''' Gideros 2015.06.30<br/>
'''<translate>Available since</translate>:''' Gideros 2015.06.30<br/>
+
'''Class:''' [[b2.ParticleSystem]]<br/>
'''<translate>Class</translate>:''' [[Special:MyLanguage/b2.ParticleSystem|b2.ParticleSystem]]<br/>
+
 
=== <translate>Description</translate> ===
+
=== 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>
+
=== Parameters ===
<source lang="lua">
+
'''particleDef''': (table) table with particle data<br/>
(number) = b2.ParticleSystem:createParticle(particleDef)
+
 
</source>
+
=== Return values ===
=== <translate>Parameters</translate> ===
+
'''Returns''' (number) particle id<br/>
'''particleDef''': (table) <translate>table with particle data</translate> <br/>
+
 
=== <translate>Return values</translate> ===
+
{{B2.ParticleSystem}}
'''<translate>Returns</translate>''' (number) <translate>particle id</translate><br/>
 

Latest revision as of 05:56, 8 November 2024