55 lines
2.3 KiB
55 lines
2.3 KiB
using UnityEngine; |
|
using System.Collections; |
|
using UnityEngine.EventSystems; |
|
using AX.MessageSystem; |
|
using AX.TrackRecord; |
|
|
|
public class CancelPitchOn : MonoBehaviour |
|
{ |
|
private GameObject TheCarControl; |
|
// Use this for initialization |
|
private GameObject TaskWin;//任务窗口 |
|
private GameObject TaskListWin;//任务列表窗口 |
|
void Start() |
|
{ |
|
TheCarControl = GameObject.Find("Canvas").transform.Find("控制举臂").gameObject; |
|
TaskWin = GameObject.Find("Canvas").transform.Find("TaskWind").gameObject; |
|
TaskListWin = GameObject.Find("Canvas").transform.Find("TaskList").gameObject; |
|
} |
|
|
|
void OnMouseDown() |
|
{ |
|
if (!EventSystem.current.IsPointerOverGameObject()) |
|
{ |
|
MessageDispatcher.SendMessage("SelectControl", (object)gameObject.name); |
|
MessageDispatcher.SendMessage("CLOSE", (object)TaskWin.name, "CUBE"); |
|
MessageDispatcher.SendMessage("CLOSE", (object)TaskListWin.name, "CUBE"); |
|
MessageDispatcher.SendMessage("CLOSE", (object)"PromptWindow", "CUBE"); |
|
//MessageDispatcher.SendMessage("ControlPolygonFalse", (object)""); |
|
if (LineamentEvent.gameobj!=null&&LineamentEvent.gameobj.name.Contains("sy")) |
|
{ |
|
LineamentEvent.gameobj.GetComponent<WoundedControl>().isfage = false; |
|
} |
|
if (GameObject.Find("TheTipWindow"))//解决伤员页面点击地面不隐藏问题 |
|
{ |
|
Destroy(GameObject.Find("TheTipWindow").gameObject); |
|
} |
|
InputManager.Instance_.ClearSelectedCharacters(); |
|
InstantiationCar.Instance.isCarSelect = false; |
|
InstantiationTool.Instance.isRLineSelect = false; |
|
|
|
//if (TheCarControl.activeInHierarchy && RecordManager.Instance.IsRecording) |
|
//{ |
|
// TheCarControl.GetComponent<ControlRiseCar>().ToggleChange(false); |
|
// MessageDispatcher.SendMessage("RecordControlJuBiEvent", (object)LineamentEvent.gameobj.name); |
|
//} |
|
TheCarControl.SetActive(false); |
|
if (!TheCarControl.activeInHierarchy) |
|
{ |
|
LineamentEvent.gameobj = null; |
|
|
|
} |
|
LineamentEvent.LastObj = null; |
|
} |
|
} |
|
}
|
|
|