Esempio n. 1
0
    public static void AddDeath(this PhotonPlayer player, int deathToAddToCurrent)
    {
        int current = player.GetDeath();

        current = current + deathToAddToCurrent;

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

        death[PlayerDeaths.PlayerDeathProp] = current;

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