Exemplo n.º 1
0
    public void Vibrate(UIFeedbackType type)
    {
        switch (type)
        {
        case UIFeedbackType.ImpactLight:
            AndroidVibrationPlugin.Vibrate(30, 160);
            break;

        case UIFeedbackType.ImpactMedium:
            AndroidVibrationPlugin.Vibrate(30, 210);
            break;

        case UIFeedbackType.ImpactHeavy:
            AndroidVibrationPlugin.Vibrate(50, 255);
            break;
        }
    }
        internal void SetTimer(int userId, float Timer, Action onComplete)
        {
            if (!gameObject.activeInHierarchy)
            {
                return;
            }
            if (userId == this.userId)
            {
                timerController.Activate(Timer, onComplete);
                if (userId == int.Parse(GameVariable.GameVariables.userId))
                {
#if UNITY_ANDROID && !UNITY_EDITOR
                    AndroidVibrationPlugin.Vibrate(255, 255);
#endif
                }
                ////gameObject.SetActive(true);
            }
            else
            {
                timerController.Deactiivate();
                //gameObject.SetActive(false);
            }
        }