// ------------------------------------------------------------------------------
//  <autogenerated>
//      This code was generated by a tool.
//      Mono Runtime Version: 2.0.50727.1433
// 
//      Changes to this file may cause incorrect behavior and will be lost if 
//      the code is regenerated.
//  </autogenerated>
// ------------------------------------------------------------------------------

namespace QFramework.SaoLei
{
    using System;
    using System.Collections;
    using System.Collections.Generic;
    using System.Linq;
    using UnityEngine;
    using UnityEngine.UI;
    
    
    public class GameEndUIPanelData : QFramework.UIPanelData
    {
        public bool isWin {get;set;}
    }
    
    public partial class GameEndUIPanel : QFramework.UIPanel
    {
        
        protected override void ProcessMsg(int eventId, QFramework.QMsg msg)
        {
            throw new System.NotImplementedException ();
        }
        
        protected override void OnInit(QFramework.IUIData uiData)
        {
            mData = uiData as GameEndUIPanelData ?? new GameEndUIPanelData();
            // please add init code here
            if(mData.isWin)
                GameEndResultText.text = "胜利";
            else
                GameEndResultText.text = "失败";
            GameEndReplayBtn.onClick.AddListener(OnClickReplayBtn);
            GameEndBackBtn.onClick.AddListener(OnClickBackBtn);
        }
        void OnClickBackBtn()
        {
            UIKit.OpenPanel<GameStartUIPanel>();
            CloseSelf();
        }
         void OnClickReplayBtn()
        {
            TypeEventSystem.Global.Send(new GameMainResetEvent());
            CloseSelf();
        }
        
        protected override void OnOpen(QFramework.IUIData uiData)
        {
        }
        
        protected override void OnShow()
        {
        }
        
        protected override void OnHide()
        {
        }
        
        protected override void OnClose()
        {
        }
    }
}
