public string FacePartConfigToJson(CharacterConstants.FacePart facePart) { string material = ""; switch (facePart) { case CharacterConstants.FacePart.Eye_Brows: material = this.eyeBrows; break; case CharacterConstants.FacePart.Eyes: material = this.eyes; break; case CharacterConstants.FacePart.Lip: material = this.lip; break; } string json = "{'tipe':'"+ facePart.ToString() +"','element':'"+ material +"'}"; return json; }
public string BodyPartConfigToJson(CharacterConstants.BodyPart bodyPart) { string element = ""; string material = ""; switch (bodyPart) { case CharacterConstants.BodyPart.Body: element = this.body; material = this.bodyMaterial; break; case CharacterConstants.BodyPart.Hair: element = this.hair; material = this.hairMaterial; break; case CharacterConstants.BodyPart.Hand: element = this.hand; material = this.handMaterial; break; case CharacterConstants.BodyPart.Hat: element = this.hat; material = this.hatMaterial; break; case CharacterConstants.BodyPart.Pants: element = this.pants; material = this.pantsMaterial; break; case CharacterConstants.BodyPart.Shoes: element = this.shoes; material = this.shoesMaterial; break; } string json = "{'tipe':'"+ bodyPart.ToString() +"','element':'"+ element +"','material':'"+ material +"'}"; return json; }