示例#1
0
    private void PlaceCoin()
    {
        UpdateMaterial(currentSelectedButton.buttonModel, lockedMaterial);
        vibrateEnabled = true;
        audioSource.PlayOneShot(bellSound);

        isGameFinished = coinHandler.PlaceCoin(); // Set flag for clickhandler to not interact
        coolDown       = 1;                       // Set time to 1 sec - to not be able to select other buttons

        if (isGameFinished)
        {
            // Show Snackbar
            snackBarHandler.StartTranslation(Translation.UP);
        }


        //TODO check if if column is full
        //  if so than deactivate VB of this column
        //  MB no need for it - as an IndexOutOfArrayException will occur and the coin will not be placed
        //var currentColumn = clickHandler.IndexOf(currentSelectedButton);
        //if (gameLogic.isColumnFull(currentColumn)) {
        //    clickHandler[currentColumn] = null;
        //}
    }