Ejemplo n.º 1
0
		public void ChangeScene(Scene scene)
		{
			this.scene = scene;
			this.scene.SceneUpdated += currentScene_SceneUpdated;
		}
Ejemplo n.º 2
0
        private async void connectButton_Click(object sender, EventArgs e)
        {
            try
            {
                if(client.IsConnected)
                {
                    client.Disconnect();

                    scene?.Stop();
                }
                else
                {
                    debugLogTextBox.Clear();

                    scene = new Scene();
                    mapView.ChangeScene(scene);

                    await client.ConnectAsync(connectHostTextBox.Text, (int)connectPortNumericUpDown.Value);
                }
            }
            catch(Exception ex)
            {
                WriteLog(LogType.ERROR, ex.Message);
            }
        }