removed not needed tooltip

This commit is contained in:
TAASONI3
2023-12-26 19:40:38 +01:00
parent bf705a52a8
commit a8c4cdcf3c
7 changed files with 122 additions and 92 deletions

View File

@@ -1,41 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.EventSystems;
using Assets.Scripts.Player;
namespace Assets.Scripts
{
public class TooltipHandler : MonoBehaviour
{
public GameObject tooltip;
PlayerGameObject player;
UIHandler uihandler;
// Start is called before the first frame update
void Start()
{
player = GameObject.Find("Player").GetComponent<PlayerGameObject>();
uihandler = GameObject.Find("UIHandler").GetComponent<UIHandler>();
}
// Update is called once per frame
void Update()
{
}
public void showTooltip(string text)
{
tooltip.transform.Find("txtTooltip").GetComponent<Text>().text = text;
tooltip.transform.localScale = new Vector3(1,1,1);
}
public void hideToolTip()
{
tooltip.transform.localScale = new Vector3(0,0,0);
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: ff63195da43e3a145abba1304336b467
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -22,7 +22,6 @@ namespace Assets.Scripts
public GameObject playerHUD;
public GameObject questlog;
public GameObject introduction;
public GameObject tooltip;
public GameObject tutorial;
public GameObject inventory;
public GameObject waterLayer;

View File

@@ -26,15 +26,12 @@ namespace Assets.Scripts
public int currentBag = -1;
TooltipHandler tooltip;
public GameObject currentSlot;
// Start is called before the first frame update
void Start()
{
createStatBoost();
tooltip = GameObject.Find("TooltipHandler").GetComponent<TooltipHandler>();
itemDisplay.transform.localScale = new Vector3(0,0,0);
changeCurrentBag(0);
}

View File

@@ -10,7 +10,6 @@ namespace Assets.Scripts
{
public class InventorySlot : MonoBehaviour
{
TooltipHandler tooltip;
Item[] items = new Item[3];
int currentBag = 0;
public ItemPlace place;
@@ -19,7 +18,6 @@ namespace Assets.Scripts
private void Start()
{
tooltip = GameObject.Find("TooltipHandler").GetComponent<TooltipHandler>();
inventory = GameObject.Find("Inventory").GetComponent<Inventory>();
loadImages();
}