コード例 #1
0
            // ----------------
            public void Update(InputRig rig, float val)
            {
                if ((val < this.min) || (val > this.max))
                {
                    return;
                }

                if (this.keyTarget != KeyCode.None)
                {
                    rig.SetKeyCode(this.keyTarget);
                }

                if (!string.IsNullOrEmpty(this.axisTarget))
                {
                    rig.SetAxisDigital(this.axisTarget, ref this.cachedAxisId, !this.positiveAxisSide);
                }
            }
コード例 #2
0
        // -----------------
        public void Sync(bool state, InputRig rig, bool skipIfTargetIsMuted = false)
        {
            if ((state == false) || (rig == null) || !this.enabled)
            {
                return;
            }

            for (int i = 0; i < this.keyList.Count; ++i)
            {
                rig.SetKeyCode(this.keyList[i]);
            }

            for (int i = 0; i < this.axisList.Count; ++i)
            {
                AxisElem a = this.axisList[i];
                a.ApplyToRig(rig, skipIfTargetIsMuted);
            }
        }