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(); } }
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; } }
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(); } }