コード例 #1
0
	public void LateUpdate() {

		if (WindowSystem.IsUIHovered() == true) return;

		if (this.cam == null) this.cam = Camera.main;
		if (this.cam == null) return;

		var ray = this.cam.ScreenPointToRay(Input.mousePosition);
		RaycastHit hit;
		if (Physics.Raycast(ray, out hit, 100f, 1 << this.gameObject.layer) == true && hit.collider.GetComponent<Example3DHover>() == this) {

			if (this.tip == null) {

				this.tip = WindowSystem.Show<UIWindowExampleTip>(w => w.OnParametersPass(this.hoverText)) as TipWindowType;
				this.tip.OnHover(this.transform, hit.point, this.cam, this.offset);

			}

		} else if (this.tip != null) {

			this.tip.Hide();
			this.tip.OnLeave();
			this.tip = null;

		}

	}
コード例 #2
0
		public override void OnHideBegin(System.Action callback, bool immediately = false) {

			base.OnHideBegin(callback, immediately);

			this.OnStateChanged(state: false);
			this.infoWindow = null;

		}
コード例 #3
0
		public override void OnDeinit() {

			base.OnDeinit();

			this.OnStateChanged(state: false);
			this.infoWindow = null;

		}
コード例 #4
0
		public void OnStateChanged(bool state) {

			if (state == true) {

				this.infoWindow = WindowSystem.Show<TextTipWindowType>(this.tipText) as TipWindowType;
				if (this.infoWindow != null) this.infoWindow.OnHover(this.transform as RectTransform);

			} else {

				if (this.infoWindow != null) {

					this.infoWindow.OnLeave();
					this.infoWindow.Hide();
					this.infoWindow = null;

				}

			}

		}
コード例 #5
0
	public void OnHover() {
		
		this.infoWindow = WindowSystem.Show<UIWindowExampleTip>((w) => w.OnParametersPass(this.text)) as TipWindowType;
		this.infoWindow.OnHover(this.transform as RectTransform);
		
	}
コード例 #6
0
	public void OnHover() {
		
		this.infoWindow = WindowSystem.Show<UIWindowExampleTip>(this.text) as TipWindowType;
		this.infoWindow.OnHover(this.transform as RectTransform);
		
	}