public virtual void InitParameters(string payloadString) { RepulsionPayload payload = JsonUtility.FromJson <RepulsionPayload>(payloadString); side = payload.side; stimInfo = new StimulationInfo[] { new StimulationInfo( Part.Wrist, side, defaultMaxWidth, 15 ) }; }
public override void InitParameters(string payloadString) { RepulsionPayload payload = JsonUtility.FromJson <RepulsionPayload>(payloadString); side = payload.side; // Current int currentWrist = side == Side.Left ? currentWristL : currentWristR; int currentBiceps = side == Side.Left ? currentBicepsL : currentBicepsR; // Width int widthWrist = side == Side.Left ? widthWristL : widthWristR; int widthBiceps = side == Side.Left ? widthBicepsL : widthBicepsR; stimInfo = new StimulationInfo[] { new StimulationInfo( Part.Wrist, side, widthWrist, currentWrist ), new StimulationInfo( Part.Biceps, side, widthBiceps, currentBiceps ), }; }
public virtual void InitParameters(string payloadString) { RepulsionPayload payload = JsonUtility.FromJson <RepulsionPayload>(payloadString); side = payload.side; }