Exemple #1
0
    public static void AddDeathes(this PhotonPlayer player, int deathesToAddToCurrent)
    {
        int current = player.GetDeathes();

        current = current + deathesToAddToCurrent;

        Hashtable deathes = new Hashtable();  // using PUN's implementation of Hashtable

        deathes[PunPlayerScores.PlayerDeathProp] = current;

        player.SetCustomProperties(deathes);  // this locally sets the score and will sync it in-game asap.
    }