Difference between revisions of "Particles:getNearestParticle"
From GiderosMobile
m (Text replacement - "</source>" to "</syntaxhighlight>") |
|||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
− | + | '''Available since:''' 2020.9<br/> | |
− | ''' | + | '''Class:''' [[Particles]]<br/> |
− | ''' | + | |
− | === | + | === Description === |
− | + | Gets the nearest particle number from a specified point. | |
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
(number) = Particles:getNearestParticle(x,y) | (number) = Particles:getNearestParticle(x,y) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | === | + | |
− | '''x''': (number) | + | === Parameters === |
− | '''y''': (number) | + | '''x''': (number) x coordinate of the reference point<br/> |
− | === | + | '''y''': (number) y coordinate of the reference point<br/> |
− | ''' | + | |
+ | === Return values === | ||
+ | '''Returns''' (number) index of the nearest particle, or nil if no particles<br/> | ||
{{Particles}} | {{Particles}} |
Latest revision as of 20:32, 21 September 2023
Available since: 2020.9
Class: Particles
Description
Gets the nearest particle number from a specified point.
(number) = Particles:getNearestParticle(x,y)
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