You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
960 B
40 lines
960 B
using AX.MessageSystem; |
|
using System.Collections; |
|
using System.Collections.Generic; |
|
using UnityEngine; |
|
|
|
/// <summary> |
|
/// 蔓延出来的火的控制 |
|
/// </summary> |
|
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 () { |
|
|
|
} |
|
}
|
|
|