using System; using UnityEngine; public class TitleMouseOver : MonoBehaviour { public void OnHover(bool isOver) { if (isOver) { string name = UICamera.lastHit.collider.name; if (!BaseMgr.Instance.IsValidateButton(name)) { return; } TitleMgr.ButtonType buttonType = (TitleMgr.ButtonType)Enum.Parse(typeof(TitleMgr.ButtonType), name); if (buttonType != BaseMgr.Instance.m_currentActiveButton) { BaseMgr.Instance.m_titleCtrl.SetActiveButton(buttonType); } } } }