Wednesday 15 January 2014

Display final score from windows 8 game c# -


I created a game in C # for Windows 8 and it works like this, but the user Plays after the score is displayed in a text box and it is shown on the lower screen that it displays the score and the text and thumb shows the images how high it is.

The problem is that the score is not being topped up. The code I use is the constructor from the game page, then the score is below the code:

  var arcade = new arcadeMode (); ScoreNum.text = arcade.score.toString (); // To display images based on sample code (arcade.score & lt; 100) {Usermessage.text = "try again");; Thumbdown Visibility = visibility Visible; }   

I think my problem is actually getting saved points from the game because only the textbox value should be received before the game starts. In fact, it is not sure how to save the score without the database. Any suggestions about how to go about this?

It seems that ArcadeMode is basically your data model, but From game page to creator does not really mean this is an example of ArcadeMode on your game page and includes the actual score along with the above code , You have yet to create a new new installation of the same class in which the score starting with 0.

A faster way, because it appears that it is a simple piece of data that you want to pass, it uses the second parameter. Wherever you have navigated on a thumb-up page, add the existing value of your 'score' variable as the second parameter, for example:

  frame. In the case of Navigate (type of thumbsup page), score   

then thumbs uppage you can use the value passed through the property of the argument, for example For:

  protected override was navigated (navigation events erg e) {base.OnNigigatedTo (e); string score = e parameter ... ...   

Another option is to give the arcadmoda class example a big area (i.e. Not). For example, you can create a member of the App class, and then it will be available to all pages of your app.

No comments:

Post a Comment