// Use this for initialization void Start() { instance = this; //记录初始位置 originPos = reticleCanvas.transform.localPosition; //记录初始缩放 originScale = reticleCanvas.transform.localScale; }
public virtual void OnPointerHover(PointerEventData eventData) { if (leftImage == null || rightImage == null) { return; } if (leftImage.fillAmount >= 1f && rightImage.fillAmount >= 1) { leftImage.gameObject.SetActive(false); rightImage.gameObject.SetActive(false); GazeController.GazeHoverEnd(gameObject); return; } leftImage.fillAmount += Time.deltaTime; rightImage.fillAmount += Time.deltaTime; }