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.
32 lines
880 B
32 lines
880 B
using System; |
|
using System.Collections; |
|
using System.Collections.Generic; |
|
using AX.Network.Protocols; |
|
using UnityEngine; |
|
using AX.Serialization; |
|
using System.IO; |
|
|
|
public class DELETE_DISASTER_REPLY : NetworkMessageBehaviour |
|
{ |
|
protected override void Execute(BinaryMessage message) |
|
{ |
|
var info = message.Body.Deserialize<long>(); |
|
|
|
var disasterItem = transform.GetComponentsInChildren<DisasterItem>(); |
|
|
|
var path = Application.streamingAssetsPath + "/DisasterLibrary/" + info + ".disaster"; |
|
if (File.Exists(path)) |
|
{ |
|
File.Delete(path); |
|
} |
|
|
|
for (int i = 0; i < disasterItem.Length; i++) |
|
{ |
|
if (disasterItem[i].GetComponent<DisasterItem>().disasterMetaDataId == info) |
|
{ |
|
Destroy(disasterItem[i].gameObject); |
|
break; |
|
} |
|
} |
|
} |
|
}
|
|
|