public static void HeroCostumeToLocalData(HeroCostume costume, string slot) { slot = slot.ToUpper(); PlayerPrefs.SetInt(slot + PhotonPlayerProperty.sex, CostumeConeveter.SexToInt(costume.sex)); PlayerPrefs.SetInt(slot + PhotonPlayerProperty.costumeId, costume.costumeId); PlayerPrefs.SetInt(slot + PhotonPlayerProperty.heroCostumeId, costume.id); PlayerPrefs.SetInt(slot + PhotonPlayerProperty.cape, (!costume.cape) ? 0 : 1); PlayerPrefs.SetInt(slot + PhotonPlayerProperty.hairInfo, costume.hairInfo.id); PlayerPrefs.SetInt(slot + PhotonPlayerProperty.eye_texture_id, costume.eye_texture_id); PlayerPrefs.SetInt(slot + PhotonPlayerProperty.beard_texture_id, costume.beard_texture_id); PlayerPrefs.SetInt(slot + PhotonPlayerProperty.glass_texture_id, costume.glass_texture_id); PlayerPrefs.SetInt(slot + PhotonPlayerProperty.skin_color, costume.skin_color); PlayerPrefs.SetFloat(slot + PhotonPlayerProperty.hair_color1, costume.hair_color.r); PlayerPrefs.SetFloat(slot + PhotonPlayerProperty.hair_color2, costume.hair_color.g); PlayerPrefs.SetFloat(slot + PhotonPlayerProperty.hair_color3, costume.hair_color.b); PlayerPrefs.SetInt(slot + PhotonPlayerProperty.division, CostumeConeveter.DivisionToInt(costume.division)); PlayerPrefs.SetInt(slot + PhotonPlayerProperty.statSPD, costume.stat.Spd); PlayerPrefs.SetInt(slot + PhotonPlayerProperty.statGAS, costume.stat.Gas); PlayerPrefs.SetInt(slot + PhotonPlayerProperty.statBLA, costume.stat.Bla); PlayerPrefs.SetInt(slot + PhotonPlayerProperty.statACL, costume.stat.Acl); PlayerPrefs.SetString(slot + PhotonPlayerProperty.statSKILL, costume.stat.skillID); }
public static void HeroCostumeToPhotonData(HeroCostume costume, PhotonPlayer player) { player.SetCustomProperties(new Hashtable { { PhotonPlayerProperty.sex, CostumeConeveter.SexToInt(costume.sex) } }); player.SetCustomProperties(new Hashtable { { PhotonPlayerProperty.costumeId, costume.costumeId } }); player.SetCustomProperties(new Hashtable { { PhotonPlayerProperty.heroCostumeId, costume.id } }); player.SetCustomProperties(new Hashtable { { PhotonPlayerProperty.cape, costume.cape } }); player.SetCustomProperties(new Hashtable { { PhotonPlayerProperty.hairInfo, costume.hairInfo.id } }); player.SetCustomProperties(new Hashtable { { PhotonPlayerProperty.eye_texture_id, costume.eye_texture_id } }); player.SetCustomProperties(new Hashtable { { PhotonPlayerProperty.beard_texture_id, costume.beard_texture_id } }); player.SetCustomProperties(new Hashtable { { PhotonPlayerProperty.glass_texture_id, costume.glass_texture_id } }); player.SetCustomProperties(new Hashtable { { PhotonPlayerProperty.skin_color, costume.skin_color } }); player.SetCustomProperties(new Hashtable { { PhotonPlayerProperty.hair_color1, costume.hair_color.r } }); player.SetCustomProperties(new Hashtable { { PhotonPlayerProperty.hair_color2, costume.hair_color.g } }); player.SetCustomProperties(new Hashtable { { PhotonPlayerProperty.hair_color3, costume.hair_color.b } }); player.SetCustomProperties(new Hashtable { { PhotonPlayerProperty.division, CostumeConeveter.DivisionToInt(costume.division) } }); player.SetCustomProperties(new Hashtable { { PhotonPlayerProperty.statSPD, costume.stat.Spd } }); player.SetCustomProperties(new Hashtable { { PhotonPlayerProperty.statGAS, costume.stat.Gas } }); player.SetCustomProperties(new Hashtable { { PhotonPlayerProperty.statBLA, costume.stat.Bla } }); player.SetCustomProperties(new Hashtable { { PhotonPlayerProperty.statACL, costume.stat.Acl } }); player.SetCustomProperties(new Hashtable { { PhotonPlayerProperty.statSKILL, costume.stat.skillID } }); }