eww
This commit is contained in:
parent
b2ca4b4d3d
commit
53b2e38ff5
|
@ -1 +1 @@
|
||||||
127.0.0.1:48888
|
192.168.97.15:48888
|
|
@ -1 +1 @@
|
||||||
127.0.0.1
|
192.168.97.15
|
|
@ -59,7 +59,7 @@ public class HighPriorityTarget : MonoBehaviour
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 频率选择
|
/// 频率选择
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Toggle toggle1, toggle2,toggle3,toggle4,toggle5,toggle6,toggle7;
|
public Toggle toggle1, toggle2, toggle3, toggle4, toggle5, toggle6, toggle7;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 接收的字段
|
/// 接收的字段
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -173,21 +173,25 @@ public class HighPriorityTarget : MonoBehaviour
|
||||||
{
|
{
|
||||||
if (Camera.main)
|
if (Camera.main)
|
||||||
KeyObjectiveUI.transform.LookAt(Camera.main.transform);
|
KeyObjectiveUI.transform.LookAt(Camera.main.transform);
|
||||||
if (UIBootstrap.Instance.GetRoleByIDPracticeId(GlobalFlag.practiceSeatId) != "0"&&Input.GetMouseButtonDown(0))
|
if (GlobalFlag.blueOrRed == 1)
|
||||||
{
|
{
|
||||||
Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
|
|
||||||
RaycastHit hit;
|
if (Input.GetMouseButtonDown(0))
|
||||||
if (EventSystem.current.IsPointerOverGameObject())
|
|
||||||
{
|
{
|
||||||
return;
|
Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
|
||||||
}
|
RaycastHit hit;
|
||||||
if (Physics.Raycast(ray,out hit,1000))
|
if (EventSystem.current.IsPointerOverGameObject())
|
||||||
{
|
|
||||||
HighPriorityTarget highPriorityTarget = hit.transform.GetComponent<HighPriorityTarget>();
|
|
||||||
if (highPriorityTarget&& highPriorityTarget.Number==Number)
|
|
||||||
{
|
{
|
||||||
regulate.transform.position = Camera.main.WorldToScreenPoint(hit.point);
|
return;
|
||||||
regulate.gameObject.SetActive(true);
|
}
|
||||||
|
if (Physics.Raycast(ray, out hit, 1000))
|
||||||
|
{
|
||||||
|
HighPriorityTarget highPriorityTarget = hit.transform.GetComponent<HighPriorityTarget>();
|
||||||
|
if (highPriorityTarget && highPriorityTarget.Number == Number)
|
||||||
|
{
|
||||||
|
regulate.transform.position = Camera.main.WorldToScreenPoint(hit.point);
|
||||||
|
regulate.gameObject.SetActive(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -200,7 +204,7 @@ public class HighPriorityTarget : MonoBehaviour
|
||||||
/// <param name="isSend">是否向外发送同步消息</param>
|
/// <param name="isSend">是否向外发送同步消息</param>
|
||||||
public void BeAssaulted(Vector3 Pos, bool isSend, int hp = 0)
|
public void BeAssaulted(Vector3 Pos, bool isSend, int hp = 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (isSend)
|
if (isSend)
|
||||||
{
|
{
|
||||||
HP -= 10;
|
HP -= 10;
|
||||||
|
@ -222,14 +226,14 @@ public class HighPriorityTarget : MonoBehaviour
|
||||||
}
|
}
|
||||||
else if (HP <= 0)
|
else if (HP <= 0)
|
||||||
{
|
{
|
||||||
GameObject BaoMain = Instantiate(explodePrefab,transform);
|
GameObject BaoMain = Instantiate(explodePrefab, transform);
|
||||||
BaoMain.transform.localPosition = Vector3.zero;
|
BaoMain.transform.localPosition = Vector3.zero;
|
||||||
BaoMain.transform.localScale = Vector3.one * 10;
|
BaoMain.transform.localScale = Vector3.one * 10;
|
||||||
BaoMain.transform.SetParent(null);
|
BaoMain.transform.SetParent(null);
|
||||||
BaoMain.SetActive(true);
|
BaoMain.SetActive(true);
|
||||||
Destroy(gameObject);
|
Destroy(gameObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected string GetSyncDis(Vector3 pos)
|
protected string GetSyncDis(Vector3 pos)
|
||||||
|
|
Loading…
Reference in New Issue