コード例 #1
0
 public void Win()
 {
     GameManager.Instance.LevelPassed = true;
     UIManager.Instance.SetLevelEndPanelVisibility(true);
     DataManager.Instance.Level++;
     GameManager.Instance.CurrentState = GameStates.LevelEnd;
     AdjustTimeScale(true);
     if (DataManager.Instance.Vibration == 1)
     {
         Taptic.Success();
     }
 }
コード例 #2
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();
     }
 }
コード例 #3
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;
        }
    }