文档

Unity Engine

Unity Engine

rateOverTime

The rate at which the emitter spawns new particles over time.
阅读时间1 分钟最后更新于 1 个月前

Definition

  • Type: Property
  • Namespace: UnityEngine
  • Assembly: UnityEngine.ParticleSystemModule
public ParticleSystem.MinMaxCurve rateOverTime { get; set; }

Remarks

Examples

using UnityEngine;using System.Collections;[RequireComponent(typeof(ParticleSystem))]public class ExampleClass : MonoBehaviour{ private ParticleSystem ps; public float hSliderValue = 5.0f; void Start() { ps = GetComponent<ParticleSystem>(); } void Update() { var emission = ps.emission; emission.rateOverTime = hSliderValue; } void OnGUI() { hSliderValue = GUI.HorizontalSlider(new Rect(25, 45, 100, 30), hSliderValue, 5.0f, 200.0f); }}