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