// --------------------
            public float GetAxis(InputRig rig)
            {
                if (rig == null)
                {
                    return(0);
                }

                if (this.separateAxes)
                {
                    return(((this.positiveAxisAsPositive ? 1.0f : -1.0f) * rig.GetAxis(this.positiveAxis, ref this.positiveAxisId)) -
                           ((this.negativeAxisAsPositive ? 1.0f : -1.0f) * rig.GetAxis(this.negativeAxis, ref this.negativeAxisId)));
                }
                else
                {
                    return(rig.GetAxis(this.singleAxis, ref this.singleAxisId));
                }
            }