public Face GenerateNewFace(GrandData targ) { GameObject _base = (GameObject)Instantiate(Base.GetObject(targ.Info.Gender, targ.Info.Base.Index)); Face final = _base.GetComponent <Face>(); final.FaceChildren.Left_Eye = Instantiate(Eye.GetObject(targ.Info.Gender, targ.Info.Eye.Index)).GetComponent <Face_Obj>(); final.FaceChildren.Right_Eye = Instantiate(Eye.GetObject(targ.Info.Gender, targ.Info.Eye.Index)).GetComponent <Face_Obj>(); final.FaceChildren.Left_Ear = Instantiate(Ear.GetObject(targ.Info.Gender, targ.Info.Ear.Index)).GetComponent <Face_Obj>(); final.FaceChildren.Right_Ear = Instantiate(Ear.GetObject(targ.Info.Gender, targ.Info.Ear.Index)).GetComponent <Face_Obj>(); final.FaceChildren.Left_Brow = Instantiate(Brow.GetObject(targ.Info.Gender, targ.Info.Brow.Index)).GetComponent <Face_Obj>(); final.FaceChildren.Right_Brow = Instantiate(Brow.GetObject(targ.Info.Gender, targ.Info.Brow.Index)).GetComponent <Face_Obj>(); final.FaceChildren.Hair = Instantiate(Hair.GetObject(targ.Info.Gender, targ.Info.Hair.Index)).GetComponent <Face_Obj>(); final.FaceChildren.Nose = Instantiate(Nose.GetObject(targ.Info.Gender, targ.Info.Nose.Index)).GetComponent <Face_Obj>(); final.FaceChildren.Jaw = Instantiate(Jaw.GetObject(targ.Info.Gender, targ.Info.Jaw.Index)).GetComponent <Face_Obj>(); if (targ.Info.Glasses != null) { final.Glasses_Left = Instantiate(Glasses.GetObject(true, targ.Info.Glasses.Index)).GetComponent <Face_Obj>(); final.Glasses_Right = Instantiate(Glasses.GetObject(true, targ.Info.Glasses.Index)).GetComponent <Face_Obj>(); } final.Create(targ.Info); _base.transform.SetParent(GameManager.GetWorldObjects().transform); _base.transform.localPosition = Vector3.zero; _base.name = targ.Info.Name; targ.Faces.Add(final); return(final); }
protected override void OnBarUpdate() { if (CurrentBar < 8) { return; } Jaw.Set(SMMA(Median, 13)[8]); Teeth.Set(SMMA(Median, 8)[5]); Lips.Set(SMMA(Median, 5)[3]); }
public void Execute(JawDto request) { _validator.ValidateAndThrow(request); var jaw = new Jaw { JawName = request.JawName }; _context.Jaws.Add(jaw); _context.SaveChanges(); }
public void RandomiseFaceData(GrandData final) { final.Info.C_Hair = HairGrad.Evaluate(Random.value); //RandomHair(); final.Info.C_Skin = SkinGrad.Evaluate(Random.value); //RandomSkin(); final.Info.C_Eye = RandomEye(); RandomiseOffsetColours(final); final.Info.Base = Base.Randomise(final.Info.Gender, Simple2x2.zero, Simple2x2.zero, Simple2x2.zero); final.Info.Eye = Eye.Randomise(final.Info.Gender, new Simple2x2(0.0F, -0.5F, 0.0F, 0.9F), Simple2x2.zero, new Simple2x2(-0.2F, -0.2F, 0.1F, 0.1F)); // new Vector3(0,0.05F), 0.0F, new Vector3(0.1F, 0.1F)); final.Info.Ear = Ear.Randomise(final.Info.Gender, new Simple2x2(0.0F, -1.5F, 0.0F, 1.5F), new Simple2x2(-4.0F, 0.0F, 4.0F, 0.0F), new Simple2x2(-0.3F, -0.3F, 0.05F, 0.25F)); //new Vector3(0,0.3F), 4.0F, new Vector3(0.3F, 0.3F)); final.Info.Brow = Brow.Randomise(final.Info.Gender, new Simple2x2(0.0F, -0.1F, 0.0F, 0.15F), new Simple2x2(-5.0F, 0.0F, 7.0F, 0.0F), new Simple2x2(-0.2F, -0.15F, 0.35F, 0.35F)); //new Vector3(0,0.1F), 6.0F, new Vector3(0.3F, 0.2F)); final.Info.Hair = Hair.Randomise(final.Info.Gender, Simple2x2.zero, Simple2x2.zero, new Simple2x2(0.0F, -0.1F, 0.0F, 0.1F)); //Vector3.zero, 0.0F, new Vector3(0.0F, 0.1F)); final.Info.Jaw = Jaw.Randomise(final.Info.Gender, Simple2x2.zero, Simple2x2.zero, new Simple2x2(-0.15F, -0.15F, 0.13F, 0.2F)); //Vector3.zero, 0.0F, new Vector3(0.35F, 0.25F)); final.Info.Nose = Nose.Randomise(final.Info.Gender, new Simple2x2(0.0F, -0.7F, 0.0F, 0.7F), Simple2x2.zero, new Simple2x2(-0.2F, -0.15F, 0.2F, 0.35F)); //new Vector3(0,0.1F), 0.0F, new Vector3(0.1F, 0.3F)); final.Info.Glasses = Random.value > (float)final.Age.Current / 100 ? null : Glasses.Randomise(true, Simple2x2.zero, Simple2x2.zero, new Simple2x2(0.0F, 0.0F, 0.34F, 0.35F)); if (final.Info.Glasses != null) { final.Info.Glasses._Scale += (final.Info.Eye._Scale - Vector3.one); final.Info.Glasses._Position = final.Info.Eye._Position; } SetPupilInfo(final); }
public void CheckEditorInfo(GrandData fin) { fin.Info.Base = Base.GetCurrent(); fin.Info.Eye = Eye.GetCurrent(); fin.Info.Ear = Ear.GetCurrent(); fin.Info.Brow = Brow.GetCurrent(); fin.Info.Hair = Hair.GetCurrent(); fin.Info.Jaw = Jaw.GetCurrent(); fin.Info.Nose = Nose.GetCurrent(); fin.Info.C_Hair = HairCurrent; fin.Info.C_Skin = SkinCurrent; fin.Info.C_Eye = EyeCurrent; }
// Start is called before the first frame update void Start() { if (this.target == null) { return; } xAxis = new GameObject { name = "xAxis" }; xAxis.DrawCircle(objectRadius, 2f, Color.red, xAxisRotationVect); //xAxis.transform.rotation = Quaternion.Euler(xAxisRotationVect); //xAxis.transform.Rotate (yAxisRotationVect,Space.Self); xAxis.transform.position = transform.position; xAxis.transform.SetParent(transform, true); yAxis = new GameObject { name = "yAxis" }; yAxis.DrawCircle(objectRadius, 2f, Color.green, yAxisRotationVect); //yAxis.transform.Rotate (yAxisRotationVect,Space.Self); //yAxis.transform.rotation = Quaternion.Euler(yAxisRotationVect); yAxis.transform.position = transform.position; yAxis.transform.SetParent(transform, true); zAxis = new GameObject { name = "zAxis" }; zAxis.DrawCircle(objectRadius, 2f, Color.blue, zAxisRotationVect); //zAxis.transform.Rotate (zAxisRotationVect,Space.Self); //zAxis.transform.rotation = Quaternion.Euler(zAxisRotationVect); zAxis.transform.position = transform.position; zAxis.transform.SetParent(transform, true); roll = gameObject.AddComponent <Roll> () as Roll; roll.SetAngles(-33, 33); jaw = gameObject.AddComponent <Jaw> () as Jaw; jaw.SetAngles(-16, 16); pitch = gameObject.AddComponent <Pitch> () as Pitch; pitch.SetAngles(16, -16); }
///////////////// /// Main Loop /// ///////////////// void Start() { playerHealth = FindObjectOfType <PlayerHealth>(); jaw = FindObjectOfType <Jaw>(); }