Ejemplo n.º 1
0
        public void MoveAxis(AxisParam axisParam)
        {
            UpdateJoint(axisParam.AxisNumber, (float)axisParam.Value);

            /*
             * var jointItems = jointController.GetItem(axisParam.AxisNumber);
             *
             * foreach(var joint in jointItems)
             * {
             *  Debug.Log("joint name : " + joint.JointName);
             * }
             */
        }
Ejemplo n.º 2
0
        private AxisParam[] ParseMultipleAxisArgs(IReadOnlyList <string> args)
        {
            if (args.Count < 5 || (args.Count - 1) % 4 != 0)
            {
                throw new ApplicationException("invalid count");
            }

            var axisParams = new AxisParam[(args.Count - 1) / 4];

            for (int i = 0; i < axisParams.Length; ++i)
            {
                var k = 1 + 4 * i;
                axisParams[i] = ParseAxisArgs(args[k], args[k + 1], args[k + 2], args[k + 3]);
            }
            return(axisParams);
        }