public ActiveHairSim(string optionName, HairSimControl hairSim) { this.optionName = optionName; this.hairSim = hairSim; usePaintedRigidity = hairSim.GetBoolParamValue("usePaintedRigidity"); drag = hairSim.GetFloatParamValue("drag"); gravityMultiplier = hairSim.GetFloatParamValue("gravityMultiplier"); mainRigidity = hairSim.GetFloatParamValue("mainRigidity"); tipRigidity = hairSim.GetFloatParamValue("tipRigidity"); cling = hairSim.GetFloatParamValue("cling"); mainRigidityStorable = hairSim.GetFloatJSONParam("mainRigidity"); tipRigidityStorable = hairSim.GetFloatJSONParam("tipRigidity"); clingStorable = hairSim.GetFloatJSONParam("cling"); InitStorables(); }
public void ReLetLoose() { notifications = ""; usePaintedRigidity = hairSim.GetBoolParamValue("usePaintedRigidity"); drag = hairSim.GetFloatParamValue("drag"); gravityMultiplier = hairSim.GetFloatParamValue("gravityMultiplier"); mainRigidity = hairSim.GetFloatParamValue("mainRigidity"); tipRigidity = hairSim.GetFloatParamValue("tipRigidity"); cling = hairSim.GetFloatParamValue("cling"); DisablePaintedRigidity(); CheckDrag(drag); CheckGravityMultiplier(gravityMultiplier); hairSim.SetFloatParamValue("mainRigidity", mainRigidityStorable.val); hairSim.SetFloatParamValue("tipRigidity", tipRigidityStorable.val); hairSim.SetFloatParamValue("cling", clingStorable.val); }