private void btnTravel_Click(object sender, EventArgs e) { Travel travel = new Travel(inventory); Progress += travel.Progress; PlayerProgess p = new PlayerProgess(); p.Progress = inventory.player.progress; Progress?.Invoke(this, p); travel.ShowDialog(); }
//event progress method public void Progress(object sender, PlayerProgess e) { progress = e.Progress; }