粒子系统碰撞模块的脚本接口。
The collision module enables particles to collide with a predefined list of planes, or with the 2D and 3D physics worlds.
不需要将粒子系统模块重新分配回系统;它们是接口而不是独立的对象。
using UnityEngine; using System.Collections;
public class ExampleClass : MonoBehaviour { void Start() { ParticleSystem ps = GetComponent<ParticleSystem>(); var coll = ps.collision; coll.enabled = true; coll.bounce = 0.5f; } }