Exemplo n.º 1
0
    public void IncreaseMultiplier(int multiplierModifier)
    {
      if (multiplierFrame != grid.MultiplierFrame)
      {
        comboMultiplier = 0;
      }

      multiplierFrame = grid.MultiplierFrame;

      comboMultiplier += multiplierModifier;
      HighestMultiplier = Mathf.Max(HighestMultiplier, comboMultiplier);

      OnMultiplierChange?.Invoke(this, comboMultiplier);
    }
Exemplo n.º 2
0
    private void Update()
    {
      UpdateBackgroundColor();

      if (isGameOver) return;
      if (IsStarted == false) return;
      if (isPaused) return;

      UpdateGrid();
      UpdateGarbageGeneration();

      if (grid.IsFrozen == false)
      {
        // Reset everything
        if (comboMultiplier > 0)
        {
          comboMultiplier = 0;
          OnMultiplierChange?.Invoke(this, comboMultiplier);
        }

        chainCount = 0;
        bypassFrozen = false;
      }
    }