コード例 #1
0
ファイル: Example.cs プロジェクト: artochesterli/Bubbles
 public void Toggle()
 {
     Taptic.tapticOn   = !Taptic.tapticOn;
     text.text         = Taptic.tapticOn ? "TURN OFF" : "TURN ON";
     tapticImage.color = Taptic.tapticOn ? on : off;
     Taptic.Selection();
 }
コード例 #2
0
 private void EnableAction()
 {
     Taptic.tapticOn = true;
     Taptic.Selection();
     Taptic.Heavy();
     PlayerPrefsManager.SetVibration("vibrationOn");
 }
コード例 #3
0
    private void DisableAction()
    {
        //Nothing :(
        Taptic.tapticOn = false;
        Taptic.Selection();

        PlayerPrefsManager.SetVibration("vibrationOff");
    }
コード例 #4
0
    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;
        }
    }
コード例 #5
0
ファイル: Example.cs プロジェクト: artochesterli/Bubbles
 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();
     }
 }