public (Redirector.GainType, float) RealMove(Object2D realUser, Redirector.GainType type, float degree) { Transform2D realUserTransform = realUser.transform; float appliedGain = 0; switch (type) { case Redirector.GainType.Translation: realUser.Translate(realUserTransform.forward * degree * Time.fixedDeltaTime, Space.World); break; case Redirector.GainType.Rotation: realUser.Rotate(degree * Time.fixedDeltaTime); break; case Redirector.GainType.Curvature: realUser.Translate(realUserTransform.forward * deltaPosition.magnitude * Time.fixedDeltaTime, Space.World); realUser.Rotate(degree * Time.fixedDeltaTime); break; default: break; } return(type, appliedGain); }
public void setGains(Redirector.GainType gaintype, float appliedGain) { switch (gaintype) { case Redirector.GainType.Translation: sumOfAppliedTranslationGain += appliedGain; break; case Redirector.GainType.Rotation: sumOfAppliedRotationGain += appliedGain; break; case Redirector.GainType.Curvature: sumOfAppliedCurvatureGain += appliedGain; break; default: break; } }