212
This commit is contained in:
		
							parent
							
								
									368393efa2
								
							
						
					
					
						commit
						8f2d9ce319
					
				| 
						 | 
				
			
			@ -13,6 +13,11 @@ public class DeviceManager : MonoSingleton<DeviceManager>
 | 
			
		|||
    /// </summary>
 | 
			
		||||
    //public Queue<string> send2roomStr = new Queue<string>();
 | 
			
		||||
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    /// 爆炸预制体
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    public GameObject explodePrefab;
 | 
			
		||||
 | 
			
		||||
    private bool _isStartRehearsing = false;
 | 
			
		||||
    // 属性绑定布尔值,并在值变化时触发事件
 | 
			
		||||
    public bool isStartRehearsing
 | 
			
		||||
| 
						 | 
				
			
			@ -42,7 +47,7 @@ public class DeviceManager : MonoSingleton<DeviceManager>
 | 
			
		|||
 | 
			
		||||
    void Start()
 | 
			
		||||
    {
 | 
			
		||||
 | 
			
		||||
        explodePrefab = Resources.Load<GameObject>("SmallExplosionEffect");
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -86,6 +91,14 @@ public class DeviceManager : MonoSingleton<DeviceManager>
 | 
			
		|||
 | 
			
		||||
    public void RemoveDevice(GameObject obj)
 | 
			
		||||
    {
 | 
			
		||||
        if (explodePrefab /*&& transform*/)
 | 
			
		||||
        {
 | 
			
		||||
            GameObject Bao = Instantiate(explodePrefab, obj.transform);
 | 
			
		||||
            Bao.transform.localPosition = Vector3.zero;
 | 
			
		||||
            Bao.transform.SetParent(null);
 | 
			
		||||
            Bao.SetActive(true);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (devices.Contains(obj.GetComponent<EquipmentCommon>()))
 | 
			
		||||
            devices.Remove(obj.GetComponent<EquipmentCommon>());
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -128,13 +128,7 @@ public class UnmannedAerialVehicle : MonoBehaviour
 | 
			
		|||
                + "编号" + serialNumber + "子无人机" + "自杀式攻击自爆了";
 | 
			
		||||
            UploadLog(_log);
 | 
			
		||||
        }
 | 
			
		||||
        if (explodePrefab /*&& transform*/)
 | 
			
		||||
        {
 | 
			
		||||
            GameObject Bao = Instantiate(explodePrefab, transform);
 | 
			
		||||
            Bao.transform.localPosition = Vector3.zero;
 | 
			
		||||
            Bao.transform.SetParent(null);
 | 
			
		||||
            Bao.SetActive(true);
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
        //DroneViewDisplay.Instance.DistroyUI(unmannedAerialVehicleManage.equipmentCommon.deviceID);
 | 
			
		||||
        DeviceManager.Instance.RemoveDevice(gameObject);
 | 
			
		||||
        Destroy(gameObject);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue