Пример #1
0
        private void HandleRoll(Vector3 towardGravity)
        {
            float angle          = Vector3.SignedAngle(Vector3.down, towardGravity, Vector3.forward);
            float relativeAmount = angle / ANGLE_MAX;

            _Roll.Invoke(RelativeInputEvent.WithinFullRange(relativeAmount));
        }
Пример #2
0
        private void HandlePitch(Vector3 towardGravity)
        {
            float angle          = Vector3.SignedAngle(Vector3.forward, towardGravity, Vector3.right);
            float relativeAmount = angle / ANGLE_MAX;

            _Pitch.Invoke(RelativeInputEvent.WithinFullRange(relativeAmount));
        }
Пример #3
0
        private void NotifyNewInput()
        {
            float value = RelativeInputEvent.WithinFullRange(Curve.Evaluate(_TimeSeconds));

            InputConsumers.Invoke(value);
        }
Пример #4
0
 private void FireTouchEvents(float domainValue)
 {
     TouchEventListeners.Invoke(domainValue);
 }