public void Start() { this.rectTransform = this.GetComponent <RectTransform>(); if (this.rectTransform == null) { Debug.LogError("Cannot obtain cursor's RectTransform. Please check."); } this.cursorGroup = this.GetComponent <CanvasGroup>(); if (this.cursorGroup == null) { Debug.LogError("Cannot obtain cursor's CanvasGroup. Please check."); } this.icon = this.GetComponentInChildren <CursorButtonIcon>(); if (this.icon == null) { Debug.LogError("Cannot obtain cursor mouse button click icons. Please check."); } this.isAppearing = false; this.isPanning = false; this.cursorGroup.alpha = 0f; this.cursorGroup.interactable = false; this.cursorGroup.blocksRaycasts = false; this.panningElapsedTime = 0f; this.rectTransform.localPosition = Vector3.zero; this.endingPosition = this.startingPosition = Vector3.zero; }
public void Start() { this.rectTransform = this.GetComponent<RectTransform>(); if (this.rectTransform == null) { Debug.LogError("Cannot obtain cursor's RectTransform. Please check."); } this.cursorGroup = this.GetComponent<CanvasGroup>(); if (this.cursorGroup == null) { Debug.LogError("Cannot obtain cursor's CanvasGroup. Please check."); } this.icon = this.GetComponentInChildren<CursorButtonIcon>(); if (this.icon == null) { Debug.LogError("Cannot obtain cursor mouse button click icons. Please check."); } this.isAppearing = false; this.isPanning = false; this.cursorGroup.alpha = 0f; this.cursorGroup.interactable = false; this.cursorGroup.blocksRaycasts = false; this.panningElapsedTime = 0f; this.rectTransform.localPosition = Vector3.zero; this.endingPosition = this.startingPosition = Vector3.zero; }