コード例 #1
0
    public void PerfectHit(IngredientSO ingredient, Transform lastIngredient)
    {
        SetLastIngredient(lastIngredient);

        _allIngredientsOnTheBurger++;
        _countPerfectHIt++;

        //SoundManager.instance.BurgerHitSound();

        if (_countPerfectHIt == _perfectHitToStaggerZero)
        {
            Bonuses.StopStagger();
            GameManager.instance.SetPerfektHitFX(lastIngredient.position + Vector3.up / 6);
            SoundManager.instance.PerfectHitSound();

            _countPerfectHIt = 0;
        }
        else
        {
            SoundManager.instance.PerfectHitTypesSound();
        }

        ingredientHit = Hit.Perfect;
        Score.instance.ChangeScoreWhenHit(GameManager.instance.GetPerfectHitScore(), ingredientHit);
        PlayerControl.instance.HitOnTheBurger();


        _missionManager.MissionDo(Hit.Perfect, ingredient);

        IngredientOnTheBurger(ingredient);
    }
コード例 #2
0
 public void StopStagger()
 {
     if (GameManager.instance.GetScore() >= _staggeringStopCost)
     {
         GameManager.instance.ChangeScore(-_slowDownArrowCost);
         Bonuses.StopStagger();
     }
 }