public static HeroCostume PhotonDataToHeroCostume2(PhotonPlayer player) { HeroCostume costume = new HeroCostume(); SEX sex = IntToSex((int)player.customProperties[PhotonPlayerProperty.sex]); costume = new HeroCostume { sex = sex, costumeId = (int)player.customProperties[PhotonPlayerProperty.costumeId], id = (int)player.customProperties[PhotonPlayerProperty.heroCostumeId], cape = (bool)player.customProperties[PhotonPlayerProperty.cape], hairInfo = (sex != SEX.MALE) ? CostumeHair.hairsF[(int)player.customProperties[PhotonPlayerProperty.hairInfo]] : CostumeHair.hairsM[(int)player.customProperties[PhotonPlayerProperty.hairInfo]], eye_texture_id = (int)player.customProperties[PhotonPlayerProperty.eye_texture_id], beard_texture_id = (int)player.customProperties[PhotonPlayerProperty.beard_texture_id], glass_texture_id = (int)player.customProperties[PhotonPlayerProperty.glass_texture_id], skin_color = (int)player.customProperties[PhotonPlayerProperty.skin_color], hair_color = new Color((float)player.customProperties[PhotonPlayerProperty.hair_color1], (float)player.customProperties[PhotonPlayerProperty.hair_color2], (float)player.customProperties[PhotonPlayerProperty.hair_color3]), division = IntToDivision((int)player.customProperties[PhotonPlayerProperty.division]), stat = new HeroStat() }; costume.stat.SPD = (int)player.customProperties[PhotonPlayerProperty.statSPD]; costume.stat.GAS = (int)player.customProperties[PhotonPlayerProperty.statGAS]; costume.stat.BLA = (int)player.customProperties[PhotonPlayerProperty.statBLA]; costume.stat.ACL = (int)player.customProperties[PhotonPlayerProperty.statACL]; costume.stat.skillId = (string)player.customProperties[PhotonPlayerProperty.statSKILL]; if ((costume.costumeId == 0x19) && (costume.sex == SEX.FEMALE)) { costume.costumeId = 0x1a; } costume.setBodyByCostumeId(-1); costume.setMesh2(); costume.setTexture(); return(costume); }
public static HeroCostume LocalDataToHeroCostume(string slot) { slot = slot.ToUpper(); if (!PlayerPrefs.HasKey(slot + PhotonPlayerProperty.sex)) { return(HeroCostume.costume[0]); } HeroCostume costume = new HeroCostume(); costume = new HeroCostume { sex = IntToSex(PlayerPrefs.GetInt(slot + PhotonPlayerProperty.sex)), id = PlayerPrefs.GetInt(slot + PhotonPlayerProperty.heroCostumeId), costumeId = PlayerPrefs.GetInt(slot + PhotonPlayerProperty.costumeId), cape = (PlayerPrefs.GetInt(slot + PhotonPlayerProperty.cape) != 1) ? false : true }; costume.hairInfo = (costume.sex != SEX.MALE) ? CostumeHair.hairsF[PlayerPrefs.GetInt(slot + PhotonPlayerProperty.hairInfo)] : CostumeHair.hairsM[PlayerPrefs.GetInt(slot + PhotonPlayerProperty.hairInfo)]; costume.eye_texture_id = PlayerPrefs.GetInt(slot + PhotonPlayerProperty.eye_texture_id); costume.beard_texture_id = PlayerPrefs.GetInt(slot + PhotonPlayerProperty.beard_texture_id); costume.glass_texture_id = PlayerPrefs.GetInt(slot + PhotonPlayerProperty.glass_texture_id); costume.skin_color = PlayerPrefs.GetInt(slot + PhotonPlayerProperty.skin_color); costume.hair_color = new Color(PlayerPrefs.GetFloat(slot + PhotonPlayerProperty.hair_color1), PlayerPrefs.GetFloat(slot + PhotonPlayerProperty.hair_color2), PlayerPrefs.GetFloat(slot + PhotonPlayerProperty.hair_color3)); costume.division = IntToDivision(PlayerPrefs.GetInt(slot + PhotonPlayerProperty.division)); costume.stat = new HeroStat(); costume.stat.SPD = PlayerPrefs.GetInt(slot + PhotonPlayerProperty.statSPD); costume.stat.GAS = PlayerPrefs.GetInt(slot + PhotonPlayerProperty.statGAS); costume.stat.BLA = PlayerPrefs.GetInt(slot + PhotonPlayerProperty.statBLA); costume.stat.ACL = PlayerPrefs.GetInt(slot + PhotonPlayerProperty.statACL); costume.stat.skillId = PlayerPrefs.GetString(slot + PhotonPlayerProperty.statSKILL); costume.setBodyByCostumeId(-1); costume.setMesh2(); costume.setTexture(); return(costume); }
public static HeroCostume PhotonDataToHeroCostume(Player player) { var costume = new HeroCostume { sex = player.Properties.Sex, costumeId = player.Properties.CostumeID, id = player.Properties.HeroCostumeID, cape = player.Properties.HasCape, hairInfo = player.Properties.Sex != Sex.Male ? CostumeHair.FemaleHairs[player.Properties.HairInfo] : CostumeHair.MaleHairs[player.Properties.HairInfo], eye_texture_id = player.Properties.EyeTextureID, beard_texture_id = player.Properties.BeardTextureID, glass_texture_id = player.Properties.GlassTextureID, skin_color = player.Properties.SkinColor, hair_color = player.Properties.HairColor, division = player.Properties.Division, stat = player.Properties.HeroStat }; if (costume.costumeId == 25 && costume.sex == Sex.Female) { costume.costumeId = 26; } costume.setBodyByCostumeId(-1); costume.setMesh2(); costume.setTexture(); return(costume); }
public static HeroCostume PhotonDataToHeroCostume2(PhotonPlayer player) { HeroCostume costume = new HeroCostume(); SEX sex = IntToSex(player.sex); costume = new HeroCostume { sex = sex, costumeId = player.costumeId, id = player.heroCostumeId, cape = player.cape, hairInfo = (sex != SEX.MALE) ? CostumeHair.hairsF[player.hairInfo] : CostumeHair.hairsM[player.hairInfo], eye_texture_id = player.eye_texture_id, beard_texture_id = player.beard_texture_id, glass_texture_id = player.glass_texture_id, skin_color = player.skin_color, hair_color = new Color(player.hair_color1, player.hair_color2, player.hair_color3), division = IntToDivision(player.division), stat = new HeroStat() }; costume.stat.SPD = player.statSPD; costume.stat.GAS = player.statGAS; costume.stat.BLA = player.statBLA; costume.stat.ACL = player.statACL; costume.stat.skillId = player.statSKILL; if ((costume.costumeId == 0x19) && (costume.sex == SEX.FEMALE)) { costume.costumeId = 0x1a; } costume.setBodyByCostumeId(-1); costume.setMesh2(); costume.setTexture(); return(costume); }
public static HeroCostume LocalDataToHeroCostume(string slot) { slot = slot.ToUpper(); if (!PlayerPrefs.HasKey(slot + PlayerProperty.Sex)) { return(HeroCostume.costume[0]); } HeroCostume costume = new HeroCostume(); costume = new HeroCostume { sex = (Sex)PlayerPrefs.GetInt(slot + PlayerProperty.Sex), id = PlayerPrefs.GetInt(slot + PlayerProperty.HeroCostumeID), costumeId = PlayerPrefs.GetInt(slot + PlayerProperty.CostumeID), cape = PlayerPrefs.GetInt(slot + PlayerProperty.HasCape) == 1, hairInfo = costume.sex != Sex.Male ? CostumeHair.FemaleHairs[PlayerPrefs.GetInt(slot + PlayerProperty.HairInfo)] : CostumeHair.MaleHairs[PlayerPrefs.GetInt(slot + PlayerProperty.HairInfo)], eye_texture_id = PlayerPrefs.GetInt(slot + PlayerProperty.EyeTextureID), beard_texture_id = PlayerPrefs.GetInt(slot + PlayerProperty.BeardTextureId), glass_texture_id = PlayerPrefs.GetInt(slot + PlayerProperty.GlassTextureID), skin_color = PlayerPrefs.GetInt(slot + PlayerProperty.SkinColor), hair_color = new Color(PlayerPrefs.GetFloat(slot + PlayerProperty.HairColorR), PlayerPrefs.GetFloat(slot + PlayerProperty.HairColorG), PlayerPrefs.GetFloat(slot + PlayerProperty.HairColorB)), division = (Division)PlayerPrefs.GetInt(slot + PlayerProperty.Division), stat = new HeroStat() }; costume.stat.Speed = PlayerPrefs.GetInt(slot + PlayerProperty.Speed); costume.stat.Gas = PlayerPrefs.GetInt(slot + PlayerProperty.Gas); costume.stat.Blade = PlayerPrefs.GetInt(slot + PlayerProperty.Blade); costume.stat.Acceleration = PlayerPrefs.GetInt(slot + PlayerProperty.Acceleration); costume.stat.SkillName = PlayerPrefs.GetString(slot + PlayerProperty.Skill); costume.setBodyByCostumeId(); costume.setMesh2(); costume.setTexture(); return(costume); }