using System.Collections; using System.Collections.Generic; using UnityEngine; using XWFramework.UI; using System; using UnityEngine.UI; namespace Level1 { public class ToolPanel : UIPanel { public GameObject errorTip; public GameObject tip; protected override void Awake() { type = UIType.Tool; base.Awake(); } protected override void Init() { errorTip.SetActive(false); tip.SetActive(false); } #region ErrotTip public ToolPanel ChangeErrorTip(string content) { errorTip.SetActive(true); errorTip.GetComponent().ChangeText(content); errorTip.SetActive(false); return this; } public void ShowErrorTip(float t=2.5f) { errorTip.SetActive(true); errorTip.GetComponent().Show(t); } #endregion #region Tip public ToolPanel ChangeTip(string content) { tip.SetActive(true); tip.GetComponent().ChangeText(content); tip.SetActive(false); return this; } public void ShowTip() { tip.SetActive(true); tip.GetComponent().Show(); } #endregion } }