private void ReadRiskArray(ref byte[] bytes) { for (int i = 0; i < modSwitch.GetNumberOfFeedbackPoints(); ++i) { activeFeedbackPoints[i] = System.BitConverter.ToSingle(bytes, i * 4); } isFeedback = true; }
// Use this for initialization void Start() { udp = new UdpClient(5005); thread = new Thread(new ThreadStart(ThreadMethod)); thread.Start(); muscleLength = HumanTrait.MuscleName.Length; muscles = new float[muscleLength]; camSwitch = GetComponent <CameraSwitch>(); modSwitch = GetComponent <ModelSwitch>(); isCamSwitched = false; isModSwitched = false; isFeedback = false; activeFeedbackPoints = new float[modSwitch.GetNumberOfFeedbackPoints()]; }