Exemplo n.º 1
0
    public void InitLocalPlayer()
    {
        var playerName = PlayerPrefs.GetString("PlayerName");

        localPlayerNameText.text           = playerName;
        PhotonNetwork.LocalPlayer.NickName = playerName;

        var cpt = new ExitGames.Client.Photon.Hashtable();

        cpt.Add("Body", PlayerPrefs.GetString("Body"));
        cpt.Add("Helmet", PlayerPrefs.GetString("Helmet"));
        cpt.Add("Suit", PlayerPrefs.GetString("Suit"));
        cpt.Add("Gloves", PlayerPrefs.GetString("Gloves"));
        cpt.Add("Boots", PlayerPrefs.GetString("Boots"));

        PhotonNetwork.LocalPlayer.SetCustomProperties(cpt);
        var ib = InfoBike.Instance;
        var ic = InfoCharacter.Instance;

        localModelManager.SetAllTexture(
            ib.GetBodyObjHigh(ib.dicSticker[PlayerPrefs.GetString("Body")].prefabId),
            ib.GetBodyTextureHigh(PlayerPrefs.GetString("Body")),
            ic.GetHelmetObjHigh(ic.dicTextureHelmetInfo[PlayerPrefs.GetString("Helmet")].prefabId),
            ic.GetHelmetTextureHigh(PlayerPrefs.GetString("Helmet")),
            ic.GetSuitTextureHigh(PlayerPrefs.GetString("Suit")),
            ic.GetGlovesTextureHigh(PlayerPrefs.GetString("Gloves")),
            ic.GetBootsTextureHigh(PlayerPrefs.GetString("Boots")));
    }
Exemplo n.º 2
0
 public override void OnRoomPropertiesUpdate(ExitGames.Client.Photon.Hashtable propertiesThatChanged)
 {
     base.OnRoomPropertiesUpdate(propertiesThatChanged);
 }