Version: 5.3 (switch to 5.4b)
言語English
  • C#
  • JS

スクリプト言語

好きな言語を選択してください。選択した言語でスクリプトコードが表示されます。

ParticleEmitter.Emit

マニュアルに切り替える
public void Emit();

説明

設定した数だけパーティクルを放出します

minEmissionmaxEmission properties で設定できるように、 エミッタはパーティクルをランダムで放出させます。


public void Emit(int count);

パラメーター

説明

設定した数のパーティクルをすぐに放出します


public void Emit(Vector3 pos, Vector3 velocity, float size, float energy, Color color);

パラメーター

pos パーティクルのサイズ
velocity パーティクルの速度
size パーティクルのサイズ
energy 発生したパーティクルの最小寿命(秒単位)
color パーティクルのカラー

説明

パラメーターを指定して 1 つのパーティクルを放出します

var emitter: ParticleEmitter;

function Start() { emitter = GetComponent.<ParticleEmitter>(); // Emit one particle at the origin, shooting straight up. // The size of the particle is 0.2 and it will live 2 seconds long. emitter.Emit(Vector3.zero, Vector3.up, 0.2, 2, Color.yellow); }

public void Emit(Vector3 pos, Vector3 velocity, float size, float energy, Color color, float rotation, float angularVelocity);

パラメーター

rotation 度単位のパーティクルの初期角度
angularVelocity 秒あたりに回転するパーティクルの初期角速度

説明