예제 #1
0
 public void HideColorWheel()
 {
     colorWheel.HideColorWheel();
 }
예제 #2
0
    // The things below are just for the debug, to give text feedback to the user
    // TODO: replace with actual logic and animations
    public void AddedFruitToTheBasket(FruitColor id)
    {
        // -- Count down the fruit amount --
        fruitCount -= 1;
        int fruitCountIterator = GetSpecificFruitIndex(id);

        // --- Decrease added fruit ---
        if (fruitCountIterator > -1)
        {
            specificFruitCount[fruitCountIterator]--;

            if (specificFruitCount[fruitCountIterator] == 0)
            {
                if (fruitCount > 0)
                {
                    DiceController.StartBlinking(0.0f);
                }
            }
        }

        if (OnFruitIsAddedToTheBasket != null)
        {
            OnFruitIsAddedToTheBasket(id);
            InputManager.UnblockInput();
        }

        print(id.ToString() + " in the basket");
        print("Fruits remaining: " + fruitCount);

        // -- Finish the Game --
        if (fruitCount == 0)
        {
            // --- Debug Stuff ---
            DisablePointerAtColorWheelHint();
            DisablePointerFingerSwipeAnimation();

            // Disable Dice
            DiceController.HideColorWheel();
            DiceController.Enable(false);
            DiceController.AllowToRoll(false);
            uiController.EnableDiceButton(false); // Debug

            InputManager.BlockInput();
            InputManager.BlockDiceRole();

            // Win Game
            Raven.transform.rotation = Quaternion.AngleAxis(180, Vector3.up);
            Raven.RavenLoss(WinTheGame);
            uiController.backButton.gameObject.SetActive(false);
        }
        else
        {
            // --- Normal GAME ---

            // Allow Only One fruit
            colourID = FruitColor.None;
            DiceController.StartBlinking(0.0f);
            DiceController.AllowToRoll(true);
            DiceController.Enable(true);
            uiController.diceButton.enabled = true;
            InputManager.UnblockDiceRole();
            InputManager.blockGrabing = true;
            DiceController.UnHightLightSelected();

            if (!tutorial)
            {
                //showPointerAtColorWheelTutorial = true;
                //StartCoroutine(DoFunctionWithDelay(ShowPointerAtColorWheel, 5.0f));
            }
        }
    }