Difference between revisions of "ParticleSystem (简体中文)"

m
m
 
Line 11: Line 11:
 
[[love.graphics.newParticleSystem]] 创建新的粒子系统  
 
[[love.graphics.newParticleSystem]] 创建新的粒子系统  
  
== Functions ==
+
== 函数 ==
----
+
OTZ 一直在更新,没人在翻译
{|class="wikitable"
 
|-
 
|[[Object:type]]||获得对象的类型(字符串)
 
|-
 
|[[Object:typeOf]]||检查一个对象是否属于特定类型
 
|-
 
|[[ParticleSystem:count]]||获得粒子的数量,是当前系统
 
|-
 
|[[ParticleSystem:getDirection]]||得到粒子发射器的方向(按弧度)
 
|-
 
|[[ParticleSystem:getOffsetX]]||得到粒子的x坐标旋转偏移
 
|-
 
|[[ParticleSystem:getOffsetY]]||得到粒子的y坐标旋转偏移
 
|-
 
|[[ParticleSystem:getPosition]]||获得发射器的位置
 
|-
 
|[[ParticleSystem:getSpread]]||获得定向传播的粒子发射器的数量(按弧度)
 
|-
 
|[[ParticleSystem:getX]]||获得x坐标(粒子发射器的位置)
 
|-
 
|[[ParticleSystem:getY]]||得到y坐标(粒子发射器的位置)
 
|-
 
|[[ParticleSystem:isActive]]||检查是否粒子系统是积极发射粒子
 
|-
 
|[[ParticleSystem:isEmpty]]||检查是否粒子系统是空的粒子
 
|-
 
|[[ParticleSystem:isFull]]||检查是否粒子系统充满粒子
 
|-
 
|[[ParticleSystem:pause]]||停顿粒子发射器
 
|-
 
|[[ParticleSystem:reset]]||重置粒子发射器,删除任何现有的粒子和重置计数器
 
|-
 
|[[ParticleSystem:setBufferSize]]||设置缓冲区的大小(允许的最大数量的粒子系统)
 
|-
 
|[[ParticleSystem:setColor]]||设置图像的颜色(颜色调制需要激活它有效果)
 
|-
 
|[[ParticleSystem:setColors]]||设置颜色适用于粒子
 
|-
 
|[[ParticleSystem:setDirection]]||设置将发出的粒子的方向
 
|-
 
|[[ParticleSystem:setEmissionRate]]||设置粒子每秒钟发出的数量
 
|-
 
|[[ParticleSystem:setGravity]]||设置影响粒子的重力(加速度沿y轴)
 
|-
 
|[[ParticleSystem:setLifetime]]||设置粒子系统应发出粒子的时间间隔(如果1然后它排放的颗粒永远)
 
|-
 
|[[ParticleSystem:setOffset]]||开始
 
|}
 
  
等等 缺了好多,怎么回事!!
+
{{#ask: [[Category:Functions]] [[parent::ParticleSystem||Drawable||Object]] [[Concept:Current]]
 +
| headers=hide
 +
| format=template
 +
| template=ListingFields
 +
| introtemplate=ListingIntro
 +
| outrotemplate=ListingOutro
 +
| ?Description
 +
| ?PrettySince
 +
| ?PrettyRemoved
 +
}}
  
 
== Supertypes ==
 
== Supertypes ==

Latest revision as of 09:32, 3 December 2013

O.png 这是一个粗鲁的翻译,它的目的是为了方便中国中学英语水平的love2d的粉丝查看的

要知道翻译像number x return the value of x的东西很浪费时间的。

 


Available since LÖVE 0.7.0
This module is not supported in earlier versions.


Used to create cool effects, like fire. The [[Particle systems are created and drawn on the screen using functions in love.graphics. They also need to be updated in the update(dt) callback for you to see any changes in the [[Particles emitted

这句懒得翻译了,会用粒子的不需要看这个介绍..

用法|Constructors


love.graphics.newParticleSystem 创建新的粒子系统

函数

OTZ 一直在更新,没人在翻译


Object:release Immediately destroys the object's Lua reference. Added since 11.0
Object:type Gets the type of the object as a string.
Object:typeOf Checks whether an object is of a certain type.
ParticleSystem:clone Creates an identical copy of the ParticleSystem in the stopped state. Added since 0.9.1
ParticleSystem:count Gets the amount of particles that are currently in the system. Removed in 0.9.0
ParticleSystem:emit Emits a burst of particles from the particle emitter. Added since 0.9.0
ParticleSystem:getAreaSpread Gets the area-based spawn parameters for the particles. Added since 0.9.0
ParticleSystem:getBufferSize Gets the maximum number of particles the ParticleSystem can have at once. Added since 0.9.0
ParticleSystem:getColors Gets the colors to apply to the particle sprite. Added since 0.9.0
ParticleSystem:getCount Gets the number of particles that are currently in the system. Added since 0.9.0
ParticleSystem:getDirection Gets the direction of the particle emitter (in radians).
ParticleSystem:getEmissionArea Gets the area-based spawn parameters for the particles. Added since 11.0
ParticleSystem:getEmissionRate Gets the amount of particles emitted per second. Added since 0.9.0
ParticleSystem:getEmitterLifetime Gets how long the particle system will emit particles Added since 0.9.0
ParticleSystem:getImage Gets the image used for the particles. Added since 0.9.0 Removed in 0.10.0
ParticleSystem:getInsertMode Gets the mode used when the ParticleSystem adds new particles. Added since 0.9.0
ParticleSystem:getLinearAcceleration Gets the linear acceleration (acceleration along the x and y axes) for particles. Added since 0.9.0
ParticleSystem:getLinearDamping Gets the amount of linear damping (constant deceleration) for particles. Added since 0.9.2
ParticleSystem:getOffset Gets the particle image's draw offset. Added since 0.9.0
ParticleSystem:getOffsetX Get the x coordinate of the particle rotation offset. Removed in 0.9.0
ParticleSystem:getOffsetY Get the y coordinate of the particle rotation offset. Removed in 0.9.0
ParticleSystem:getParticleLifetime Gets the lifetime of the particles. Added since 0.9.0
ParticleSystem:getPosition Gets the position of the emitter.
ParticleSystem:getQuads Gets a series of Quads used for the particle sprites. Added since 0.9.2
ParticleSystem:getRadialAcceleration Gets the radial acceleration (away from the emitter). Added since 0.9.0
ParticleSystem:getRotation Gets the rotation of the image upon particle creation (in radians). Added since 0.9.0
ParticleSystem:getSizeVariation Gets the amount of size variation. Added since 0.9.0
ParticleSystem:getSizes Gets the sizes of the particle over its lifetime. Added since 0.9.0
ParticleSystem:getSpeed Gets the speed of the particles. Added since 0.9.0
ParticleSystem:getSpin Gets the spin of the sprite. Added since 0.9.0
ParticleSystem:getSpinVariation Gets the amount of spin variation. Added since 0.9.0
ParticleSystem:getSpread Gets the amount of directional spread of the particle emitter (in radians).
ParticleSystem:getTangentialAcceleration Gets the tangential acceleration (acceleration perpendicular to the particle's direction). Added since 0.9.0
ParticleSystem:getTexture Gets the texture (Image or Canvas) used for the particles. Added since 0.9.1
ParticleSystem:getX Gets the x-coordinate of the particle emitter's position. Removed in 0.9.0
ParticleSystem:getY Gets the y-coordinate of the particle emitter's position. Removed in 0.9.0
ParticleSystem:hasRelativeRotation Gets whether particle angles and rotations are relative to their velocities. Added since 0.9.1
ParticleSystem:isActive Checks whether the particle system is actively emitting particles.
ParticleSystem:isEmpty Checks whether the particle system is empty of particles. Removed in 0.9.0
ParticleSystem:isFull Checks whether the particle system is full of particles. Removed in 0.9.0
ParticleSystem:isPaused Checks whether the particle system is paused. Added since 0.9.0
ParticleSystem:isStopped Checks whether the particle system is stopped. Added since 0.9.0
ParticleSystem:moveTo Moves the position of the emitter. Added since 0.9.1
ParticleSystem:pause Pauses the particle emitter.
ParticleSystem:reset Resets the particle emitter, removing existing particles and resetting the lifetime counter.
ParticleSystem:setAreaSpread Sets area-based spawn parameters for the particles. Added since 0.9.0
ParticleSystem:setBufferSize Sets the size of the buffer (the max allowed amount of particles in the system).
ParticleSystem:setColor Sets the color of the image. Removed in 0.8.0
ParticleSystem:setColors Sets the colors to apply to the particle sprite. Added since 0.8.0
ParticleSystem:setDirection Sets the direction the particles will be emitted in.

... further results

Supertypes

See Also


Other Languages