Exemple #1
0
 public PanelBattle(GamePanelContainer container, RPGBattleClient bot)
 {
     this.container = container;
     this.battle    = bot;
     base.Start(new BotBattleFactory(battle));
     base.pictureBox1.MouseWheel += PictureBox1_MouseWheel;
     base.OnNetworkViewClicked   += PanelBattle_OnNetworkViewClicked;
     this.OnTurboChanged         += PanelBattle_OnTurboChanged;
     this.OnTimerBeginUpdate     += PanelBattle_OnTimerBeginUpdate;
 }
Exemple #2
0
        public GamePanel(GamePanelContainer container, RPGBattleClient client)
        {
            InitializeComponent();
            this.mContainer   = container;
            this.mClient      = client;
            this.mSessionView = new FormNetSession(client.Client.GameClient);
            this.mSessionView.ShowInTaskbar = false;
            this.mSessionView.FormClosing  += (object sender, FormClosingEventArgs e) =>
            {
                if (this.Visible)
                {
                    e.Cancel = true;
                    mSessionView.Hide();
                }
            };
            this.Disposed += (object sender, EventArgs e) =>
            {
                mSessionView.Dispose();
            };
            base.btn_NetView.Click += (object sender, EventArgs e) =>
            {
                mSessionView.Show();
            };
            base.timerInfo.Tick += (object sender, EventArgs e) =>
            {
                //                 string conn = mClient.Session.IsConnected ? "已连接" : "未连接";
                //                 this.Text = mClient.PlayerUUID + " - [" + conn + "]";
            };
            base.LoadTemplates += (DirectoryInfo dataRoot) =>
            {
                return(mClient.DataRoot);
            };
            base.CreateAbstractBattle += (int sceneID) =>
            {
                return(mClient);
            };

            base.Init();

            base.RenderFPS = mClient.DataRoot.Templates.CFG.SYSTEM_FPS;
        }