Skip to content
This repository was archived by the owner on Jun 4, 2021. It is now read-only.

Commit b3237b7

Browse files
committed
Fix tooltip
1 parent 761572c commit b3237b7

File tree

2 files changed

+49
-6
lines changed

2 files changed

+49
-6
lines changed

Ld48/Assets/Scenes/GameplayScene.unity

+46
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Ld48/Assets/Scripts/TemplateSystems/UI/MouseTooltip.cs

+3-6
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ public class MouseTooltip : MonoBehaviour {
1818
[SerializeField] TextMeshProUGUI textField;
1919
[SerializeField] LayoutElement childLayoutElement;
2020

21-
RectTransform parentRt;
22-
2321
bool isShowed;
2422

2523
#if UNITY_EDITOR
@@ -35,14 +33,12 @@ private void OnValidate() {
3533

3634
private void Awake() {
3735
cg.alpha = 0.0f;
38-
39-
GameManager.Instance.tooltip = this;
4036
}
4137

4238
private void Start() {
4339
enabled = false;
4440

45-
parentRt = transform.parent.GetComponent<RectTransform>();
41+
GameManager.Instance.tooltip = this;
4642
}
4743

4844
private void Update() {
@@ -99,7 +95,8 @@ public void Hide() {
9995
--InventoryItemTooltip.canvasSortOrder;
10096

10197
LeanTween.cancel(gameObject, false);
102-
LeanTweenEx.ChangeAlpha(cg, 0.0f, 0.1f).setEase(LeanTweenType.easeInOutQuad)
98+
LeanTweenEx.ChangeAlpha(cg, 0.0f, 0.1f)
99+
.setEase(LeanTweenType.easeInOutQuad)
103100
.setOnComplete(() => {
104101
enabled = false;
105102
});

0 commit comments

Comments
 (0)