Example #1
0
        public void SetMotorSpeed(float motor)
        {
            var command = MoveControllerPS4OuputCommand.Create();

            command.SetMotorSpeed(motor);

            ExecuteCommand(ref command);

            m_Motor = motor;
        }
Example #2
0
        public void SetLightSphereColor(Color color)
        {
            var command = MoveControllerPS4OuputCommand.Create();

            command.SetColor(color);

            ExecuteCommand(ref command);

            m_LightSphereColor = color;
        }
Example #3
0
        public void ResetHaptics()
        {
            if (!m_Motor.HasValue && !m_LightSphereColor.HasValue)
            {
                return;
            }

            var command = MoveControllerPS4OuputCommand.Create();

            command.SetMotorSpeed(0f);

            ExecuteCommand(ref command);

            m_Motor            = null;
            m_LightSphereColor = null;
        }
Example #4
0
        public void PauseHaptics()
        {
            if (!m_Motor.HasValue && !m_LightSphereColor.HasValue)
            {
                return;
            }

            var command = MoveControllerPS4OuputCommand.Create();

            command.SetMotorSpeed(0f);
            if (m_LightSphereColor.HasValue)
            {
                command.SetColor(Color.black);
            }

            ExecuteCommand(ref command);
        }