// *********************************************************************** // Assembly : Game // Author : Kimch // Created : 2020-09-16 // Description : // Last Modified By : // Last Modified On : // *********************************************************************** // // // *********************************************************************** using PureMVC.Interfaces; using System.Collections.Generic; namespace G.UI { public partial class GameWindow : KUIWindow { public static GameWindow Instance; #region Constructor public GameWindow() : base(UILayer.kNormal, UIMode.kSequenceRemove) { uiPath = "ui_battle/ui_w_game.prefab"; Instance = this; } #endregion #region Method int[] _listNotificationInterests = new int[] { GlobalDefine.EVENT_GAME_WINDOW, }; public override IList ListNotificationInterests() { return _listNotificationInterests; } public override void HandleNotification(INotification notification) { if (notification.Name == GlobalDefine.EVENT_GAME_WINDOW) { var type = notification.Type; if (type == nameof(BattlePanel)) { ShowBattle(); } else if (type == "skill_shop") { ShowMovesShop(notification.Body); } else if (type == "settle") { ShowSettle(notification.Body); } else if (type == "rivive")//复活 { ShowRivive(); } else if (type == "menu") { ShowMenu(); } } } #endregion #region Unity bool _isRegister; public bool isRegister => _isRegister; /// /// /// public override void Awake() { InitView(); } /// /// /// public override void OnEnable() { RegisterThis(); _isRegister = true; RefreshView(); } public override void OnDisable() { UnregisterThis(); _isRegister = false; } /// /// /// public override void Update() { UpdateView(); } /// /// /// public override void UpdatePerSecond() { } #endregion } }