using AX.MessageSystem; using System.Collections; using System.Collections.Generic; using UnityEngine; /// /// 蔓延出来的火的控制 /// public class SpreadedFireCtrl : MonoBehaviour { public long fireGameObjID;//火的id,表示是哪个火蔓延出来的火 void OnEnable() { FireScaleValue.GetAllFireScales += addMyFireScale; } void OnDisable() { FireScaleValue.GetAllFireScales -= addMyFireScale; } void OnDestroy() { FireScaleValue.GetAllFireScales -= addMyFireScale; MessageDispatcher.SendMessage("BurnTimeSet"); //BurnTimer.BurnTimeSet() 灭火后判定是否还剩余火 } private FloatData addMyFireScale(FloatData area) { area.value += 10; return area; } // Use this for initialization void Start () { BurnTimer.isBurning = true; } // Update is called once per frame void Update () { } }