public override bool OnElementDestruction(BoardManager board, BoardElement otherElement) { if (hasBeenDestroyed) { return(false); } // if (otherElement == null) { // Debug.LogError(BoardFunctions.GetTransformByIndex(otherElement.GetTransformIndex()) + " Bell OnElementDestruction() triggered with null as gameobject"); // } KeyValuePair <int, int> pos = BoardFunctions.GetBoardPositionOfElement(this, board.elementsPositions); BoardFunctions.ActivateBellFunction(board, otherElement); board.matchedElemPositions[pos.Key, pos.Value] = true; hasBeenDestroyed = true; return(true); }