public void Toggle() { Taptic.tapticOn = !Taptic.tapticOn; text.text = Taptic.tapticOn ? "TURN OFF" : "TURN ON"; tapticImage.color = Taptic.tapticOn ? on : off; Taptic.Selection(); }
private void EnableAction() { Taptic.tapticOn = true; Taptic.Selection(); Taptic.Heavy(); PlayerPrefsManager.SetVibration("vibrationOn"); }
private void DisableAction() { //Nothing :( Taptic.tapticOn = false; Taptic.Selection(); PlayerPrefsManager.SetVibration("vibrationOff"); }
public static void ChangeVibrationSelection(Image vibrationButtonImage, Sprite vibrationOnSprite, Sprite vibrationOffSprite) { Taptic.tapticOn = !Taptic.tapticOn; Taptic.Selection(); if (Taptic.tapticOn) { PlayerPrefsManager.SetVibration("vibrationOn"); Taptic.Heavy(); vibrationButtonImage.sprite = vibrationOnSprite; } else { PlayerPrefsManager.SetVibration("vibrationOff"); vibrationButtonImage.sprite = vibrationOffSprite; } }
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(); } }