using System.Collections; using System.Collections.Generic; using UnityEngine; public class ToolTipsManager : MonoSingleton { private ToolTipsController toolTipsController; private void Awake() { GameObject ToolTipsPrefab = Resources.Load("ToolTips") as GameObject; toolTipsController = GameObject.Instantiate(ToolTipsPrefab).GetComponent(); } /// /// 更新提示信息 /// /// /// public void UpdateToolTipsInfo(ToolTipsElement tipsInfo) { if (toolTipsController == null) return; toolTipsController.Active(); toolTipsController.ResetInfo(tipsInfo.toolName, tipsInfo.transform); } public void DisActive() { if (toolTipsController == null) return; toolTipsController.DisActive(); } }