Example #1
0
    public void ShowMenu(int index)
    {
        animator.Play("ExplainerShow");
        gameObject.SetActive(true);
        descriptionText.gameObject.SetActive(true);
        collider.enabled = true;
        levelManager.PauseGame(true);
        explainIndex   = index;
        currentExplain = 1;
        string key = "explain_" + explainIndex.ToString() + "_" + currentExplain.ToString();

        descriptionText.DisplayText(key, true);
    }
Example #2
0
 public void CreateNextTutorial()
 {
     gameObject.SetActive(true);
     ShowDisabler();
     renderer.enabled  = !disableSpriteRenderer;
     isOneTimeTutorial = false;
     currentTutorialIndex++;
     if (tutorialObjects.Length - 1 >= currentTutorialIndex)
     {
         FocusOnObject(tutorialObjects[currentTutorialIndex]);
         string key = "tutorial_" + currentTutorialIndex.ToString();
         txt.DisplayText(key, showSpeachButtonOnDialogComplete);
     }
     else
     {
         Debug.LogError("Tutorial object index out of bounds!");
     }
 }
    public void CreateTask()
    {
        SharedState.SubmitProgress();
        int     randomIndex = Random.Range(0, tasks.Count - 1);
        Vector2 task        = GetFraction(randomIndex);
        Vector2 solution    = GetSolution(randomIndex);

        currentPizza = Instantiate(pizzaPrefab);
        currentPizza.transform.position = pizzaStartPos.position;
        currentPizza.SetNumDenom((int)task.x, (int)task.y);
        currentPizza.SetSolution((int)solution.x, (int)solution.y);
        currentPizza.SetPizzaTargetPos(pizzaStayPos.position);
        currentPizza.pizzaStayPos = pizzaStayPos.position;
        currentPizza.levelManager = this;
        lenta.doScroll            = true;
        currentTask++;
        descriptionKey = "level_4_" + (int)solution.x + "_" + (int)solution.y;
        descriptionText.DisplayText(descriptionKey, false);
    }
Example #4
0
 public virtual void ActivateCuttingPizza()
 {
     cuttingScript.SetPiecesCount(denominator);
     descriptionTxt.DisplayText("explain_cutting");
     okButton.SetActive(false);
 }
Example #5
0
    void DisplayDialog(int i)
    {
        string key = "pre_level_" + currentLevel.ToString() + "_" + currentDialog.ToString();

        descriptionText.DisplayText(key, true);
    }