Exemplo n.º 1
0
        public override void UnInit()
        {
            base.UnInit();
            Singleton <CUIEventManager> .GetInstance().RemoveUIEventListener(enUIEventID.Purchase_OpenBuyActionPoint, new CUIEventManager.OnUIEventHandler(this.onOpenBuyActionPoint));

            Singleton <CUIEventManager> .GetInstance().RemoveUIEventListener(enUIEventID.Purchase_OpenBuyCoin, new CUIEventManager.OnUIEventHandler(this.onOpenBuyCoin));

            Singleton <CUIEventManager> .GetInstance().RemoveUIEventListener(enUIEventID.Purchase_OpenBuySkillPt, new CUIEventManager.OnUIEventHandler(this.onOpenBuySkillPt));

            Singleton <CUIEventManager> .GetInstance().RemoveUIEventListener(enUIEventID.Purchase_CloseBuyActionPoint, new CUIEventManager.OnUIEventHandler(this.onCloseBuyActionPoint));

            Singleton <CUIEventManager> .GetInstance().RemoveUIEventListener(enUIEventID.Purchase_CloseBuyCoin, new CUIEventManager.OnUIEventHandler(this.onCloseBuyCoin));

            Singleton <CUIEventManager> .GetInstance().RemoveUIEventListener(enUIEventID.Purchase_CloseBuySkillPt, new CUIEventManager.OnUIEventHandler(this.onCloseBuySkillPt));

            Singleton <CUIEventManager> .GetInstance().RemoveUIEventListener(enUIEventID.Purchase_BuyActPt, new CUIEventManager.OnUIEventHandler(this.onBuyActPt));

            Singleton <CUIEventManager> .GetInstance().RemoveUIEventListener(enUIEventID.Purchase_BuyCoinOne, new CUIEventManager.OnUIEventHandler(this.onBuyCoinOne));

            Singleton <CUIEventManager> .GetInstance().RemoveUIEventListener(enUIEventID.Purchase_BuyCoinTen, new CUIEventManager.OnUIEventHandler(this.onBuyCoinTen));

            Singleton <CUIEventManager> .GetInstance().RemoveUIEventListener(enUIEventID.Purchase_BuySkillPt, new CUIEventManager.OnUIEventHandler(this.onBuySkillPt));

            Singleton <EventRouter> .get_instance().RemoveEventHandler <CSPkg>("ShopBuyPurchase", new Action <CSPkg>(this.PurchaseRes));

            this.m_BuyActPtPanel.unInit();
            this.m_BuyCoinPanel.unInit();
            this.m_BuySkillPt.unInit();
            this.m_BuyActPtPanel = null;
            this.m_BuyCoinPanel  = null;
            this.m_BuySkillPt    = null;
        }
Exemplo n.º 2
0
        public override void Init()
        {
            Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.Purchase_OpenBuyActionPoint, new CUIEventManager.OnUIEventHandler(this.onOpenBuyActionPoint));

            Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.Purchase_OpenBuyCoin, new CUIEventManager.OnUIEventHandler(this.onOpenBuyCoin));

            Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.Purchase_OpenBuySkillPt, new CUIEventManager.OnUIEventHandler(this.onOpenBuySkillPt));

            Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.Purchase_CloseBuyActionPoint, new CUIEventManager.OnUIEventHandler(this.onCloseBuyActionPoint));

            Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.Purchase_CloseBuyCoin, new CUIEventManager.OnUIEventHandler(this.onCloseBuyCoin));

            Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.Purchase_CloseBuySkillPt, new CUIEventManager.OnUIEventHandler(this.onCloseBuySkillPt));

            Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.Purchase_BuyActPt, new CUIEventManager.OnUIEventHandler(this.onBuyActPt));

            Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.Purchase_BuyCoinOne, new CUIEventManager.OnUIEventHandler(this.onBuyCoinOne));

            Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.Purchase_BuyCoinTen, new CUIEventManager.OnUIEventHandler(this.onBuyCoinTen));

            Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.Purchase_BuySkillPt, new CUIEventManager.OnUIEventHandler(this.onBuySkillPt));

            Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.Purchase_BuyDiamond, new CUIEventManager.OnUIEventHandler(this.onBuyDiamond));

            Singleton <EventRouter> .get_instance().AddEventHandler <CSPkg>("ShopBuyPurchase", new Action <CSPkg>(this.PurchaseRes));

            Singleton <EventRouter> .get_instance().AddEventHandler <int>("SkillPointChange", new Action <int>(this.onSkillPointChange));

            this.m_BuyActPtPanel = new CBuyActPtPanel();
            this.m_BuyActPtPanel.init();
            this.m_BuyCoinPanel = new CBuyCoinPanel();
            this.m_BuyCoinPanel.init();
            this.m_BuySkillPt = new CBuySkillPt();
            this.m_BuySkillPt.init();
        }