Ejemplo n.º 1
0
    public void OnTutoEvent(TutoStep step)
    {
        if (step == CurrentTutoStep && !IsBusy())
        {
            gameObject.SetActive(true);
            currentTutoIndex = 0;

            if (tutoObjects == null)
            {
                tutoObjects = new GameObject[tutoObjectsContainer.transform.childCount];
                for (int i = 0; i < tutoObjects.Length; i++)
                {
                    tutoObjects[i] = tutoObjectsContainer.transform.GetChild(i).gameObject;
                }
            }
            for (int i = 0; i < tutoObjects.Length; i++)
            {
                tutoObjects[i].SetActive(false);
            }
            HandleNewStepObjects(CurrentTutoStep);
            GlobalGameManager.Instance.OnBusyElement(this);

            OnClick();
            OnTutoStepStart.Invoke(CurrentTutoStep);
        }
    }
Ejemplo n.º 2
0
 void HandleNewStepObjects(TutoStep step)
 {
     switch (step)
     {
     case TutoStep.Intro:
         mc.SetActive(true);
         break;
     }
 }
Ejemplo n.º 3
0
    string[] GetStepTexts(TutoStep step)
    {
        switch (step)
        {
        case TutoStep.Intro:
            return(intro);

        case TutoStep.JustMoved:
            return(justMoved);

        case TutoStep.ToCardCrafting:
            return(toCardCrafting);

        case TutoStep.CardCrafted:
            return(cardCrafted);

        case TutoStep.FightWithCards:
            return(fightWithCards);

        default:
            Debug.LogError("Tuto step " + step + " doesn't have texts.");
            return(null);
        }
    }