using System.Collections; using System.Collections.Generic; using UnityEngine; /* -------------------------------------- Project: Programing assessment Standard: 91906 (AS3.7) v.1 School: Tauranga Boys' College Author: Rauputu Noah Phizacklea Date: August 2024 Unity: 2021.3.18f --------------------------------------- */ public class ToolTip : MonoBehaviour { public string message; // The message to be displayed in the tooltip // Called when the mouse enters the collider of the GameObject void OnMouseEnter() { // Set and display the tooltip with the specified message ToolTipManager.currentInstance.SetAndShowToolTip(message); } // Called when the mouse exits the collider of the GameObject void OnMouseExit() { // Hide the tooltip ToolTipManager.currentInstance.HideToolTip(); } }