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>
 | 
			
		||||
    public Toggle toggle1, toggle2,toggle3,toggle4,toggle5,toggle6,toggle7;
 | 
			
		||||
    public Toggle toggle1, toggle2, toggle3, toggle4, toggle5, toggle6, toggle7;
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    /// 接收的字段
 | 
			
		||||
    /// </summary>
 | 
			
		||||
| 
						 | 
				
			
			@ -173,21 +173,25 @@ public class HighPriorityTarget : MonoBehaviour
 | 
			
		|||
    {
 | 
			
		||||
        if (Camera.main)
 | 
			
		||||
            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 (EventSystem.current.IsPointerOverGameObject())
 | 
			
		||||
 | 
			
		||||
            if (Input.GetMouseButtonDown(0))
 | 
			
		||||
            {
 | 
			
		||||
                return;
 | 
			
		||||
            }
 | 
			
		||||
            if (Physics.Raycast(ray,out hit,1000))
 | 
			
		||||
            {
 | 
			
		||||
                HighPriorityTarget highPriorityTarget = hit.transform.GetComponent<HighPriorityTarget>();
 | 
			
		||||
                if (highPriorityTarget&& highPriorityTarget.Number==Number)
 | 
			
		||||
                Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
 | 
			
		||||
                RaycastHit hit;
 | 
			
		||||
                if (EventSystem.current.IsPointerOverGameObject())
 | 
			
		||||
                {
 | 
			
		||||
                    regulate.transform.position = Camera.main.WorldToScreenPoint(hit.point);
 | 
			
		||||
                    regulate.gameObject.SetActive(true);
 | 
			
		||||
                    return;
 | 
			
		||||
                }
 | 
			
		||||
                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>
 | 
			
		||||
    public void BeAssaulted(Vector3 Pos, bool isSend, int hp = 0)
 | 
			
		||||
    {
 | 
			
		||||
       
 | 
			
		||||
 | 
			
		||||
        if (isSend)
 | 
			
		||||
        {
 | 
			
		||||
            HP -= 10;
 | 
			
		||||
| 
						 | 
				
			
			@ -222,14 +226,14 @@ public class HighPriorityTarget : MonoBehaviour
 | 
			
		|||
        }
 | 
			
		||||
        else if (HP <= 0)
 | 
			
		||||
        {
 | 
			
		||||
            GameObject BaoMain = Instantiate(explodePrefab,transform);
 | 
			
		||||
            GameObject BaoMain = Instantiate(explodePrefab, transform);
 | 
			
		||||
            BaoMain.transform.localPosition = Vector3.zero;
 | 
			
		||||
            BaoMain.transform.localScale = Vector3.one * 10;
 | 
			
		||||
            BaoMain.transform.SetParent(null);
 | 
			
		||||
            BaoMain.SetActive(true);
 | 
			
		||||
            Destroy(gameObject);
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    protected string GetSyncDis(Vector3 pos)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue