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