Пример #1
0
    public void resetCurrentQuestion()
    {
        touchEnabled = true;
        flowersLayer.transform.position = new Vector3(BWConstants.flowersLayerMinX, -350, -200);

        BWFlowersLayer layer = flowersLayer.GetComponent <BWFlowersLayer>();

        layer.resetFlowersLayer();

        if ((numberLineMax - numberLineMin) > BWConstants.numbersOnScreen)
        {
            enableScrolling = true;
            xvel            = 0;
            lasty           = 0;
            direction       = BounceDirection.BounceDirectionStayingStill;
        }

        BWBee beeObj = bee.GetComponent <BWBee>();

        beeObj.flipBee(dataManager.shouldFlipBee);

        flowerLayerToInitialNumber(initialNumber);
        beeToFlower(beeStartingPoint);
        setExpectedNumbers(beeStartingPoint, numberToFind);
    }
Пример #2
0
    private void beeToSky()
    {
        BWBee beeObj = bee.GetComponent <BWBee>();

        beeObj.flipBee(dataManager.shouldFlipBee);

        if (dataManager.shouldFlipBee)
        {
            beeToPosition(new Vector3(450, 200, -150));
        }
        else
        {
            beeToPosition(new Vector3(-450, 200, -150));
        }
    }
Пример #3
0
    public void nextQuestion()
    {
        enableScrolling = false;
        isDragging      = false;
        isSwiping       = false;
        prevFlower      = null;

        if (attempts > 0)
        {
        }

        attempts = 0;
        dataManager.fetchNextQuestionData();

        numberLineMin    = dataManager.numberLineMin;
        numberLineMax    = dataManager.numberLineMax;
        initialNumber    = dataManager.initialNumber;
        numberToFind     = dataManager.numberToFind;
        beeStartingPoint = dataManager.beeStartingIndex;


        string numberimg = string.Format("BW_NumberLine/Sprites/Referent/Referant_numbers{0}", AGGameState.modInt(numberToFind));

        bubbleNumber.renderer.material.mainTexture = (Texture2D)Resources.Load(numberimg);

        if (numberToFind < 0)
        {
            bubbleSymbol.renderer.material.mainTexture = (Texture2D)Resources.Load("BW_NumberLine/Sprites/Referent/Referant_exporterminus");
        }
        else
        {
            bubbleSymbol.renderer.material.mainTexture = (Texture2D)Resources.Load("BW_NumberLine/Sprites/Referent/Referant_exporterPlus");
        }

        flowersLayer.transform.position = new Vector3(BWConstants.flowersLayerMinX, -350, -200);

        BWFlowersLayer layer = flowersLayer.GetComponent <BWFlowersLayer>();

        layer.setDiagonalFlowersLayer(numberLineMin, numberLineMax, initialNumber);

        if ((numberLineMax - numberLineMin) > BWConstants.numbersOnScreen)
        {
            enableScrolling = true;
            xvel            = 0;
            lasty           = 0;
            direction       = BounceDirection.BounceDirectionStayingStill;
        }

        BWBee beeObj = bee.GetComponent <BWBee>();

        beeObj.flipBee(dataManager.shouldFlipBee);

        flowerLayerToInitialNumber(initialNumber);
        beeToFlower(beeStartingPoint);
        setExpectedNumbers(beeStartingPoint, numberToFind);

        if (dataManager.currentLevel == 0)
        {
            Invoke("levelZeroTutorial", 3);
        }
        else
        {
            playInstructionSound();
        }

        CancelInvoke("noInteraction");
        Invoke("noInteraction", BWConstants.idleTime + 5.0f);

        touchEnabled = true;
    }