|
|
|
@ -2,6 +2,7 @@
|
|
|
|
|
using System.Collections; |
|
|
|
|
using System.Collections.Generic; |
|
|
|
|
using UnityEngine; |
|
|
|
|
using AX.MessageSystem; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[Serializable] |
|
|
|
@ -28,6 +29,27 @@ public class SpreadFireDestoryData//蔓延出来的火的删除
|
|
|
|
|
public class SpreadFire : CloneGameObjInfo |
|
|
|
|
{ |
|
|
|
|
public long SourceId; |
|
|
|
|
|
|
|
|
|
public override void Start() |
|
|
|
|
{ |
|
|
|
|
base.Start(); |
|
|
|
|
MessageDispatcher.AddListener("DelectSpread",DelectSpread); |
|
|
|
|
} |
|
|
|
|
public override void OnDestroy() |
|
|
|
|
{ |
|
|
|
|
base.OnDestroy(); |
|
|
|
|
MessageDispatcher.RemoveListener("DelectSpread", DelectSpread); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void DelectSpread(IMessage obj) |
|
|
|
|
{ |
|
|
|
|
long id = (long)obj.Data; |
|
|
|
|
if (SourceId==id) |
|
|
|
|
{ |
|
|
|
|
Destroy(gameObject); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void AddRecordDataCreat(GameObject sourceObj) |
|
|
|
|
{ |
|
|
|
|
SourceId = sourceObj.GetComponent<CloneGameObjInfo>().gameObjID; |
|
|
|
|