Пример #1
0
 public static bool HapticFeedback()
 {
     if (mHapticFeedbackManager == null)
     {
         mHapticFeedbackManager = new HapticFeedbackManager();
     }
     return(mHapticFeedbackManager.Execute());
 }
Пример #2
0
 public static bool HapticFeedback()
 {
     Debug.Log("HAPTIC FEEDBACK");
     if (mHapticFeedbackManager == null)
     {
         mHapticFeedbackManager = new HapticFeedbackManager();
     }
     return(mHapticFeedbackManager.Execute());
 }
Пример #3
0
        public static bool Do()
        {
            if (!IsOn)
            {
                return(false);
            }
#if UNITY_ANDROID && !UNITY_EDITOR
            if (mHapticFeedbackManager == null)
            {
                mHapticFeedbackManager = new HapticFeedbackManager();
            }
            Debug.Log("Haptic is on");
            return(mHapticFeedbackManager.Execute());
#elif UNITY_IOS && !UNITY_EDITOR
            HapticEngine.ImpactFeedbackSoft();
            return(true);
#else
            return(false);
#endif
        }