void Awake() { panelname = "MainLobbyPanel"; LeftBtn = this.transform.FindChild("Drag/LeftBtn").gameObject; if (LeftBtn != null) { ButtonClickListener listener = ButtonClickListener.AddEventListener(LeftBtn); listener.onClick = Down; } RightBtn = this.transform.FindChild("Drag/RightBtn").gameObject; if (RightBtn != null) { ButtonClickListener listener = ButtonClickListener.AddEventListener(RightBtn); listener.onClick = Down; } DragArea = this.transform.FindChild("Drag/DragArea").gameObject; CarTypeControler.CarRoot.position = new Vector3(DragArea.transform.position.x, DragArea.transform.position.y - 1.0f, 0.0f); if (DragArea != null) { EventTriggerListener listener = EventTriggerListener.AddEventListener(DragArea); listener.onDown = DragCar; listener.onDrag = CarOnDrag; listener.onUp = DragUp; } }