Пример #1
0
    private void OnScored(ScoreObjectArgs scoreObjectArgs)
    {
        DataController.GameScoreController.AddScores(scoreObjectArgs.Scores);

        CoreHapticsUnityProxy.PlayTransient(0.5f, 1f);

        if (scoreObjectArgs.TaskId.HasValue && DataController.ScoreTaskController.CheckTaskCompleteById(scoreObjectArgs.TaskId.Value, out int reward))
        {
            DataController.ScoreObjectController.RemoveTaskFromObjects(scoreObjectArgs.TaskId.Value);
            DataController.GameScoreController.AddScores(reward);
        }
    }
Пример #2
0
    private void MoveFlipper(Side side, FlipperDirection direction)
    {
        if (direction == FlipperDirection.Up)
        {
            CoreHapticsUnityProxy.PlayTransient(0.5f, 1f);
        }

        switch (side)
        {
        case Side.Left:
            GameController.Instance.MoveLeftFlipper(direction);
            break;

        case Side.Right:
            GameController.Instance.MoveRightFlipper(direction);
            break;
        }
    }