public static void Notification(NotificationFeedback notificationFeedback) { #if UNITY_IOS TapticManager.Notification(notificationFeedback); #elif UNITY_ANDROID AndroidHapticManager.Notification(notificationFeedback); #endif }
void OnTriggerEnter2D(Collider2D other) { if (other.tag == "Enemy") { hitPoints--; if (hitPoints == 0) { roundManager.KillPlayer(); audioSource.PlayOneShot(audioDeath); Instantiate(bloodSplatter, transform.position, Quaternion.identity); TapticManager.Notification(NotificationFeedback.Error); } } }
//################################################## public static void NotificationSuccessTaptic() { if (SystemInfo.supportsVibration) { long duration = 25; if (isAndroid()) { vibrator.Call("vibrate", duration); } else { TapticManager.NotificationFeedback feedback; feedback = TapticManager.NotificationFeedback.Success; TapticManager.Notification(feedback); } } }
public void ShowFireWorks() { TapticManager.Notification(NotificationFeedback.Success); RoomConfigurations[selectedRoom].SearchCamera.transform.GetChild(2).gameObject.SetActive(true); }