Beispiel #1
0
    public static void StartGame()
    {
        Score       = 0;
        ColorsCount = GameConsts.GAME_LOGIC_START_COLORS_COUNT;
        OrdersCount = GameConsts.GAME_LOGIC_START_ORDER_AMOUNT;

        difficultyBumpThreshold = GameConsts.THRESHOLD_FOR_DIFFICULTY_BUMP;

        MovesCounter = GameConsts.GAME_LOGIC_MOVES_THRESHOLD;
        MovesTracker.UpdateMovesTracker();
        ScoreTracker.UpdateScoreTracker();
    }
Beispiel #2
0
    private void OnMouseUp()
    {
        dragging = false;

        if (potentialSlot != null && !potentialSlot.GetComponent <GameBoardSlot>().isOccupied)
        {
            // Setting up the position of the dragged object to the slot position
            transform.position = potentialSlot.transform.position;

            // Informing slot about object it has to snap
            potentialSlot.GetComponent <GameBoardSlot>().HandleSnap(true, gameObject);
            GetComponent <BoxCollider2D>().enabled = false;

            OnInformTilesManager();
            OnInformGameBoard();

            MovesTracker.UpdateMovesTracker();
        }
        else
        {
            transform.position = startPos;
        }
    }