Difference between revisions of "Particles:getNearestParticle"
From GiderosMobile
(Created page with "__NOTOC__ <languages /> '''<translate>Available since</translate>:''' 2020.9<br/> '''<translate>Class</translate>:''' Particles<br/> === <tran...") |
m (Text replacement - "<source" to "<syntaxhighlight") |
||
Line 5: | Line 5: | ||
=== <translate>Description</translate> === | === <translate>Description</translate> === | ||
<translate>Get the nearest particle number from a specified point</translate> | <translate>Get the nearest particle number from a specified point</translate> | ||
− | < | + | <syntaxhighlight lang="lua"> |
(number) = Particles:getNearestParticle(x,y) | (number) = Particles:getNearestParticle(x,y) | ||
</source> | </source> |
Revision as of 14:30, 13 July 2023
Available since: 2020.9
Class: Particles
Description
Get the nearest particle number from a specified point <syntaxhighlight lang="lua"> (number) = Particles:getNearestParticle(x,y) </source>
Parameters
x: (number) X coordinate of the reference point
y: (number) Y coordinate of the reference point
Return values
Returns (number) index of the nearest particle, or nil if no particles
- Particles
- Particles.new
- Particles:addParticles
- Particles:clearTexture
- Particles:getDeadParticles
- Particles:getNearestParticle
- Particles:getNumParticles
- Particles:getParticleAcceleration
- Particles:getParticleAngle
- Particles:getParticleColor
- Particles:getParticleDecay
- Particles:getParticleExtra
- Particles:getParticlePosition
- Particles:getParticleSize
- Particles:getParticleSpeed
- Particles:getParticleTag
- Particles:getParticleTtl
- Particles:getParticles
- Particles:isPaused
- Particles:removeParticles
- Particles:scaleParticles
- Particles:setParticleAcceleration
- Particles:setParticleAngle
- Particles:setParticleColor
- Particles:setParticleDecay
- Particles:setParticleExtra
- Particles:setParticlePosition
- Particles:setParticleSize
- Particles:setParticleSpeed
- Particles:setParticleTag
- Particles:setParticleTtl
- Particles:setPaused
- Particles:setTexture