This commit is contained in:
parent
102138cfc6
commit
ffbfe77965
|
@ -273,7 +273,7 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 1, y: 1}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: -250, y: -250}
|
||||
m_AnchoredPosition: {x: -250, y: -300}
|
||||
m_SizeDelta: {x: 400, y: 400}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &7682895698295953799
|
||||
|
@ -685,6 +685,7 @@ MonoBehaviour:
|
|||
selectedSide: 1
|
||||
equipmentType: "\u9891\u8C31\u63A2\u6D4B"
|
||||
deviceID:
|
||||
ISPlayer: 0
|
||||
explodePrefab: {fileID: 1000013462590818, guid: ecdd96beb7f93494880c052dfccf9dc1,
|
||||
type: 3}
|
||||
isMove: 1
|
||||
|
|
|
@ -140,13 +140,10 @@ public class Microwaveweapon : MonoBehaviour
|
|||
while (true)
|
||||
{
|
||||
yield return new WaitForSeconds(microwtimer);
|
||||
//Debug.LogError("攻击了");
|
||||
//if (microwtimer>0&&miceopos!=null)
|
||||
if (miceopos!=null)
|
||||
{
|
||||
Launchattack();
|
||||
var newdata = Getmicdata();
|
||||
_ = SyncCreateRoom.SendMessageAsync(string.Format("send2room {0}", newdata));
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -201,7 +198,7 @@ public class Microwaveweapon : MonoBehaviour
|
|||
if (miceopos != null)
|
||||
{
|
||||
microwavepoint.transform.DOLookAt(miceopos.position, 0.1f).SetEase(Ease.Linear);
|
||||
ismicow = false;
|
||||
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
|
@ -212,8 +209,9 @@ public class Microwaveweapon : MonoBehaviour
|
|||
if (miceopos!=null)
|
||||
{
|
||||
micdistance = Vector3.Distance(miceopos.position, transform.position);
|
||||
Debug.Log("倍数" + micdistance/10);
|
||||
microblog.MicrowaveDisplay(micdistance/10);
|
||||
var newdata = Getmicdata();
|
||||
_ = SyncCreateRoom.SendMessageAsync(string.Format("send2room {0}", newdata));
|
||||
microblog.MicrowaveDisplay(micdistance / 10+1, 0.5f);
|
||||
Closeattack(miceopos);
|
||||
}
|
||||
}
|
||||
|
@ -236,15 +234,15 @@ public class Microwaveweapon : MonoBehaviour
|
|||
/// </summary>
|
||||
public IEnumerator Destructiondata(UnmannedAerialVehicle unmannedAerialVehicle)
|
||||
{
|
||||
var newdata = Aeroplane(unmannedAerialVehicle);
|
||||
var newdata = Aeroplane(unmannedAerialVehicle);
|
||||
DeviceManager.Instance.send2roomStr.Enqueue(newdata);
|
||||
yield return new WaitForSeconds(1);
|
||||
yield return new WaitForSeconds(0.5f);
|
||||
GameObject game = Instantiate(Destructioneffect, unmannedAerialVehicle.transform);
|
||||
game.transform.localPosition = Vector3.zero;
|
||||
game.transform.SetParent(null);
|
||||
game.SetActive(true);
|
||||
Destroy(unmannedAerialVehicle.gameObject);
|
||||
|
||||
ismicow = false;
|
||||
}
|
||||
/// <summary>
|
||||
/// 销毁无人机
|
||||
|
@ -261,8 +259,8 @@ public class Microwaveweapon : MonoBehaviour
|
|||
/// </summary>
|
||||
public IEnumerator Offlaserstrike()
|
||||
{
|
||||
yield return new WaitForSeconds(1f);
|
||||
microblog.MicrowaveDisplay(0);
|
||||
yield return new WaitForSeconds(1.5f);
|
||||
microblog.MicrowaveDisplay(0, 0f);
|
||||
ismicow = false;
|
||||
}
|
||||
/// <summary>
|
||||
|
@ -273,7 +271,7 @@ public class Microwaveweapon : MonoBehaviour
|
|||
//接收激光下发的位置
|
||||
Vector3 vector =new Vector3(float.Parse(data[2]), float.Parse(data[3]),float.Parse(data[4]));
|
||||
microwavemoder.transform.DOLookAt(vector, 0.1f).SetEase(Ease.Linear).OnComplete(() => {
|
||||
microblog.MicrowaveDisplay(micdistance/10);
|
||||
microblog.MicrowaveDisplay(micdistance/10 + 1, 0.5f);
|
||||
StartCoroutine(Offlaserstrike());
|
||||
});
|
||||
|
||||
|
|
|
@ -16,9 +16,9 @@ public class MicrowaveweaponAttack : MonoBehaviour
|
|||
/// <summary>
|
||||
/// 微波显示
|
||||
/// </summary>
|
||||
public void MicrowaveDisplay(float show)
|
||||
public void MicrowaveDisplay(float show,float time)
|
||||
{
|
||||
transform.DOScaleZ(show, 1);
|
||||
transform.DOScaleZ(show, time);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -76,7 +76,6 @@ public class DragController : MonoBehaviour, IBeginDragHandler, IEndDragHandler,
|
|||
if (DragManager.Instance != null)
|
||||
{
|
||||
DragManager.Instance.AddObj(model);//把对应模型传入链表
|
||||
|
||||
DragManager.Instance.Addtext(modelname_text.text);//把对应名字存入链表
|
||||
}
|
||||
model = null;
|
||||
|
|
|
@ -4,6 +4,7 @@ using AdamThinkDevicesData;
|
|||
using AdamSync;
|
||||
using Newtonsoft.Json;
|
||||
using static InterfaceManager;
|
||||
using System.Collections;
|
||||
|
||||
/// <summary>
|
||||
/// 设备
|
||||
|
@ -292,7 +293,7 @@ public class EquipmentCommon : MonoBehaviour
|
|||
UnmannedAerialVehicle unmannedAerialVehicle = unmannedAerialVehicleManage1.unmannedAerialVehicles.Find(x => x.serialNumber == data[2]);
|
||||
if (unmannedAerialVehicle)
|
||||
{
|
||||
unmannedAerialVehicle.AddBao(false);
|
||||
StartCoroutine(UnmannedAerialVehicleAddBao(unmannedAerialVehicle));
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -311,6 +312,10 @@ public class EquipmentCommon : MonoBehaviour
|
|||
}
|
||||
}
|
||||
|
||||
IEnumerator UnmannedAerialVehicleAddBao(UnmannedAerialVehicle unmannedAerialVehicle) {
|
||||
yield return new WaitForSeconds(0.6f);
|
||||
unmannedAerialVehicle.AddBao(false);
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue