function Emit () : void
Description描述
Emit a number of particles.
发射的粒子数。
Makes the emitter spit out a random number of particles, as set by the minEmission and maxEmission properties.
根据minEmission 和 maxEmission属性,使发射器发射随机数量粒子。
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
public void Awake() {
particleEmitter.Emit();
}
}
// Emit a random amount of particles between min and max emission now.
// 在最小和最大数量间发射随机数量的粒子。
particleEmitter.Emit();
• function Emit (count : int) : void
Description描述
Emit count particles immediately
立即发射一定数量的粒子
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
public void Awake() {
particleEmitter.Emit(10);
}
}
// Emit 10 particles
// 发射10个粒子
particleEmitter.Emit(10);
• function Emit (pos : Vector3, velocity : Vector3, size : float, energy : float, color : Color) : void
Description描述
Emit a single particle with given parameters.
根据给定的参数发射一个单个的粒子。
// Emit one particle at the origin, shooting straight up.
// 在原点处发射一个粒子,直线射出。
// The size of the particle is 0.2 and it will live 2 seconds long.
// 粒子的尺寸是0.2,将会生存2秒钟。
particleEmitter.Emit(Vector3.zero, Vector3.up, 0.2, 2, Color.yellow);
• function Emit (pos : Vector3, velocity : Vector3, size : float, energy : float, color : Color, rotation : float, angularVelocity : float) : void
Description描述