public void PartCreate(object wnd) { CreatePart create = new CreatePart(Line1, Line2, Line3, Line4); var lines = create.GetBoudingSquare(); CreateDividedParts dividedParts = new CreateDividedParts(SelectedFloor, lines); dividedParts.Create(); }
public void prevOption(CreatePart part) { if (part == CreatePart.Preset) { this.presetId = this.toPrev(this.presetId, HeroCostume.costume.Length, 0); this.copyCostume(HeroCostume.costume[this.presetId], this.setup.myCostume, true); this.CostumeDataToMyID(); this.setup.deleteCharacterComponent2(); this.setup.setCharacterComponent(); //this.labelPreset.GetComponent<UILabel>().text = HeroCostume.costume[this.presetId].name; this.freshLabel(); } else { this.toOption2(part, false); } }
public void prevOption(CreatePart part) { if (part == CreatePart.Preset) { presetId = toPrev(presetId, HeroCostume.costume.Length); copyCostume(HeroCostume.costume[presetId], setup.myCostume, true); CostumeDataToMyID(); setup.deleteCharacterComponent2(); setup.setCharacterComponent(); labelPreset.GetComponent <UILabel>().text = HeroCostume.costume[presetId].name; freshLabel(); } else { toOption2(part, false); } }
public void nextOption(CreatePart part) { if (part == CreatePart.Preset) { presetId = toNext(presetId, HeroCostume.Costumes.Length); copyCostume(HeroCostume.Costumes[presetId], setup.myCostume, init: true); CostumeDataToMyID(); setup.DeleteCharacterComponent(); setup.CreateCharacterComponent(); labelPreset.GetComponent <UILabel>().text = HeroCostume.Costumes[presetId].name; freshLabel(); } else { toOption2(part, next: true); } }
public void toOption2(CreatePart part, bool next) { switch (part) { case CreatePart.Sex: this.sexId = !next?this.toPrev(this.sexId, this.sexOption.Length, 0) : this.toNext(this.sexId, this.sexOption.Length, 0); if (this.sexId == 0) { this.costumeId = 11; } else { this.costumeId = 0; } this.copyCostume(this.costumeOption[this.costumeId], this.setup.myCostume, true); this.setup.myCostume.sex = this.sexOption[this.sexId]; this.character.GetComponent <CharacterCreateAnimationControl>().toStand(); this.CostumeDataToMyID(); this.setup.deleteCharacterComponent2(); this.setup.setCharacterComponent(); goto Label_0750; case CreatePart.Eye: this.eyeId = !next?this.toPrev(this.eyeId, this.eyeOption.Length, 0) : this.toNext(this.eyeId, this.eyeOption.Length, 0); this.setup.myCostume.eye_texture_id = this.eyeId; this.setup.setFacialTexture(this.setup.part_eye, this.eyeOption[this.eyeId]); goto Label_0750; case CreatePart.Face: this.faceId = !next?this.toPrev(this.faceId, this.faceOption.Length, 0) : this.toNext(this.faceId, this.faceOption.Length, 0); this.setup.myCostume.beard_texture_id = this.faceOption[this.faceId]; if (this.setup.part_face == null) { this.setup.createFace(); } this.setup.setFacialTexture(this.setup.part_face, this.faceOption[this.faceId]); goto Label_0750; case CreatePart.Glass: this.glassId = !next?this.toPrev(this.glassId, this.glassOption.Length, 0) : this.toNext(this.glassId, this.glassOption.Length, 0); this.setup.myCostume.glass_texture_id = this.glassOption[this.glassId]; if (this.setup.part_glass == null) { this.setup.createGlass(); } this.setup.setFacialTexture(this.setup.part_glass, this.glassOption[this.glassId]); goto Label_0750; case CreatePart.Hair: this.hairId = !next?this.toPrev(this.hairId, this.hairOption.Length, 0) : this.toNext(this.hairId, this.hairOption.Length, 0); if (this.sexId == 0) { this.setup.myCostume.hair_mesh = CostumeHair.hairsM[this.hairOption[this.hairId]].hair; this.setup.myCostume.hair_1_mesh = CostumeHair.hairsM[this.hairOption[this.hairId]].hair_1; this.setup.myCostume.hairInfo = CostumeHair.hairsM[this.hairOption[this.hairId]]; break; } this.setup.myCostume.hair_mesh = CostumeHair.hairsF[this.hairOption[this.hairId]].hair; this.setup.myCostume.hair_1_mesh = CostumeHair.hairsF[this.hairOption[this.hairId]].hair_1; this.setup.myCostume.hairInfo = CostumeHair.hairsF[this.hairOption[this.hairId]]; break; case CreatePart.Skin: if (this.setup.myCostume.uniform_type == UNIFORM_TYPE.CasualAHSS) { this.skinId = 2; } else { this.skinId = !next?this.toPrev(this.skinId, 2, 0) : this.toNext(this.skinId, 2, 0); } this.setup.myCostume.skin_color = this.skinOption[this.skinId]; this.setup.myCostume.setTexture(); this.setup.setSkin(); goto Label_0750; case CreatePart.Costume: if (this.setup.myCostume.uniform_type == UNIFORM_TYPE.CasualAHSS) { if (this.setup.myCostume.sex == SEX.FEMALE) { this.costumeId = 0x1a; } else if (this.setup.myCostume.sex == SEX.MALE) { this.costumeId = 0x19; } } else if (this.sexId != 0) { this.costumeId = !next?this.toPrev(this.costumeId, 10, 0) : this.toNext(this.costumeId, 10, 0); } else { this.costumeId = !next?this.toPrev(this.costumeId, 0x18, 10) : this.toNext(this.costumeId, 0x18, 10); } this.copyBodyCostume(this.costumeOption[this.costumeId], this.setup.myCostume); this.setup.myCostume.setMesh2(); this.setup.myCostume.setTexture(); this.setup.createUpperBody2(); this.setup.createLeftArm(); this.setup.createRightArm(); this.setup.createLowerBody(); goto Label_0750; case CreatePart.Cape: this.capeId = !next?this.toPrev(this.capeId, this.capeOption.Length, 0) : this.toNext(this.capeId, this.capeOption.Length, 0); this.setup.myCostume.cape = this.capeId == 1; this.setup.myCostume.setCape(); this.setup.myCostume.setTexture(); this.setup.createCape2(); goto Label_0750; case CreatePart.Division: this.divisionId = !next?this.toPrev(this.divisionId, this.divisionOption.Length, 0) : this.toNext(this.divisionId, this.divisionOption.Length, 0); this.setup.myCostume.division = this.divisionOption[this.divisionId]; this.setup.myCostume.setTexture(); this.setup.createUpperBody2(); goto Label_0750; default: goto Label_0750; } this.setup.createHair2(); this.setHairColor(); Label_0750: this.freshLabel(); }
public void toOption2(CreatePart part, bool next) { switch (part) { case CreatePart.Sex: sexId = !next?toPrev(sexId, sexOption.Length) : toNext(sexId, sexOption.Length); if (sexId == 0) { costumeId = 11; } else { costumeId = 0; } copyCostume(costumeOption[costumeId], setup.myCostume, true); setup.myCostume.sex = sexOption[sexId]; character.GetComponent <CharacterCreateAnimationControl>().toStand(); CostumeDataToMyID(); setup.deleteCharacterComponent2(); setup.setCharacterComponent(); goto Label_0750; case CreatePart.Eye: eyeId = !next?toPrev(eyeId, eyeOption.Length) : toNext(eyeId, eyeOption.Length); setup.myCostume.eye_texture_id = eyeId; setup.setFacialTexture(setup.part_eye, eyeOption[eyeId]); goto Label_0750; case CreatePart.Face: faceId = !next?toPrev(faceId, faceOption.Length) : toNext(faceId, faceOption.Length); setup.myCostume.beard_texture_id = faceOption[faceId]; if (setup.part_face == null) { setup.createFace(); } setup.setFacialTexture(setup.part_face, faceOption[faceId]); goto Label_0750; case CreatePart.Glass: glassId = !next?toPrev(glassId, glassOption.Length) : toNext(glassId, glassOption.Length); setup.myCostume.glass_texture_id = glassOption[glassId]; if (setup.part_glass == null) { setup.createGlass(); } setup.setFacialTexture(setup.part_glass, glassOption[glassId]); goto Label_0750; case CreatePart.Hair: hairId = !next?toPrev(hairId, hairOption.Length) : toNext(hairId, hairOption.Length); if (sexId == 0) { setup.myCostume.hair_mesh = CostumeHair.hairsM[hairOption[hairId]].hair; setup.myCostume.hair_1_mesh = CostumeHair.hairsM[hairOption[hairId]].hair_1; setup.myCostume.hairInfo = CostumeHair.hairsM[hairOption[hairId]]; break; } setup.myCostume.hair_mesh = CostumeHair.hairsF[hairOption[hairId]].hair; setup.myCostume.hair_1_mesh = CostumeHair.hairsF[hairOption[hairId]].hair_1; setup.myCostume.hairInfo = CostumeHair.hairsF[hairOption[hairId]]; break; case CreatePart.Skin: if (setup.myCostume.uniform_type == UNIFORM_TYPE.CasualAHSS) { skinId = 2; } else { skinId = !next?toPrev(skinId, 2) : toNext(skinId, 2); } setup.myCostume.skin_color = skinOption[skinId]; setup.myCostume.setTexture(); setup.setSkin(); goto Label_0750; case CreatePart.Costume: if (setup.myCostume.uniform_type == UNIFORM_TYPE.CasualAHSS) { if (setup.myCostume.sex == SEX.FEMALE) { costumeId = 26; } else if (setup.myCostume.sex == SEX.MALE) { costumeId = 25; } } else if (sexId != 0) { costumeId = !next?toPrev(costumeId, 10) : toNext(costumeId, 10); } else { costumeId = !next?toPrev(costumeId, 24, 10) : toNext(costumeId, 24, 10); } copyBodyCostume(costumeOption[costumeId], setup.myCostume); setup.myCostume.setMesh2(); setup.myCostume.setTexture(); setup.createUpperBody2(); setup.createLeftArm(); setup.createRightArm(); setup.createLowerBody(); goto Label_0750; case CreatePart.Cape: capeId = !next?toPrev(capeId, capeOption.Length) : toNext(capeId, capeOption.Length); setup.myCostume.cape = capeId == 1; setup.myCostume.setCape(); setup.myCostume.setTexture(); setup.createCape2(); goto Label_0750; case CreatePart.Division: divisionId = !next?toPrev(divisionId, divisionOption.Length) : toNext(divisionId, divisionOption.Length); setup.myCostume.division = divisionOption[divisionId]; setup.myCostume.setTexture(); setup.createUpperBody2(); goto Label_0750; default: goto Label_0750; } setup.createHair2(); setHairColor(); Label_0750: freshLabel(); }
public void toOption2(CreatePart part, bool next) { switch (part) { case CreatePart.Sex: sexId = ((!next) ? toPrev(sexId, sexOption.Length) : toNext(sexId, sexOption.Length)); if (sexId != 0) { costumeId = 0; } else { costumeId = 11; } copyCostume(costumeOption[costumeId], setup.myCostume, init: true); setup.myCostume.sex = sexOption[sexId]; character.GetComponent <CharacterCreateAnimationControl>().toStand(); CostumeDataToMyID(); setup.DeleteCharacterComponent(); setup.CreateCharacterComponent(); break; case CreatePart.Eye: eyeId = ((!next) ? toPrev(eyeId, eyeOption.Length) : toNext(eyeId, eyeOption.Length)); setup.myCostume.eye_texture_id = eyeId; setup.SetFaceTexture(setup.part_eye, eyeOption[eyeId]); break; case CreatePart.Face: faceId = ((!next) ? toPrev(faceId, faceOption.Length) : toNext(faceId, faceOption.Length)); setup.myCostume.beard_texture_id = faceOption[faceId]; if (setup.part_face == null) { setup.CreateFace(); } setup.SetFaceTexture(setup.part_face, faceOption[faceId]); break; case CreatePart.Glass: glassId = ((!next) ? toPrev(glassId, glassOption.Length) : toNext(glassId, glassOption.Length)); setup.myCostume.glass_texture_id = glassOption[glassId]; if (setup.part_glass == null) { setup.CreateGlasses(); } setup.SetFaceTexture(setup.part_glass, glassOption[glassId]); break; case CreatePart.Hair: hairId = ((!next) ? toPrev(hairId, hairOption.Length) : toNext(hairId, hairOption.Length)); if (sexId != 0) { setup.myCostume.hair_mesh = CostumeHair.FemaleHairs[hairOption[hairId]].hair; setup.myCostume.hair_1_mesh = CostumeHair.FemaleHairs[hairOption[hairId]].hair_1; setup.myCostume.hairInfo = CostumeHair.FemaleHairs[hairOption[hairId]]; } else { setup.myCostume.hair_mesh = CostumeHair.MaleHairs[hairOption[hairId]].hair; setup.myCostume.hair_1_mesh = CostumeHair.MaleHairs[hairOption[hairId]].hair_1; setup.myCostume.hairInfo = CostumeHair.MaleHairs[hairOption[hairId]]; } setup.CreateHair(); setHairColor(); break; case CreatePart.Skin: skinId = ((!next) ? toPrev(skinId, 2) : toNext(skinId, 2)); if (setup.myCostume.uniform_type == UNIFORM_TYPE.CasualAHSS && skinId == 0) { skinId = 2; } setup.myCostume.skin_color = skinOption[skinId]; setup.myCostume.setTexture(); setup.SetSkin(); break; case CreatePart.Costume: if (setup.myCostume.uniform_type != UNIFORM_TYPE.CasualAHSS) { costumeId = !next?toPrev(costumeId, 24) : toNext(costumeId, 24); } else { costumeId = 25; } copyBodyCostume(costumeOption[costumeId], setup.myCostume); setup.myCostume.SetMesh(); setup.myCostume.setTexture(); setup.CreateUpperBody(); setup.CreateLeftArm(); setup.CreateRightArm(); setup.CreateLowerBody(); break; case CreatePart.Cape: capeId = ((!next) ? toPrev(capeId, capeOption.Length) : toNext(capeId, capeOption.Length)); setup.myCostume.cape = (capeId == 1); setup.myCostume.setCape(); setup.myCostume.setTexture(); setup.CreateCape(); break; case CreatePart.Division: divisionId = ((!next) ? toPrev(divisionId, divisionOption.Length) : toNext(divisionId, divisionOption.Length)); setup.myCostume.division = divisionOption[divisionId]; setup.myCostume.setTexture(); setup.CreateUpperBody(); break; } freshLabel(); }