using System.Collections; using System.Collections.Generic; using UnityEngine; public class FireFlow : MonoBehaviour { private void Start() { transform.localScale = Vector3.zero; } /// /// 是否开始火蔓延 /// //[HideInInspector] public bool fireFlow; /// /// 火蔓延速度 /// //[HideInInspector] public float flowSpeed = 2; private float value = 0; void Update () { if (fireFlow && value < 1) { value += Time.deltaTime * flowSpeed / 10; transform.localScale = new Vector3(value, value, value); } } }