Simple Scoring system? (Am I doing this the right way?) PLAYER PROPERTIES

Hi gang!
trying to implement a simple scoring system cross my game.

In my connection process have...

public void OnJoinedLobby()
Hashtable PlayerCustomProps = new Hashtable();
PlayerCustomProps["Score"] = 0;
PlayerCustomProps["Username"] = Username;


ok as far i i understand it each player connected has a "Playerobject" and each can be assigned their own custom properties....

Next, I have this on my "Hit-Detection script:

// if this bullet belongs to me.....
PhotonNetwork.player.customProperties["Score"] = (int)PhotonNetwork.player.customProperties["Score"] + 1;

so every time you hit an enemy target you gain 1 point. :D

my question is this.:
How do I display the score as a GUI--Text?
At the end of my game the person with the highest score is the Winner.
I need to display each persons username and their text in order from highest to lowest
On every connected players Machines.
the winner prompt with a "You Win!" that will be set active that is a game-object in the canvas.

"Player" representing their usernames.

WINNER: PlayerOner 11000

player two 10000
player three 9000
Player Four 8000
player five 12


Sign In or Register to comment.