Trying to switch screens when player dies in visual studio using xaml -


when player dies game exits want display mainmenu.xaml it's follows:

public void onplayerdeath(){      game.exit(); } 

what way make go main menu.xaml frame instead of game.exit?

create instance of mainmenu window , show it.

public void onplayerdeath() {     mainmenu mm = new mainmenu();     mm.show(); } 

Comments

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -