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

Commit

Permalink
Fix tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
Team-on committed May 14, 2021
1 parent 761572c commit b3237b7
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 6 deletions.
46 changes: 46 additions & 0 deletions Ld48/Assets/Scenes/GameplayScene.unity

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 3 additions & 6 deletions Ld48/Assets/Scripts/TemplateSystems/UI/MouseTooltip.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ public class MouseTooltip : MonoBehaviour {
[SerializeField] TextMeshProUGUI textField;
[SerializeField] LayoutElement childLayoutElement;

RectTransform parentRt;

bool isShowed;

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

private void Awake() {
cg.alpha = 0.0f;

GameManager.Instance.tooltip = this;
}

private void Start() {
enabled = false;

parentRt = transform.parent.GetComponent<RectTransform>();
GameManager.Instance.tooltip = this;
}

private void Update() {
Expand Down Expand Up @@ -99,7 +95,8 @@ public void Hide() {
--InventoryItemTooltip.canvasSortOrder;

LeanTween.cancel(gameObject, false);
LeanTweenEx.ChangeAlpha(cg, 0.0f, 0.1f).setEase(LeanTweenType.easeInOutQuad)
LeanTweenEx.ChangeAlpha(cg, 0.0f, 0.1f)
.setEase(LeanTweenType.easeInOutQuad)
.setOnComplete(() => {
enabled = false;
});
Expand Down

0 comments on commit b3237b7

Please sign in to comment.