예제 #1
0
 public void TriggerTaptic(string type)
 {
     if (type == "warning")
     {
         Taptic.Warning();
     }
     else if (type == "failure")
     {
         Taptic.Failure();
     }
     else if (type == "success")
     {
         Taptic.Success();
     }
     else if (type == "light")
     {
         Taptic.Light();
     }
     else if (type == "medium")
     {
         Taptic.Medium();
     }
     else if (type == "heavy")
     {
         Taptic.Heavy();
     }
     else if (type == "default")
     {
         Taptic.Default();
     }
     else if (type == "vibrate")
     {
         Taptic.Vibrate();
     }
     else if (type == "selection")
     {
         Taptic.Selection();
     }
 }
예제 #2
0
    public static void Vibrate(VibrationType vibrationType)
    {
        switch (vibrationType)
        {
        case VibrationType.Light:
            if (PlayerDataController.data.isVibrationOpen)
            {
                Taptic.Light();
            }
            break;

        case VibrationType.Medium:
            if (PlayerDataController.data.isVibrationOpen)
            {
                Taptic.Medium();
            }
            break;

        case VibrationType.Success:
            if (PlayerDataController.data.isVibrationOpen)
            {
                Taptic.Success();
            }
            break;

        case VibrationType.Failure:
            if (PlayerDataController.data.isVibrationOpen)
            {
                Taptic.Failure();
            }
            break;

        default:
            break;
        }
    }
예제 #3
0
    public void Die()
    {
        AdjustTimeScale(true);

        visualRenderers[0].enabled = false;
        GetComponent <SphereCollider>().enabled = false;
        trail.enabled = false;

        foreach (GameObject part in parts)
        {
            part.SetActive(true);
            part.GetComponent <Rigidbody>().velocity = currentVelocity;
        }

        rb.velocity = Vector3.zero;
        GameManager.Instance.CurrentState = GameStates.LevelEnd;

        UIManager.Instance.SetLevelEndPanelVisibility(true);

        if (DataManager.Instance.Vibration == 1)
        {
            Taptic.Failure();
        }
    }