public void setHair() { Destroy(part_hair); var index = Random.Range(0, CostumeHair.hairsM.Length); if (index == 3) { index = 9; } hairType = index; hair = CostumeHair.hairsM[index]; if (hair.hair == string.Empty) { hair = CostumeHair.hairsM[9]; hairType = 9; } part_hair = (GameObject)Instantiate(Resources.Load("Character/" + hair.hair)); part_hair.transform.parent = hair_go_ref.transform.parent; part_hair.transform.position = hair_go_ref.transform.position; part_hair.transform.rotation = hair_go_ref.transform.rotation; part_hair.transform.localScale = hair_go_ref.transform.localScale; part_hair.renderer.material = CharacterMaterials.materials[hair.texture]; part_hair.renderer.material.color = HeroCostume.costume[Random.Range(0, HeroCostume.costume.Length - 5)].hair_color; var id = Random.Range(1, 8); setFacialTexture(eye, id); if (IN_GAME_MAIN_CAMERA.gametype == GAMETYPE.MULTIPLAYER && photonView.isMine) { object[] parameters = { hairType, id, part_hair.renderer.material.color.r, part_hair.renderer.material.color.g, part_hair.renderer.material.color.b }; photonView.RPC("setHairPRC", PhotonTargets.OthersBuffered, parameters); } }
public void setHair() { UnityEngine.Object.Destroy(this.part_hair); int index = UnityEngine.Random.Range(0, CostumeHair.hairsM.Length); if (index == 3) { index = 9; } this.hairType = index; this.hair = CostumeHair.hairsM[index]; if (this.hair.hair == string.Empty) { this.hair = CostumeHair.hairsM[9]; this.hairType = 9; } this.part_hair = (GameObject)UnityEngine.Object.Instantiate(Resources.Load("Character/" + this.hair.hair)); this.part_hair.transform.parent = this.hair_go_ref.transform.parent; this.part_hair.transform.position = this.hair_go_ref.transform.position; this.part_hair.transform.rotation = this.hair_go_ref.transform.rotation; this.part_hair.transform.localScale = this.hair_go_ref.transform.localScale; this.part_hair.renderer.material = CharacterMaterials.materials[this.hair.texture]; this.part_hair.renderer.material.color = HeroCostume.costume[UnityEngine.Random.Range(0, HeroCostume.costume.Length - 5)].hair_color; int id = UnityEngine.Random.Range(1, 8); this.setFacialTexture(this.eye, id); if ((IN_GAME_MAIN_CAMERA.gametype == GAMETYPE.MULTIPLAYER) && base.photonView.isMine) { object[] parameters = new object[] { this.hairType, id, this.part_hair.renderer.material.color.r, this.part_hair.renderer.material.color.g, this.part_hair.renderer.material.color.b }; base.photonView.RPC("setHairPRC", PhotonTargets.OthersBuffered, parameters); } }
public void setPunkHair() { Destroy(part_hair); hair = CostumeHair.hairsM[3]; hairType = 3; var obj2 = (GameObject)Instantiate(Resources.Load("Character/" + hair.hair)); obj2.transform.parent = hair_go_ref.transform.parent; obj2.transform.position = hair_go_ref.transform.position; obj2.transform.rotation = hair_go_ref.transform.rotation; obj2.transform.localScale = hair_go_ref.transform.localScale; obj2.renderer.material = CharacterMaterials.materials[hair.texture]; switch (Random.Range(1, 4)) { case 1: obj2.renderer.material.color = FengColor.hairPunk1; break; case 2: obj2.renderer.material.color = FengColor.hairPunk2; break; case 3: obj2.renderer.material.color = FengColor.hairPunk3; break; } part_hair = obj2; setFacialTexture(eye, 0); if (IN_GAME_MAIN_CAMERA.gametype == GAMETYPE.MULTIPLAYER && photonView.isMine) { object[] parameters = { hairType, 0, part_hair.renderer.material.color.r, part_hair.renderer.material.color.g, part_hair.renderer.material.color.b }; photonView.RPC("setHairPRC", PhotonTargets.OthersBuffered, parameters); } }
public void setPunkHair() { UnityEngine.Object.Destroy(this.part_hair); this.hair = CostumeHair.hairsM[3]; this.hairType = 3; GameObject obj2 = (GameObject)UnityEngine.Object.Instantiate(Resources.Load("Character/" + this.hair.hair)); obj2.transform.parent = this.hair_go_ref.transform.parent; obj2.transform.position = this.hair_go_ref.transform.position; obj2.transform.rotation = this.hair_go_ref.transform.rotation; obj2.transform.localScale = this.hair_go_ref.transform.localScale; obj2.renderer.material = CharacterMaterials.materials[this.hair.texture]; switch (UnityEngine.Random.Range(1, 4)) { case 1: obj2.renderer.material.color = FengColor.hairPunk1; break; case 2: obj2.renderer.material.color = FengColor.hairPunk2; break; case 3: obj2.renderer.material.color = FengColor.hairPunk3; break; } this.part_hair = obj2; this.setFacialTexture(this.eye, 0); if ((IN_GAME_MAIN_CAMERA.gametype == GAMETYPE.MULTIPLAYER) && base.photonView.isMine) { object[] parameters = new object[] { this.hairType, 0, this.part_hair.renderer.material.color.r, this.part_hair.renderer.material.color.g, this.part_hair.renderer.material.color.b }; base.photonView.RPC("setHairPRC", PhotonTargets.OthersBuffered, parameters); } }
private void Awake() { CostumeHair.Init(); CharacterMaterials.InitData(); HeroCostume.Init(); hair_go_ref = new GameObject(); eye.transform.parent = base.transform.Find("Amarture/Core/Controller_Body/hip/spine/chest/neck/head").transform; hair_go_ref.transform.position = eye.transform.position + Vector3.up * 3.5f + base.transform.forward * 5.2f; hair_go_ref.transform.rotation = eye.transform.rotation; hair_go_ref.transform.RotateAround(eye.transform.position, base.transform.right, -20f); hair_go_ref.transform.localScale = new Vector3(210f, 210f, 210f); hair_go_ref.transform.parent = base.transform.Find("Amarture/Core/Controller_Body/hip/spine/chest/neck/head").transform; }
private void Awake() { CostumeHair.init(); CharacterMaterials.init(); HeroCostume.init(); this.hair_go_ref = new GameObject(); this.eye.transform.parent = base.transform.Find("Amarture/Core/Controller_Body/hip/spine/chest/neck/head").transform; this.hair_go_ref.transform.position = (Vector3)((this.eye.transform.position + (Vector3.up * 3.5f)) + (base.transform.forward * 5.2f)); this.hair_go_ref.transform.rotation = this.eye.transform.rotation; this.hair_go_ref.transform.RotateAround(this.eye.transform.position, base.transform.right, -20f); this.hair_go_ref.transform.localScale = new Vector3(210f, 210f, 210f); this.hair_go_ref.transform.parent = base.transform.Find("Amarture/Core/Controller_Body/hip/spine/chest/neck/head").transform; }
public static void Init() { // Male MaleHairs = new CostumeHair[11]; for (int i = 0; i < MaleHairs.Length; i++) { MaleHairs[i] = new CostumeHair(); MaleHairs[i].id = i; } MaleHairs[0].hair = (MaleHairs[0].texture = "hair_boy1"); MaleHairs[1].hair = (MaleHairs[1].texture = "hair_boy2"); MaleHairs[2].hair = (MaleHairs[2].texture = "hair_boy3"); MaleHairs[3].hair = (MaleHairs[3].texture = "hair_boy4"); MaleHairs[4].hair = (MaleHairs[4].texture = "hair_eren"); MaleHairs[5].hair = (MaleHairs[5].texture = "hair_armin"); MaleHairs[6].hair = (MaleHairs[6].texture = "hair_jean"); MaleHairs[7].hair = (MaleHairs[7].texture = "hair_levi"); MaleHairs[8].hair = (MaleHairs[8].texture = "hair_marco"); MaleHairs[9].hair = (MaleHairs[9].texture = "hair_mike"); MaleHairs[10].hair = (MaleHairs[10].texture = string.Empty); // Female FemaleHairs = new CostumeHair[11]; for (int i = 0; i < FemaleHairs.Length; i++) { FemaleHairs[i] = new CostumeHair(); FemaleHairs[i].id = i; } FemaleHairs[0].hair = (FemaleHairs[0].texture = "hair_girl1"); FemaleHairs[1].hair = (FemaleHairs[1].texture = "hair_girl2"); FemaleHairs[2].hair = (FemaleHairs[2].texture = "hair_girl3"); FemaleHairs[3].hair = (FemaleHairs[3].texture = "hair_girl4"); FemaleHairs[4].hair = (FemaleHairs[4].texture = "hair_girl5"); FemaleHairs[4].hasCloth = true; FemaleHairs[4].hair_1 = "hair_girl5_cloth"; FemaleHairs[5].hair = (FemaleHairs[5].texture = "hair_annie"); FemaleHairs[6].hair = (FemaleHairs[6].texture = "hair_hanji"); FemaleHairs[6].hasCloth = true; FemaleHairs[6].hair_1 = "hair_hanji_cloth"; FemaleHairs[7].hair = (FemaleHairs[7].texture = "hair_mikasa"); FemaleHairs[8].hair = (FemaleHairs[8].texture = "hair_petra"); FemaleHairs[9].hair = (FemaleHairs[9].texture = "hair_rico"); FemaleHairs[10].hair = (FemaleHairs[10].texture = "hair_sasha"); FemaleHairs[10].hasCloth = true; FemaleHairs[10].hair_1 = "hair_sasha_cloth"; }
public void setPunkHair() { Object.Destroy(part_hair); hair = CostumeHair.hairsM[3]; hairType = 3; GameObject gameObject = (GameObject)Object.Instantiate(Resources.Load("Character/" + hair.hair)); gameObject.transform.parent = hair_go_ref.transform.parent; gameObject.transform.position = hair_go_ref.transform.position; gameObject.transform.rotation = hair_go_ref.transform.rotation; gameObject.transform.localScale = hair_go_ref.transform.localScale; gameObject.renderer.material = CharacterMaterials.materials[hair.texture]; int num = Random.Range(1, 4); if (num == 1) { gameObject.renderer.material.color = FengColor.PunkHair1; } if (num == 2) { gameObject.renderer.material.color = FengColor.PunkHair2; } if (num == 3) { gameObject.renderer.material.color = FengColor.PunkHair3; } part_hair = gameObject; setFacialTexture(eye, 0); if (IN_GAME_MAIN_CAMERA.Gametype == GameType.Multiplayer && base.photonView.isMine) { PhotonView photonView = base.photonView; object[] obj = new object[5] { hairType, 0, null, null, null }; Color color = part_hair.renderer.material.color; obj[2] = color.r; obj[3] = color.g; obj[4] = color.b; photonView.RPC("setHairPRC", PhotonTargets.OthersBuffered, obj); } }
public static void Init() { // Male hairsM = new CostumeHair[11]; for (int i = 0; i < hairsM.Length; i++) { hairsM[i] = new CostumeHair(); hairsM[i].id = i; } hairsM[0].hair = (hairsM[0].texture = "hair_boy1"); hairsM[1].hair = (hairsM[1].texture = "hair_boy2"); hairsM[2].hair = (hairsM[2].texture = "hair_boy3"); hairsM[3].hair = (hairsM[3].texture = "hair_boy4"); hairsM[4].hair = (hairsM[4].texture = "hair_eren"); hairsM[5].hair = (hairsM[5].texture = "hair_armin"); hairsM[6].hair = (hairsM[6].texture = "hair_jean"); hairsM[7].hair = (hairsM[7].texture = "hair_levi"); hairsM[8].hair = (hairsM[8].texture = "hair_marco"); hairsM[9].hair = (hairsM[9].texture = "hair_mike"); hairsM[10].hair = (hairsM[10].texture = string.Empty); // Female hairsF = new CostumeHair[11]; for (int i = 0; i < hairsF.Length; i++) { hairsF[i] = new CostumeHair(); hairsF[i].id = i; } hairsF[0].hair = (hairsF[0].texture = "hair_girl1"); hairsF[1].hair = (hairsF[1].texture = "hair_girl2"); hairsF[2].hair = (hairsF[2].texture = "hair_girl3"); hairsF[3].hair = (hairsF[3].texture = "hair_girl4"); hairsF[4].hair = (hairsF[4].texture = "hair_girl5"); hairsF[4].hasCloth = true; hairsF[4].hair_1 = "hair_girl5_cloth"; hairsF[5].hair = (hairsF[5].texture = "hair_annie"); hairsF[6].hair = (hairsF[6].texture = "hair_hanji"); hairsF[6].hasCloth = true; hairsF[6].hair_1 = "hair_hanji_cloth"; hairsF[7].hair = (hairsF[7].texture = "hair_mikasa"); hairsF[8].hair = (hairsF[8].texture = "hair_petra"); hairsF[9].hair = (hairsF[9].texture = "hair_rico"); hairsF[10].hair = (hairsF[10].texture = "hair_sasha"); hairsF[10].hasCloth = true; hairsF[10].hair_1 = "hair_sasha_cloth"; }
private void setHairPRC(int type, int eye_type, float c1, float c2, float c3) { Object.Destroy(part_hair); hair = CostumeHair.hairsM[type]; hairType = type; if (hair.hair != string.Empty) { GameObject gameObject = (GameObject)Object.Instantiate(Resources.Load("Character/" + hair.hair)); gameObject.transform.parent = hair_go_ref.transform.parent; gameObject.transform.position = hair_go_ref.transform.position; gameObject.transform.rotation = hair_go_ref.transform.rotation; gameObject.transform.localScale = hair_go_ref.transform.localScale; gameObject.renderer.material = CharacterMaterials.materials[hair.texture]; gameObject.renderer.material.color = new Color(c1, c2, c3); part_hair = gameObject; } setFacialTexture(eye, eye_type); }
private void setHairPRC(int hairIndex, int eyeIndex, float hairR, float hairG, float hairB) { Object.Destroy(part_hair); hair = CostumeHair.MaleHairs[hairIndex]; this.hairType = hairIndex; if (hair.hair.Length > 0) { GameObject gameObject = (GameObject)Object.Instantiate(Resources.Load("Character/" + hair.hair)); gameObject.transform.parent = hair_go_ref.transform.parent; gameObject.transform.position = hair_go_ref.transform.position; gameObject.transform.rotation = hair_go_ref.transform.rotation; gameObject.transform.localScale = hair_go_ref.transform.localScale; gameObject.renderer.material = CharacterMaterials.materials[hair.texture]; gameObject.renderer.material.color = new Color(hairR, hairG, hairB); part_hair = gameObject; } SetEyeTexture(eye, eyeIndex); }
private void setHairPRC(int type, int eye_type, float c1, float c2, float c3) { UnityEngine.Object.Destroy(this.part_hair); this.hair = CostumeHair.hairsM[type]; this.hairType = type; if (this.hair.hair != string.Empty) { GameObject obj2 = (GameObject)UnityEngine.Object.Instantiate(Resources.Load("Character/" + this.hair.hair)); obj2.transform.parent = this.hair_go_ref.transform.parent; obj2.transform.position = this.hair_go_ref.transform.position; obj2.transform.rotation = this.hair_go_ref.transform.rotation; obj2.transform.localScale = this.hair_go_ref.transform.localScale; obj2.renderer.material = CharacterMaterials.materials[this.hair.texture]; obj2.renderer.material.color = new Color(c1, c2, c3); this.part_hair = obj2; } this.setFacialTexture(this.eye, eye_type); }
private void ApplyHairSkin(int hair, int eye, string hairlink) { Destroy(this.part_hair); this.hair = CostumeHair.hairsM[hair]; this.hairType = hair; if (this.hair.hair != string.Empty) { part_hair = (GameObject)UnityEngine.Object.Instantiate(CacheResources.Load("Character/" + this.hair.hair)); part_hair.transform.parent = this.hair_go_ref.transform.parent; part_hair.transform.position = this.hair_go_ref.transform.position; part_hair.transform.rotation = this.hair_go_ref.transform.rotation; part_hair.transform.localScale = this.hair_go_ref.transform.localScale; part_hair.renderer.material = CharacterMaterials.Materials[this.hair.texture]; } if (hairSkin != null) { hairSkin = new Anarchy.Skins.Titans.TitanSkinHair(part_hair, hairlink); } Anarchy.Skins.Skin.Check(hairSkin, new string[] { hairlink }); this.setFacialTexture(this.eye, eye); }
public void setPunkHair() { UnityEngine.Object.Destroy(this.part_hair); this.hair = CostumeHair.hairsM[3]; this.hairType = 3; GameObject gameObject = (GameObject)UnityEngine.Object.Instantiate(CacheResources.Load("Character/" + this.hair.hair)); gameObject.transform.parent = this.hair_go_ref.transform.parent; gameObject.transform.position = this.hair_go_ref.transform.position; gameObject.transform.rotation = this.hair_go_ref.transform.rotation; gameObject.transform.localScale = this.hair_go_ref.transform.localScale; gameObject.renderer.material = CharacterMaterials.Materials[this.hair.texture]; int num = UnityEngine.Random.Range(1, 4); if (num == 1) { gameObject.renderer.material.color = FengColor.hairPunk1; } if (num == 2) { gameObject.renderer.material.color = FengColor.hairPunk2; } if (num == 3) { gameObject.renderer.material.color = FengColor.hairPunk3; } this.part_hair = gameObject; this.setFacialTexture(this.eye, 0); if (IN_GAME_MAIN_CAMERA.GameType == GameType.MultiPlayer && BasePV.IsMine) { BasePV.RPC("setHairPRC", PhotonTargets.OthersBuffered, new object[] { this.hairType, 0, this.part_hair.renderer.material.color.r, this.part_hair.renderer.material.color.g, this.part_hair.renderer.material.color.b }); } }
private void setHairVanilla() { UnityEngine.Object.Destroy(this.part_hair); int num = UnityEngine.Random.Range(0, CostumeHair.hairsM.Length); if (num == 3) { num = 9; } this.hairType = num; this.hair = CostumeHair.hairsM[num]; if (this.hair.hair == string.Empty) { this.hair = CostumeHair.hairsM[9]; this.hairType = 9; } this.part_hair = (GameObject)UnityEngine.Object.Instantiate(CacheResources.Load("Character/" + this.hair.hair)); this.part_hair.transform.parent = this.hair_go_ref.transform.parent; this.part_hair.transform.position = this.hair_go_ref.transform.position; this.part_hair.transform.rotation = this.hair_go_ref.transform.rotation; this.part_hair.transform.localScale = this.hair_go_ref.transform.localScale; this.part_hair.renderer.material = CharacterMaterials.Materials[this.hair.texture]; this.part_hair.renderer.material.color = HeroCostume.costume[UnityEngine.Random.Range(0, HeroCostume.costume.Length - 5)].hair_color; int num2 = UnityEngine.Random.Range(1, 8); this.setFacialTexture(this.eye, num2); if (IN_GAME_MAIN_CAMERA.GameType == GameType.MultiPlayer && BasePV.IsMine) { BasePV.RPC("setHairPRC", PhotonTargets.OthersBuffered, new object[] { this.hairType, num2, this.part_hair.renderer.material.color.r, this.part_hair.renderer.material.color.g, this.part_hair.renderer.material.color.b }); } }
private void setHairPRC(int type, int eye_type, float c1, float c2, float c3, PhotonMessageInfo info = null) { if (PhotonNetwork.isMasterClient && !info.sender.isLocal) { // You don’t have to do this part, this just sets the hair back when someone else sends it. object[] parameters = new object[] { this.hairType, eye_type, this.part_hair.renderer.material.color.r, this.part_hair.renderer.material.color.g, this.part_hair.renderer.material.color.b }; base.photonView.RPC("setHairPRC", PhotonTargets.OthersBuffered, parameters); return; } UnityEngine.Object.Destroy(this.part_hair); this.hair = CostumeHair.hairsM[type]; this.hairType = type; if (this.hair.hair != string.Empty) { GameObject obj2 = (GameObject)UnityEngine.Object.Instantiate(CLEARSKIES.CacheResources.Load("Character/" + this.hair.hair)); obj2.transform.parent = this.hair_go_ref.transform.parent; obj2.transform.position = this.hair_go_ref.transform.position; obj2.transform.rotation = this.hair_go_ref.transform.rotation; obj2.transform.localScale = this.hair_go_ref.transform.localScale; obj2.renderer.material = CharacterMaterials.materials[this.hair.texture]; obj2.renderer.material.color = new Color(c1, c2, c3); this.part_hair = obj2; } this.setFacialTexture(this.eye, eye_type); }
public IEnumerator loadskinE(int hair, int eye, string hairlink) { bool iteratorVariable0 = false; UnityEngine.Object.Destroy(this.part_hair); this.hair = CostumeHair.hairsM[hair]; this.hairType = hair; if (this.hair.hair != string.Empty) { GameObject iteratorVariable1 = (GameObject)UnityEngine.Object.Instantiate(Resources.Load("Character/" + this.hair.hair)); iteratorVariable1.transform.parent = this.hair_go_ref.transform.parent; iteratorVariable1.transform.position = this.hair_go_ref.transform.position; iteratorVariable1.transform.rotation = this.hair_go_ref.transform.rotation; iteratorVariable1.transform.localScale = this.hair_go_ref.transform.localScale; iteratorVariable1.renderer.material = CharacterMaterials.materials[this.hair.texture]; bool mipmap = true; if (((int)FengGameManagerMKII.settings[0x3f]) == 1) { mipmap = false; } if ((!hairlink.EndsWith(".jpg") && !hairlink.EndsWith(".png")) && !hairlink.EndsWith(".jpeg")) { if (hairlink.ToLower() == "transparent") { iteratorVariable1.renderer.enabled = false; } } else if (!FengGameManagerMKII.linkHash[0].ContainsKey(hairlink)) { WWW link = new WWW(hairlink); yield return(link); Texture2D iteratorVariable4 = RCextensions.loadimage(link, mipmap, 0x30d40); link.Dispose(); if (FengGameManagerMKII.linkHash[0].ContainsKey(hairlink)) { iteratorVariable1.renderer.material = (Material)FengGameManagerMKII.linkHash[0][hairlink]; } else { iteratorVariable0 = true; iteratorVariable1.renderer.material.mainTexture = iteratorVariable4; FengGameManagerMKII.linkHash[0].Add(hairlink, iteratorVariable1.renderer.material); iteratorVariable1.renderer.material = (Material)FengGameManagerMKII.linkHash[0][hairlink]; } } else { iteratorVariable1.renderer.material = (Material)FengGameManagerMKII.linkHash[0][hairlink]; } this.part_hair = iteratorVariable1; } if (eye >= 0) { this.setFacialTexture(this.eye, eye); } if (iteratorVariable0) { FengGameManagerMKII.instance.unloadAssets(); } }
public IEnumerator loadskinE(int hair, int eye, string hairlink) { var iteratorVariable0 = false; Destroy(part_hair); this.hair = CostumeHair.hairsM[hair]; hairType = hair; if (this.hair.hair != string.Empty) { var iteratorVariable1 = (GameObject)Instantiate(Resources.Load("Character/" + this.hair.hair)); iteratorVariable1.transform.parent = hair_go_ref.transform.parent; iteratorVariable1.transform.position = hair_go_ref.transform.position; iteratorVariable1.transform.rotation = hair_go_ref.transform.rotation; iteratorVariable1.transform.localScale = hair_go_ref.transform.localScale; iteratorVariable1.renderer.material = CharacterMaterials.materials[this.hair.texture]; var mipmap = Settings.MipMappingSetting; if (!hairlink.EndsWith(".jpg") && !hairlink.EndsWith(".png") && !hairlink.EndsWith(".jpeg")) { if (hairlink.ToLower() == "transparent") { iteratorVariable1.renderer.enabled = false; } } else if (FengGameManagerMKII.linkHash[0].ContainsKey(hairlink)) { iteratorVariable1.renderer.material = (Material)FengGameManagerMKII.linkHash[0][hairlink]; } else { var link = new WWW(hairlink); yield return(link); var iteratorVariable4 = RCextensions.loadimage(link, mipmap, 200000); link.Dispose(); if (!FengGameManagerMKII.linkHash[0].ContainsKey(hairlink)) { iteratorVariable0 = true; iteratorVariable1.renderer.material.mainTexture = iteratorVariable4; FengGameManagerMKII.linkHash[0].Add(hairlink, iteratorVariable1.renderer.material); iteratorVariable1.renderer.material = (Material)FengGameManagerMKII.linkHash[0][hairlink]; } else { iteratorVariable1.renderer.material = (Material)FengGameManagerMKII.linkHash[0][hairlink]; } } part_hair = iteratorVariable1; } if (eye >= 0) { setFacialTexture(this.eye, eye); } if (iteratorVariable0) { FengGameManagerMKII.FGM.unloadAssets(); } }
public void setHair2() { int num; object[] objArray2; if ((int)FengGameManagerMKII.settings[1] == 1 && (IN_GAME_MAIN_CAMERA.gametype == GAMETYPE.SINGLE || photonView.isMine)) { Color color; num = Random.Range(0, 9); if (num == 3) { num = 9; } var index = skin - 70; if ((int)FengGameManagerMKII.settings[32] == 1) { index = Random.Range(16, 20); } if ((int)FengGameManagerMKII.settings[index] >= 0) { num = (int)FengGameManagerMKII.settings[index]; } var hairlink = (string)FengGameManagerMKII.settings[index + 5]; var eye = Random.Range(1, 8); if (haseye) { eye = 0; } var flag2 = false; if (hairlink.EndsWith(".jpg") || hairlink.EndsWith(".png") || hairlink.EndsWith(".jpeg")) { flag2 = true; } if (IN_GAME_MAIN_CAMERA.gametype == GAMETYPE.MULTIPLAYER && photonView.isMine) { if (flag2) { objArray2 = new object[] { num, eye, hairlink }; photonView.RPC("setHairRPC2", PhotonTargets.AllBuffered, objArray2); } else { color = HeroCostume.costume[Random.Range(0, HeroCostume.costume.Length - 5)].hair_color; objArray2 = new object[] { num, eye, color.r, color.g, color.b }; photonView.RPC("setHairPRC", PhotonTargets.AllBuffered, objArray2); } } else if (IN_GAME_MAIN_CAMERA.gametype == GAMETYPE.SINGLE) { if (flag2) { StartCoroutine(loadskinE(num, eye, hairlink)); } else { color = HeroCostume.costume[Random.Range(0, HeroCostume.costume.Length - 5)].hair_color; setHairPRC(num, eye, color.r, color.g, color.b); } } } else { num = Random.Range(0, CostumeHair.hairsM.Length); if (num == 3) { num = 9; } Destroy(part_hair); hairType = num; hair = CostumeHair.hairsM[num]; if (hair.hair == string.Empty) { hair = CostumeHair.hairsM[9]; hairType = 9; } part_hair = (GameObject)Instantiate(Resources.Load("Character/" + hair.hair)); part_hair.transform.parent = hair_go_ref.transform.parent; part_hair.transform.position = hair_go_ref.transform.position; part_hair.transform.rotation = hair_go_ref.transform.rotation; part_hair.transform.localScale = hair_go_ref.transform.localScale; part_hair.renderer.material = CharacterMaterials.materials[hair.texture]; part_hair.renderer.material.color = HeroCostume.costume[Random.Range(0, HeroCostume.costume.Length - 5)].hair_color; var id = Random.Range(1, 8); setFacialTexture(eye, id); if (IN_GAME_MAIN_CAMERA.gametype == GAMETYPE.MULTIPLAYER && photonView.isMine) { objArray2 = new object[] { hairType, id, part_hair.renderer.material.color.r, part_hair.renderer.material.color.g, part_hair.renderer.material.color.b }; photonView.RPC("setHairPRC", PhotonTargets.OthersBuffered, objArray2); } } }
public static void init() { hairsM = new CostumeHair[11]; hairsM[0] = new CostumeHair(); hairsM[0].hair = hairsM[0].texture = "hair_boy1"; hairsM[1] = new CostumeHair(); hairsM[1].hair = hairsM[1].texture = "hair_boy2"; hairsM[2] = new CostumeHair(); hairsM[2].hair = hairsM[2].texture = "hair_boy3"; hairsM[3] = new CostumeHair(); hairsM[3].hair = hairsM[3].texture = "hair_boy4"; hairsM[4] = new CostumeHair(); hairsM[4].hair = hairsM[4].texture = "hair_eren"; hairsM[5] = new CostumeHair(); hairsM[5].hair = hairsM[5].texture = "hair_armin"; hairsM[6] = new CostumeHair(); hairsM[6].hair = hairsM[6].texture = "hair_jean"; hairsM[7] = new CostumeHair(); hairsM[7].hair = hairsM[7].texture = "hair_levi"; hairsM[8] = new CostumeHair(); hairsM[8].hair = hairsM[8].texture = "hair_marco"; hairsM[9] = new CostumeHair(); hairsM[9].hair = hairsM[9].texture = "hair_mike"; hairsM[10] = new CostumeHair(); hairsM[10].hair = hairsM[10].texture = string.Empty; for (int i = 0; i <= 10; i++) { hairsM[i].id = i; } hairsF = new CostumeHair[11]; hairsF[0] = new CostumeHair(); hairsF[0].hair = hairsF[0].texture = "hair_girl1"; hairsF[1] = new CostumeHair(); hairsF[1].hair = hairsF[1].texture = "hair_girl2"; hairsF[2] = new CostumeHair(); hairsF[2].hair = hairsF[2].texture = "hair_girl3"; hairsF[3] = new CostumeHair(); hairsF[3].hair = hairsF[3].texture = "hair_girl4"; hairsF[4] = new CostumeHair(); hairsF[4].hair = hairsF[4].texture = "hair_girl5"; hairsF[4].hasCloth = true; hairsF[4].hair_1 = "hair_girl5_cloth"; hairsF[5] = new CostumeHair(); hairsF[5].hair = hairsF[5].texture = "hair_annie"; hairsF[6] = new CostumeHair(); hairsF[6].hair = hairsF[6].texture = "hair_hanji"; hairsF[6].hasCloth = true; hairsF[6].hair_1 = "hair_hanji_cloth"; hairsF[7] = new CostumeHair(); hairsF[7].hair = hairsF[7].texture = "hair_mikasa"; hairsF[8] = new CostumeHair(); hairsF[8].hair = hairsF[8].texture = "hair_petra"; hairsF[9] = new CostumeHair(); hairsF[9].hair = hairsF[9].texture = "hair_rico"; hairsF[10] = new CostumeHair(); hairsF[10].hair = hairsF[10].texture = "hair_sasha"; hairsF[10].hasCloth = true; hairsF[10].hair_1 = "hair_sasha_cloth"; for (int j = 0; j <= 10; j++) { hairsF[j].id = j; } }
public static void Init() { if (!Initialized) { Initialized = true; CostumeHair.Init(); body_uniform_ma_texture = new string[3] { "aottg_hero_uniform_ma_1", "aottg_hero_uniform_ma_2", "aottg_hero_uniform_ma_3" }; body_uniform_fa_texture = new string[3] { "aottg_hero_uniform_fa_1", "aottg_hero_uniform_fa_2", "aottg_hero_uniform_fa_3" }; body_uniform_mb_texture = new string[4] { "aottg_hero_uniform_mb_1", "aottg_hero_uniform_mb_2", "aottg_hero_uniform_mb_3", "aottg_hero_uniform_mb_4" }; body_uniform_fb_texture = new string[2] { "aottg_hero_uniform_fb_1", "aottg_hero_uniform_fb_2" }; body_casual_ma_texture = new string[3] { "aottg_hero_casual_ma_1", "aottg_hero_casual_ma_2", "aottg_hero_casual_ma_3" }; body_casual_fa_texture = new string[3] { "aottg_hero_casual_fa_1", "aottg_hero_casual_fa_2", "aottg_hero_casual_fa_3" }; body_casual_mb_texture = new string[4] { "aottg_hero_casual_mb_1", "aottg_hero_casual_mb_2", "aottg_hero_casual_mb_3", "aottg_hero_casual_mb_4" }; body_casual_fb_texture = new string[2] { "aottg_hero_casual_fb_1", "aottg_hero_casual_fb_2" }; Costumes = new HeroCostume[39]; Costumes[0] = new HeroCostume(); Costumes[0].name = "annie"; Costumes[0].sex = Sex.Female; Costumes[0].uniform_type = UNIFORM_TYPE.UniformB; Costumes[0].part_chest_object_mesh = "character_cap_uniform"; Costumes[0].part_chest_object_texture = "aottg_hero_annie_cap_uniform"; Costumes[0].cape = true; Costumes[0].body_texture = body_uniform_fb_texture[0]; Costumes[0].hairInfo = CostumeHair.FemaleHairs[5]; Costumes[0].eye_texture_id = 0; Costumes[0].beard_texture_id = 33; Costumes[0].glass_texture_id = -1; Costumes[0].skin_color = 1; Costumes[0].hair_color = new Color(1f, 0.9f, 0.5f); Costumes[0].division = Division.TheMilitaryPolice; Costumes[0].costumeId = 0; Costumes[1] = new HeroCostume(); Costumes[1].name = "annie"; Costumes[1].sex = Sex.Female; Costumes[1].uniform_type = UNIFORM_TYPE.UniformB; Costumes[1].part_chest_object_mesh = "character_cap_uniform"; Costumes[1].part_chest_object_texture = "aottg_hero_annie_cap_uniform"; Costumes[1].body_texture = body_uniform_fb_texture[0]; Costumes[1].cape = false; Costumes[1].hairInfo = CostumeHair.FemaleHairs[5]; Costumes[1].eye_texture_id = 0; Costumes[1].beard_texture_id = 33; Costumes[1].glass_texture_id = -1; Costumes[1].skin_color = 1; Costumes[1].hair_color = new Color(1f, 0.9f, 0.5f); Costumes[1].division = Division.TraineesSquad; Costumes[1].costumeId = 0; Costumes[2] = new HeroCostume(); Costumes[2].name = "annie"; Costumes[2].sex = Sex.Female; Costumes[2].uniform_type = UNIFORM_TYPE.CasualB; Costumes[2].part_chest_object_mesh = "character_cap_casual"; Costumes[2].part_chest_object_texture = "aottg_hero_annie_cap_causal"; Costumes[2].part_chest_1_object_mesh = "character_body_blade_keeper_f"; Costumes[2].part_chest_1_object_texture = body_casual_fb_texture[0]; Costumes[2].body_texture = body_casual_fb_texture[0]; Costumes[2].cape = false; Costumes[2].hairInfo = CostumeHair.FemaleHairs[5]; Costumes[2].eye_texture_id = 0; Costumes[2].beard_texture_id = 33; Costumes[2].glass_texture_id = -1; Costumes[2].skin_color = 1; Costumes[2].hair_color = new Color(1f, 0.9f, 0.5f); Costumes[2].costumeId = 1; Costumes[3] = new HeroCostume(); Costumes[3].name = "mikasa"; Costumes[3].sex = Sex.Female; Costumes[3].uniform_type = UNIFORM_TYPE.UniformB; Costumes[3].body_texture = body_uniform_fb_texture[1]; Costumes[3].cape = true; Costumes[3].hairInfo = CostumeHair.FemaleHairs[7]; Costumes[3].eye_texture_id = 2; Costumes[3].beard_texture_id = 33; Costumes[3].glass_texture_id = -1; Costumes[3].skin_color = 1; Costumes[3].hair_color = new Color(0.15f, 0.15f, 0.145f); Costumes[3].division = Division.TheSurveryCorps; Costumes[3].costumeId = 2; Costumes[4] = new HeroCostume(); Costumes[4].name = "mikasa"; Costumes[4].sex = Sex.Female; Costumes[4].uniform_type = UNIFORM_TYPE.UniformB; Costumes[4].part_chest_skinned_cloth_mesh = "mikasa_asset_uni"; Costumes[4].part_chest_skinned_cloth_texture = body_uniform_fb_texture[1]; Costumes[4].body_texture = body_uniform_fb_texture[1]; Costumes[4].cape = false; Costumes[4].hairInfo = CostumeHair.FemaleHairs[7]; Costumes[4].eye_texture_id = 2; Costumes[4].beard_texture_id = 33; Costumes[4].glass_texture_id = -1; Costumes[4].skin_color = 1; Costumes[4].hair_color = new Color(0.15f, 0.15f, 0.145f); Costumes[4].division = Division.TraineesSquad; Costumes[4].costumeId = 3; Costumes[5] = new HeroCostume(); Costumes[5].name = "mikasa"; Costumes[5].sex = Sex.Female; Costumes[5].uniform_type = UNIFORM_TYPE.CasualB; Costumes[5].part_chest_skinned_cloth_mesh = "mikasa_asset_cas"; Costumes[5].part_chest_skinned_cloth_texture = body_casual_fb_texture[1]; Costumes[5].part_chest_1_object_mesh = "character_body_blade_keeper_f"; Costumes[5].part_chest_1_object_texture = body_casual_fb_texture[1]; Costumes[5].body_texture = body_casual_fb_texture[1]; Costumes[5].cape = false; Costumes[5].hairInfo = CostumeHair.FemaleHairs[7]; Costumes[5].eye_texture_id = 2; Costumes[5].beard_texture_id = 33; Costumes[5].glass_texture_id = -1; Costumes[5].skin_color = 1; Costumes[5].hair_color = new Color(0.15f, 0.15f, 0.145f); Costumes[5].costumeId = 4; Costumes[6] = new HeroCostume(); Costumes[6].name = "levi"; Costumes[6].sex = Sex.Male; Costumes[6].uniform_type = UNIFORM_TYPE.UniformB; Costumes[6].body_texture = body_uniform_mb_texture[1]; Costumes[6].cape = true; Costumes[6].hairInfo = CostumeHair.MaleHairs[7]; Costumes[6].eye_texture_id = 1; Costumes[6].beard_texture_id = -1; Costumes[6].glass_texture_id = -1; Costumes[6].skin_color = 1; Costumes[6].hair_color = new Color(0.295f, 0.295f, 0.275f); Costumes[6].division = Division.TheSurveryCorps; Costumes[6].costumeId = 11; Costumes[7] = new HeroCostume(); Costumes[7].name = "levi"; Costumes[7].sex = Sex.Male; Costumes[7].uniform_type = UNIFORM_TYPE.CasualB; Costumes[7].body_texture = body_casual_mb_texture[1]; Costumes[7].part_chest_1_object_mesh = "character_body_blade_keeper_m"; Costumes[7].part_chest_1_object_texture = body_casual_mb_texture[1]; Costumes[7].cape = false; Costumes[7].hairInfo = CostumeHair.MaleHairs[7]; Costumes[7].eye_texture_id = 1; Costumes[7].beard_texture_id = -1; Costumes[7].glass_texture_id = -1; Costumes[7].skin_color = 1; Costumes[7].hair_color = new Color(0.295f, 0.295f, 0.275f); Costumes[7].costumeId = 12; Costumes[8] = new HeroCostume(); Costumes[8].name = "eren"; Costumes[8].sex = Sex.Male; Costumes[8].uniform_type = UNIFORM_TYPE.UniformB; Costumes[8].body_texture = body_uniform_mb_texture[0]; Costumes[8].cape = true; Costumes[8].hairInfo = CostumeHair.MaleHairs[4]; Costumes[8].eye_texture_id = 3; Costumes[8].beard_texture_id = -1; Costumes[8].glass_texture_id = -1; Costumes[8].skin_color = 1; Costumes[8].hair_color = new Color(0.295f, 0.295f, 0.275f); Costumes[8].division = Division.TheSurveryCorps; Costumes[8].costumeId = 13; Costumes[9] = new HeroCostume(); Costumes[9].name = "eren"; Costumes[9].sex = Sex.Male; Costumes[9].uniform_type = UNIFORM_TYPE.UniformB; Costumes[9].body_texture = body_uniform_mb_texture[0]; Costumes[9].cape = false; Costumes[9].hairInfo = CostumeHair.MaleHairs[4]; Costumes[9].eye_texture_id = 3; Costumes[9].beard_texture_id = -1; Costumes[9].glass_texture_id = -1; Costumes[9].skin_color = 1; Costumes[9].hair_color = new Color(0.295f, 0.295f, 0.275f); Costumes[9].division = Division.TraineesSquad; Costumes[9].costumeId = 13; Costumes[10] = new HeroCostume(); Costumes[10].name = "eren"; Costumes[10].sex = Sex.Male; Costumes[10].uniform_type = UNIFORM_TYPE.CasualB; Costumes[10].body_texture = body_casual_mb_texture[0]; Costumes[10].part_chest_1_object_mesh = "character_body_blade_keeper_m"; Costumes[10].part_chest_1_object_texture = body_casual_mb_texture[0]; Costumes[10].cape = false; Costumes[10].hairInfo = CostumeHair.MaleHairs[4]; Costumes[10].eye_texture_id = 3; Costumes[10].beard_texture_id = -1; Costumes[10].glass_texture_id = -1; Costumes[10].skin_color = 1; Costumes[10].hair_color = new Color(0.295f, 0.295f, 0.275f); Costumes[10].costumeId = 14; Costumes[11] = new HeroCostume(); Costumes[11].name = "sasha"; Costumes[11].sex = Sex.Female; Costumes[11].uniform_type = UNIFORM_TYPE.UniformA; Costumes[11].body_texture = body_uniform_fa_texture[1]; Costumes[11].cape = true; Costumes[11].hairInfo = CostumeHair.FemaleHairs[10]; Costumes[11].eye_texture_id = 4; Costumes[11].beard_texture_id = 33; Costumes[11].glass_texture_id = -1; Costumes[11].skin_color = 1; Costumes[11].hair_color = new Color(0.45f, 0.33f, 0.255f); Costumes[11].division = Division.TheSurveryCorps; Costumes[11].costumeId = 5; Costumes[12] = new HeroCostume(); Costumes[12].name = "sasha"; Costumes[12].sex = Sex.Female; Costumes[12].uniform_type = UNIFORM_TYPE.UniformA; Costumes[12].body_texture = body_uniform_fa_texture[1]; Costumes[12].cape = false; Costumes[12].hairInfo = CostumeHair.FemaleHairs[10]; Costumes[12].eye_texture_id = 4; Costumes[12].beard_texture_id = 33; Costumes[12].glass_texture_id = -1; Costumes[12].skin_color = 1; Costumes[12].hair_color = new Color(0.45f, 0.33f, 0.255f); Costumes[12].division = Division.TraineesSquad; Costumes[12].costumeId = 5; Costumes[13] = new HeroCostume(); Costumes[13].name = "sasha"; Costumes[13].sex = Sex.Female; Costumes[13].uniform_type = UNIFORM_TYPE.CasualA; Costumes[13].body_texture = body_casual_fa_texture[1]; Costumes[13].part_chest_1_object_mesh = "character_body_blade_keeper_f"; Costumes[13].part_chest_1_object_texture = body_casual_fa_texture[1]; Costumes[13].cape = false; Costumes[13].hairInfo = CostumeHair.FemaleHairs[10]; Costumes[13].eye_texture_id = 4; Costumes[13].beard_texture_id = 33; Costumes[13].glass_texture_id = -1; Costumes[13].skin_color = 1; Costumes[13].hair_color = new Color(0.45f, 0.33f, 0.255f); Costumes[13].costumeId = 6; Costumes[14] = new HeroCostume(); Costumes[14].name = "hanji"; Costumes[14].sex = Sex.Female; Costumes[14].uniform_type = UNIFORM_TYPE.UniformA; Costumes[14].body_texture = body_uniform_fa_texture[2]; Costumes[14].cape = true; Costumes[14].hairInfo = CostumeHair.FemaleHairs[6]; Costumes[14].eye_texture_id = 5; Costumes[14].beard_texture_id = 33; Costumes[14].glass_texture_id = 49; Costumes[14].skin_color = 1; Costumes[14].hair_color = new Color(0.45f, 0.33f, 0.255f); Costumes[14].division = Division.TheSurveryCorps; Costumes[14].costumeId = 7; Costumes[15] = new HeroCostume(); Costumes[15].name = "hanji"; Costumes[15].sex = Sex.Female; Costumes[15].uniform_type = UNIFORM_TYPE.CasualA; Costumes[15].body_texture = body_casual_fa_texture[2]; Costumes[15].part_chest_1_object_mesh = "character_body_blade_keeper_f"; Costumes[15].part_chest_1_object_texture = body_casual_fa_texture[2]; Costumes[15].cape = false; Costumes[15].hairInfo = CostumeHair.FemaleHairs[6]; Costumes[15].eye_texture_id = 5; Costumes[15].beard_texture_id = 33; Costumes[15].glass_texture_id = 49; Costumes[15].skin_color = 1; Costumes[15].hair_color = new Color(0.295f, 0.23f, 0.17f); Costumes[15].costumeId = 8; Costumes[16] = new HeroCostume(); Costumes[16].name = "rico"; Costumes[16].sex = Sex.Female; Costumes[16].uniform_type = UNIFORM_TYPE.UniformA; Costumes[16].body_texture = body_uniform_fa_texture[0]; Costumes[16].cape = true; Costumes[16].hairInfo = CostumeHair.FemaleHairs[9]; Costumes[16].eye_texture_id = 6; Costumes[16].beard_texture_id = 33; Costumes[16].glass_texture_id = 48; Costumes[16].skin_color = 1; Costumes[16].hair_color = new Color(1f, 1f, 1f); Costumes[16].division = Division.TheGarrison; Costumes[16].costumeId = 9; Costumes[17] = new HeroCostume(); Costumes[17].name = "rico"; Costumes[17].sex = Sex.Female; Costumes[17].uniform_type = UNIFORM_TYPE.CasualA; Costumes[17].body_texture = body_casual_fa_texture[0]; Costumes[17].part_chest_1_object_mesh = "character_body_blade_keeper_f"; Costumes[17].part_chest_1_object_texture = body_casual_fa_texture[0]; Costumes[17].cape = false; Costumes[17].hairInfo = CostumeHair.FemaleHairs[9]; Costumes[17].eye_texture_id = 6; Costumes[17].beard_texture_id = 33; Costumes[17].glass_texture_id = 48; Costumes[17].skin_color = 1; Costumes[17].hair_color = new Color(1f, 1f, 1f); Costumes[17].costumeId = 10; Costumes[18] = new HeroCostume(); Costumes[18].name = "jean"; Costumes[18].sex = Sex.Male; Costumes[18].uniform_type = UNIFORM_TYPE.UniformA; Costumes[18].body_texture = body_uniform_ma_texture[1]; Costumes[18].cape = true; Costumes[18].hairInfo = CostumeHair.MaleHairs[6]; Costumes[18].eye_texture_id = 7; Costumes[18].beard_texture_id = -1; Costumes[18].glass_texture_id = -1; Costumes[18].skin_color = 1; Costumes[18].hair_color = new Color(0.94f, 0.84f, 0.6f); Costumes[18].division = Division.TheSurveryCorps; Costumes[18].costumeId = 15; Costumes[19] = new HeroCostume(); Costumes[19].name = "jean"; Costumes[19].sex = Sex.Male; Costumes[19].uniform_type = UNIFORM_TYPE.UniformA; Costumes[19].body_texture = body_uniform_ma_texture[1]; Costumes[19].cape = false; Costumes[19].hairInfo = CostumeHair.MaleHairs[6]; Costumes[19].eye_texture_id = 7; Costumes[19].beard_texture_id = -1; Costumes[19].glass_texture_id = -1; Costumes[19].skin_color = 1; Costumes[19].hair_color = new Color(0.94f, 0.84f, 0.6f); Costumes[19].division = Division.TraineesSquad; Costumes[19].costumeId = 15; Costumes[20] = new HeroCostume(); Costumes[20].name = "jean"; Costumes[20].sex = Sex.Male; Costumes[20].uniform_type = UNIFORM_TYPE.CasualA; Costumes[20].body_texture = body_casual_ma_texture[1]; Costumes[20].part_chest_1_object_mesh = "character_body_blade_keeper_m"; Costumes[20].part_chest_1_object_texture = body_casual_ma_texture[1]; Costumes[20].cape = false; Costumes[20].hairInfo = CostumeHair.MaleHairs[6]; Costumes[20].eye_texture_id = 7; Costumes[20].beard_texture_id = -1; Costumes[20].glass_texture_id = -1; Costumes[20].skin_color = 1; Costumes[20].hair_color = new Color(0.94f, 0.84f, 0.6f); Costumes[20].costumeId = 16; Costumes[21] = new HeroCostume(); Costumes[21].name = "marco"; Costumes[21].sex = Sex.Male; Costumes[21].uniform_type = UNIFORM_TYPE.UniformA; Costumes[21].body_texture = body_uniform_ma_texture[2]; Costumes[21].cape = false; Costumes[21].hairInfo = CostumeHair.MaleHairs[8]; Costumes[21].eye_texture_id = 8; Costumes[21].beard_texture_id = -1; Costumes[21].glass_texture_id = -1; Costumes[21].skin_color = 1; Costumes[21].hair_color = new Color(0.295f, 0.295f, 0.275f); Costumes[21].division = Division.TraineesSquad; Costumes[21].costumeId = 17; Costumes[22] = new HeroCostume(); Costumes[22].name = "marco"; Costumes[22].sex = Sex.Male; Costumes[22].uniform_type = UNIFORM_TYPE.CasualA; Costumes[22].body_texture = body_casual_ma_texture[2]; Costumes[22].cape = false; Costumes[22].hairInfo = CostumeHair.MaleHairs[8]; Costumes[22].eye_texture_id = 8; Costumes[22].beard_texture_id = -1; Costumes[22].glass_texture_id = -1; Costumes[22].skin_color = 1; Costumes[22].hair_color = new Color(0.295f, 0.295f, 0.275f); Costumes[22].costumeId = 18; Costumes[23] = new HeroCostume(); Costumes[23].name = "mike"; Costumes[23].sex = Sex.Male; Costumes[23].uniform_type = UNIFORM_TYPE.UniformB; Costumes[23].body_texture = body_uniform_mb_texture[3]; Costumes[23].cape = true; Costumes[23].hairInfo = CostumeHair.MaleHairs[9]; Costumes[23].eye_texture_id = 9; Costumes[23].beard_texture_id = 32; Costumes[23].glass_texture_id = -1; Costumes[23].skin_color = 1; Costumes[23].hair_color = new Color(0.94f, 0.84f, 0.6f); Costumes[23].division = Division.TheSurveryCorps; Costumes[23].costumeId = 19; Costumes[24] = new HeroCostume(); Costumes[24].name = "mike"; Costumes[24].sex = Sex.Male; Costumes[24].uniform_type = UNIFORM_TYPE.CasualB; Costumes[24].body_texture = body_casual_mb_texture[3]; Costumes[24].part_chest_1_object_mesh = "character_body_blade_keeper_m"; Costumes[24].part_chest_1_object_texture = body_casual_mb_texture[3]; Costumes[24].cape = false; Costumes[24].hairInfo = CostumeHair.MaleHairs[9]; Costumes[24].eye_texture_id = 9; Costumes[24].beard_texture_id = 32; Costumes[24].glass_texture_id = -1; Costumes[24].skin_color = 1; Costumes[24].hair_color = new Color(0.94f, 0.84f, 0.6f); Costumes[24].division = Division.TheSurveryCorps; Costumes[24].costumeId = 20; Costumes[25] = new HeroCostume(); Costumes[25].name = "connie"; Costumes[25].sex = Sex.Male; Costumes[25].uniform_type = UNIFORM_TYPE.UniformB; Costumes[25].body_texture = body_uniform_mb_texture[2]; Costumes[25].cape = true; Costumes[25].hairInfo = CostumeHair.MaleHairs[10]; Costumes[25].eye_texture_id = 10; Costumes[25].beard_texture_id = -1; Costumes[25].glass_texture_id = -1; Costumes[25].skin_color = 1; Costumes[25].division = Division.TheSurveryCorps; Costumes[25].costumeId = 21; Costumes[26] = new HeroCostume(); Costumes[26].name = "connie"; Costumes[26].sex = Sex.Male; Costumes[26].uniform_type = UNIFORM_TYPE.UniformB; Costumes[26].body_texture = body_uniform_mb_texture[2]; Costumes[26].cape = false; Costumes[26].hairInfo = CostumeHair.MaleHairs[10]; Costumes[26].eye_texture_id = 10; Costumes[26].beard_texture_id = -1; Costumes[26].glass_texture_id = -1; Costumes[26].skin_color = 1; Costumes[26].division = Division.TraineesSquad; Costumes[26].costumeId = 21; Costumes[27] = new HeroCostume(); Costumes[27].name = "connie"; Costumes[27].sex = Sex.Male; Costumes[27].uniform_type = UNIFORM_TYPE.CasualB; Costumes[27].body_texture = body_casual_mb_texture[2]; Costumes[27].part_chest_1_object_mesh = "character_body_blade_keeper_m"; Costumes[27].part_chest_1_object_texture = body_casual_mb_texture[2]; Costumes[27].cape = false; Costumes[27].hairInfo = CostumeHair.MaleHairs[10]; Costumes[27].eye_texture_id = 10; Costumes[27].beard_texture_id = -1; Costumes[27].glass_texture_id = -1; Costumes[27].skin_color = 1; Costumes[27].costumeId = 22; Costumes[28] = new HeroCostume(); Costumes[28].name = "armin"; Costumes[28].sex = Sex.Male; Costumes[28].uniform_type = UNIFORM_TYPE.UniformA; Costumes[28].body_texture = body_uniform_ma_texture[0]; Costumes[28].cape = true; Costumes[28].hairInfo = CostumeHair.MaleHairs[5]; Costumes[28].eye_texture_id = 11; Costumes[28].beard_texture_id = -1; Costumes[28].glass_texture_id = -1; Costumes[28].skin_color = 1; Costumes[28].hair_color = new Color(0.95f, 0.8f, 0.5f); Costumes[28].division = Division.TheSurveryCorps; Costumes[28].costumeId = 23; Costumes[29] = new HeroCostume(); Costumes[29].name = "armin"; Costumes[29].sex = Sex.Male; Costumes[29].uniform_type = UNIFORM_TYPE.UniformA; Costumes[29].body_texture = body_uniform_ma_texture[0]; Costumes[29].cape = false; Costumes[29].hairInfo = CostumeHair.MaleHairs[5]; Costumes[29].eye_texture_id = 11; Costumes[29].beard_texture_id = -1; Costumes[29].glass_texture_id = -1; Costumes[29].skin_color = 1; Costumes[29].hair_color = new Color(0.95f, 0.8f, 0.5f); Costumes[29].division = Division.TraineesSquad; Costumes[29].costumeId = 23; Costumes[30] = new HeroCostume(); Costumes[30].name = "armin"; Costumes[30].sex = Sex.Male; Costumes[30].uniform_type = UNIFORM_TYPE.CasualA; Costumes[30].body_texture = body_casual_ma_texture[0]; Costumes[30].part_chest_1_object_mesh = "character_body_blade_keeper_m"; Costumes[30].part_chest_1_object_texture = body_casual_ma_texture[0]; Costumes[30].cape = false; Costumes[30].hairInfo = CostumeHair.MaleHairs[5]; Costumes[30].eye_texture_id = 11; Costumes[30].beard_texture_id = -1; Costumes[30].glass_texture_id = -1; Costumes[30].skin_color = 1; Costumes[30].hair_color = new Color(0.95f, 0.8f, 0.5f); Costumes[30].costumeId = 24; Costumes[31] = new HeroCostume(); Costumes[31].name = "petra"; Costumes[31].sex = Sex.Female; Costumes[31].uniform_type = UNIFORM_TYPE.UniformA; Costumes[31].body_texture = body_uniform_fa_texture[0]; Costumes[31].cape = true; Costumes[31].hairInfo = CostumeHair.FemaleHairs[8]; Costumes[31].eye_texture_id = 27; Costumes[31].beard_texture_id = -1; Costumes[31].glass_texture_id = -1; Costumes[31].skin_color = 1; Costumes[31].hair_color = new Color(1f, 0.725f, 0.376f); Costumes[31].division = Division.TheSurveryCorps; Costumes[31].costumeId = 9; Costumes[32] = new HeroCostume(); Costumes[32].name = "petra"; Costumes[32].sex = Sex.Female; Costumes[32].uniform_type = UNIFORM_TYPE.CasualA; Costumes[32].body_texture = body_casual_fa_texture[0]; Costumes[32].part_chest_1_object_mesh = "character_body_blade_keeper_f"; Costumes[32].part_chest_1_object_texture = body_casual_fa_texture[0]; Costumes[32].cape = false; Costumes[32].hairInfo = CostumeHair.FemaleHairs[8]; Costumes[32].eye_texture_id = 27; Costumes[32].beard_texture_id = -1; Costumes[32].glass_texture_id = -1; Costumes[32].skin_color = 1; Costumes[32].hair_color = new Color(1f, 0.725f, 0.376f); Costumes[32].division = Division.TheSurveryCorps; Costumes[32].costumeId = 10; Costumes[33] = new HeroCostume(); Costumes[33].name = "custom"; Costumes[33].sex = Sex.Female; Costumes[33].uniform_type = UNIFORM_TYPE.CasualB; Costumes[33].part_chest_skinned_cloth_mesh = "mikasa_asset_cas"; Costumes[33].part_chest_skinned_cloth_texture = body_casual_fb_texture[1]; Costumes[33].part_chest_1_object_mesh = "character_body_blade_keeper_f"; Costumes[33].part_chest_1_object_texture = body_casual_fb_texture[1]; Costumes[33].body_texture = body_casual_fb_texture[1]; Costumes[33].cape = false; Costumes[33].hairInfo = CostumeHair.FemaleHairs[2]; Costumes[33].eye_texture_id = 12; Costumes[33].beard_texture_id = 33; Costumes[33].glass_texture_id = -1; Costumes[33].skin_color = 1; Costumes[33].hair_color = new Color(0.15f, 0.15f, 0.145f); Costumes[33].costumeId = 4; Costumes[34] = new HeroCostume(); Costumes[34].name = "custom"; Costumes[34].sex = Sex.Male; Costumes[34].uniform_type = UNIFORM_TYPE.CasualA; Costumes[34].body_texture = body_casual_ma_texture[0]; Costumes[34].part_chest_1_object_mesh = "character_body_blade_keeper_m"; Costumes[34].part_chest_1_object_texture = body_casual_ma_texture[0]; Costumes[34].cape = false; Costumes[34].hairInfo = CostumeHair.MaleHairs[3]; Costumes[34].eye_texture_id = 26; Costumes[34].beard_texture_id = 44; Costumes[34].glass_texture_id = -1; Costumes[34].skin_color = 1; Costumes[34].hair_color = new Color(0.41f, 1f, 0f); Costumes[34].costumeId = 24; Costumes[35] = new HeroCostume(); Costumes[35].name = "custom"; Costumes[35].sex = Sex.Female; Costumes[35].uniform_type = UNIFORM_TYPE.UniformA; Costumes[35].body_texture = body_uniform_fa_texture[1]; Costumes[35].cape = false; Costumes[35].hairInfo = CostumeHair.FemaleHairs[4]; Costumes[35].eye_texture_id = 22; Costumes[35].beard_texture_id = 33; Costumes[35].glass_texture_id = 56; Costumes[35].skin_color = 1; Costumes[35].hair_color = new Color(0f, 1f, 0.874f); Costumes[35].costumeId = 5; Costumes[36] = new HeroCostume(); Costumes[36].name = "feng"; Costumes[36].sex = Sex.Male; Costumes[36].uniform_type = UNIFORM_TYPE.CasualB; Costumes[36].body_texture = body_casual_mb_texture[3]; Costumes[36].part_chest_1_object_mesh = "character_body_blade_keeper_m"; Costumes[36].part_chest_1_object_texture = body_casual_mb_texture[3]; Costumes[36].cape = true; Costumes[36].hairInfo = CostumeHair.MaleHairs[10]; Costumes[36].eye_texture_id = 25; Costumes[36].beard_texture_id = 39; Costumes[36].glass_texture_id = 53; Costumes[36].skin_color = 1; Costumes[36].division = Division.TheSurveryCorps; Costumes[36].costumeId = 20; Costumes[37] = new HeroCostume(); Costumes[37].name = "AHSS"; Costumes[37].sex = Sex.Male; Costumes[37].uniform_type = UNIFORM_TYPE.CasualAHSS; Costumes[37].body_texture = body_casual_ma_texture[0] + "_ahss"; Costumes[37].cape = false; Costumes[37].hairInfo = CostumeHair.MaleHairs[6]; Costumes[37].eye_texture_id = 25; Costumes[37].beard_texture_id = 39; Costumes[37].glass_texture_id = 53; Costumes[37].skin_color = 3; Costumes[37].division = Division.TheMilitaryPolice; Costumes[37].costumeId = 25; Costumes[38] = new HeroCostume(); Costumes[38].name = "AHSS (F)"; Costumes[38].sex = Sex.Female; Costumes[38].uniform_type = UNIFORM_TYPE.CasualAHSS; Costumes[38].body_texture = body_casual_ma_texture[0] + "_ahss"; Costumes[38].cape = false; Costumes[38].hairInfo = CostumeHair.FemaleHairs[6]; Costumes[38].eye_texture_id = 2; Costumes[38].beard_texture_id = 33; Costumes[38].glass_texture_id = -1; Costumes[38].skin_color = 3; Costumes[38].division = Division.TheMilitaryPolice; Costumes[38].costumeId = 25; for (int i = 0; i < Costumes.Length; i++) { Costumes[i].stat = HeroStat.GetInfo("CUSTOM_DEFAULT"); Costumes[i].id = i; Costumes[i].SetMesh(); Costumes[i].setTexture(); } CostumeOptions = new HeroCostume[27] { Costumes[0], Costumes[2], Costumes[3], Costumes[4], Costumes[5], Costumes[11], Costumes[13], Costumes[14], Costumes[15], Costumes[16], Costumes[17], Costumes[6], Costumes[7], Costumes[8], Costumes[10], Costumes[18], Costumes[19], Costumes[21], Costumes[22], Costumes[23], Costumes[24], Costumes[25], Costumes[27], Costumes[28], Costumes[30], Costumes[37], Costumes[38] }; } }
public void SetPunkHair2() { if ((int)FengGameManagerMKII.Settings[1] == 1 && (IN_GAME_MAIN_CAMERA.Gametype == GameType.Singleplayer || base.photonView.isMine)) { int hairIndex = Random.Range(0, 9); if (hairIndex == 3) { hairIndex = 9; } int num2 = skin - 70; if ((int)FengGameManagerMKII.Settings[32] == 1) { num2 = Random.Range(16, 20); } if ((int)FengGameManagerMKII.Settings[num2] >= 0) { hairIndex = (int)FengGameManagerMKII.Settings[num2]; } string text = (string)FengGameManagerMKII.Settings[num2 + 5]; int eyeIndex = Random.Range(1, 8); if (haseye) { eyeIndex = 0; } bool isSkinned = false; if (text.EndsWith(".jpg") || text.EndsWith(".png") || text.EndsWith(".jpeg")) { isSkinned = true; } if (IN_GAME_MAIN_CAMERA.Gametype == GameType.Multiplayer && base.photonView.isMine) { if (isSkinned) { base.photonView.RPC("setHairRPC2", PhotonTargets.AllBuffered, hairIndex, eyeIndex, text); } else { Color hair_color = HeroCostume.Costumes[Random.Range(0, HeroCostume.Costumes.Length - 5)].hair_color; base.photonView.RPC("setHairPRC", PhotonTargets.AllBuffered, hairIndex, eyeIndex, hair_color.r, hair_color.g, hair_color.b); } } else if (IN_GAME_MAIN_CAMERA.Gametype == GameType.Singleplayer) { if (isSkinned) { StartCoroutine(CoLoadSkin(hairIndex, eyeIndex, text)); return; } Color hair_color = HeroCostume.Costumes[Random.Range(0, HeroCostume.Costumes.Length - 5)].hair_color; setHairPRC(hairIndex, eyeIndex, hair_color.r, hair_color.g, hair_color.b); } } else { Object.Destroy(part_hair); hair = CostumeHair.MaleHairs[3]; hairType = 3; GameObject gameObject = (GameObject)Object.Instantiate(Resources.Load("Character/" + hair.hair)); gameObject.transform.parent = hair_go_ref.transform.parent; gameObject.transform.position = hair_go_ref.transform.position; gameObject.transform.rotation = hair_go_ref.transform.rotation; gameObject.transform.localScale = hair_go_ref.transform.localScale; gameObject.renderer.material = CharacterMaterials.materials[hair.texture]; int hairColorIndex = Random.Range(1, 4); switch (hairColorIndex) { case 1: gameObject.renderer.material.color = FengColor.PunkHair1; break; case 2: gameObject.renderer.material.color = FengColor.PunkHair2; break; case 3: gameObject.renderer.material.color = FengColor.PunkHair3; break; } part_hair = gameObject; SetEyeTexture(eye, 0); if (IN_GAME_MAIN_CAMERA.Gametype == GameType.Multiplayer && base.photonView.isMine) { Color color = part_hair.renderer.material.color; base.photonView.RPC("setHairPRC", PhotonTargets.OthersBuffered, hairType, 0, color.r, color.g, color.b); } } }
public IEnumerator CoLoadSkin(int hairIndex, int eyeIndex, string hairLink) { bool unload = false; Object.Destroy(part_hair); this.hair = CostumeHair.MaleHairs[hairIndex]; hairType = hairIndex; if (this.hair.hair.Length > 0) { GameObject obj2 = (GameObject)Object.Instantiate(Resources.Load("Character/" + this.hair.hair)); obj2.transform.parent = hair_go_ref.transform.parent; obj2.transform.position = hair_go_ref.transform.position; obj2.transform.rotation = hair_go_ref.transform.rotation; obj2.transform.localScale = hair_go_ref.transform.localScale; obj2.renderer.material = CharacterMaterials.materials[this.hair.texture]; bool flag = true; if ((int)FengGameManagerMKII.Settings[63] == 1) { flag = false; } if (hairLink.EndsWith(".jpg") || hairLink.EndsWith(".png") || hairLink.EndsWith(".jpeg")) { if (!FengGameManagerMKII.LinkHash[0].ContainsKey(hairLink)) { WWW link = Guardian.AntiAbuse.Validators.SkinChecker.CreateWWW(hairLink); if (link != null) { yield return(link); // Old limit: 200KB Texture2D tex = RCextensions.LoadImage(link, flag, 300000); link.Dispose(); if (!FengGameManagerMKII.LinkHash[0].ContainsKey(hairLink)) { unload = true; obj2.renderer.material.mainTexture = tex; FengGameManagerMKII.LinkHash[0].Add(hairLink, obj2.renderer.material); } obj2.renderer.material = (Material)FengGameManagerMKII.LinkHash[0][hairLink]; } } else { obj2.renderer.material = (Material)FengGameManagerMKII.LinkHash[0][hairLink]; } } else if (hairLink.ToLower() == "transparent") { obj2.renderer.enabled = false; } part_hair = obj2; } if (eyeIndex >= 0) { SetEyeTexture(this.eye, eyeIndex); } if (unload) { FengGameManagerMKII.Instance.UnloadAssets(); } }
public void setHair2() { if ((int)FengGameManagerMKII.Settings[1] == 1 && (IN_GAME_MAIN_CAMERA.Gametype == GameType.Singleplayer || base.photonView.isMine)) { int num = Random.Range(0, 9); if (num == 3) { num = 9; } int num2 = skin - 70; if ((int)FengGameManagerMKII.Settings[32] == 1) { num2 = Random.Range(16, 20); } if ((int)FengGameManagerMKII.Settings[num2] >= 0) { num = (int)FengGameManagerMKII.Settings[num2]; } string text = (string)FengGameManagerMKII.Settings[num2 + 5]; int num3 = Random.Range(1, 8); if (haseye) { num3 = 0; } bool flag = false; if (text.EndsWith(".jpg") || text.EndsWith(".png") || text.EndsWith(".jpeg")) { flag = true; } if (IN_GAME_MAIN_CAMERA.Gametype == GameType.Multiplayer && base.photonView.isMine) { if (flag) { object[] parameters = new object[3] { num, num3, text }; base.photonView.RPC("setHairRPC2", PhotonTargets.AllBuffered, parameters); } else { Color hair_color = HeroCostume.Costumes[Random.Range(0, HeroCostume.Costumes.Length - 5)].hair_color; object[] parameters = new object[5] { num, num3, hair_color.r, hair_color.g, hair_color.b }; base.photonView.RPC("setHairPRC", PhotonTargets.AllBuffered, parameters); } } else if (IN_GAME_MAIN_CAMERA.Gametype == GameType.Singleplayer) { if (flag) { StartCoroutine(loadskinE(num, num3, text)); return; } Color hair_color = HeroCostume.Costumes[Random.Range(0, HeroCostume.Costumes.Length - 5)].hair_color; setHairPRC(num, num3, hair_color.r, hair_color.g, hair_color.b); } } else { int num = Random.Range(0, CostumeHair.hairsM.Length); if (num == 3) { num = 9; } Object.Destroy(part_hair); hairType = num; hair = CostumeHair.hairsM[num]; if (hair.hair == string.Empty) { hair = CostumeHair.hairsM[9]; hairType = 9; } part_hair = (GameObject)Object.Instantiate(Resources.Load("Character/" + hair.hair)); part_hair.transform.parent = hair_go_ref.transform.parent; part_hair.transform.position = hair_go_ref.transform.position; part_hair.transform.rotation = hair_go_ref.transform.rotation; part_hair.transform.localScale = hair_go_ref.transform.localScale; part_hair.renderer.material = CharacterMaterials.materials[hair.texture]; part_hair.renderer.material.color = HeroCostume.Costumes[Random.Range(0, HeroCostume.Costumes.Length - 5)].hair_color; int num4 = Random.Range(1, 8); setFacialTexture(eye, num4); if (IN_GAME_MAIN_CAMERA.Gametype == GameType.Multiplayer && base.photonView.isMine) { object[] parameters = new object[5] { hairType, num4, part_hair.renderer.material.color.r, part_hair.renderer.material.color.g, part_hair.renderer.material.color.b }; base.photonView.RPC("setHairPRC", PhotonTargets.OthersBuffered, parameters); } } }
public IEnumerator loadskinE(int hair, int eye, string hairlink) { bool unload = false; Object.Destroy(part_hair); this.hair = CostumeHair.hairsM[hair]; hairType = hair; if (this.hair.hair != string.Empty) { GameObject obj2 = (GameObject)Object.Instantiate(Resources.Load("Character/" + this.hair.hair)); obj2.transform.parent = hair_go_ref.transform.parent; obj2.transform.position = hair_go_ref.transform.position; obj2.transform.rotation = hair_go_ref.transform.rotation; obj2.transform.localScale = hair_go_ref.transform.localScale; obj2.renderer.material = CharacterMaterials.materials[this.hair.texture]; bool flag = true; if ((int)FengGameManagerMKII.Settings[63] == 1) { flag = false; } if (hairlink.EndsWith(".jpg") || hairlink.EndsWith(".png") || hairlink.EndsWith(".jpeg")) { if (!FengGameManagerMKII.LinkHash[0].ContainsKey(hairlink)) { WWW link = Guardian.Utilities.GameHelper.CreateWWW(hairlink); if (link != null) { yield return(link); Texture2D tex = RCextensions.LoadImage(link, flag, 200000); link.Dispose(); if (!FengGameManagerMKII.LinkHash[0].ContainsKey(hairlink)) { unload = true; obj2.renderer.material.mainTexture = tex; FengGameManagerMKII.LinkHash[0].Add(hairlink, obj2.renderer.material); obj2.renderer.material = (Material)FengGameManagerMKII.LinkHash[0][hairlink]; } else { obj2.renderer.material = (Material)FengGameManagerMKII.LinkHash[0][hairlink]; } } } else { obj2.renderer.material = (Material)FengGameManagerMKII.LinkHash[0][hairlink]; } } else if (hairlink.ToLower() == "transparent") { obj2.renderer.enabled = false; } part_hair = obj2; } if (eye >= 0) { setFacialTexture(this.eye, eye); } if (unload) { FengGameManagerMKII.Instance.UnloadAssets(); } }
public void setHair2() { int num; object[] objArray2; if ((((int)FengGameManagerMKII.settings[1]) == 1) && ((IN_GAME_MAIN_CAMERA.gametype == GAMETYPE.SINGLE) || base.photonView.isMine)) { Color color; num = UnityEngine.Random.Range(0, 9); if (num == 3) { num = 9; } int index = this.skin - 70; if (((int)FengGameManagerMKII.settings[0x20]) == 1) { index = UnityEngine.Random.Range(0x10, 20); } if (((int)FengGameManagerMKII.settings[index]) >= 0) { num = (int)FengGameManagerMKII.settings[index]; } string hairlink = (string)FengGameManagerMKII.settings[index + 5]; int eye = UnityEngine.Random.Range(1, 8); if (this.haseye) { eye = 0; } bool flag2 = false; if ((hairlink.EndsWith(".jpg") || hairlink.EndsWith(".png")) || hairlink.EndsWith(".jpeg")) { flag2 = true; } if ((IN_GAME_MAIN_CAMERA.gametype == GAMETYPE.MULTIPLAYER) && base.photonView.isMine) { if (flag2) { objArray2 = new object[] { num, eye, hairlink }; base.photonView.RPC("setHairRPC2", PhotonTargets.AllBuffered, objArray2); } else { color = HeroCostume.costume[UnityEngine.Random.Range(0, HeroCostume.costume.Length - 5)].hair_color; objArray2 = new object[] { num, eye, color.r, color.g, color.b }; base.photonView.RPC("setHairPRC", PhotonTargets.AllBuffered, objArray2); } } else if (IN_GAME_MAIN_CAMERA.gametype == GAMETYPE.SINGLE) { if (flag2) { base.StartCoroutine(this.loadskinE(num, eye, hairlink)); } else { color = HeroCostume.costume[UnityEngine.Random.Range(0, HeroCostume.costume.Length - 5)].hair_color; this.setHairPRC(num, eye, color.r, color.g, color.b); } } } else { num = UnityEngine.Random.Range(0, CostumeHair.hairsM.Length); if (num == 3) { num = 9; } UnityEngine.Object.Destroy(this.part_hair); this.hairType = num; this.hair = CostumeHair.hairsM[num]; if (this.hair.hair == string.Empty) { this.hair = CostumeHair.hairsM[9]; this.hairType = 9; } this.part_hair = (GameObject)UnityEngine.Object.Instantiate(Resources.Load("Character/" + this.hair.hair)); this.part_hair.transform.parent = this.hair_go_ref.transform.parent; this.part_hair.transform.position = this.hair_go_ref.transform.position; this.part_hair.transform.rotation = this.hair_go_ref.transform.rotation; this.part_hair.transform.localScale = this.hair_go_ref.transform.localScale; this.part_hair.renderer.material = CharacterMaterials.materials[this.hair.texture]; this.part_hair.renderer.material.color = HeroCostume.costume[UnityEngine.Random.Range(0, HeroCostume.costume.Length - 5)].hair_color; int id = UnityEngine.Random.Range(1, 8); this.setFacialTexture(this.eye, id); if ((IN_GAME_MAIN_CAMERA.gametype == GAMETYPE.MULTIPLAYER) && base.photonView.isMine) { objArray2 = new object[] { this.hairType, id, this.part_hair.renderer.material.color.r, this.part_hair.renderer.material.color.g, this.part_hair.renderer.material.color.b }; base.photonView.RPC("setHairPRC", PhotonTargets.OthersBuffered, objArray2); } } }