Пример #1
0
    public void StartTutorial()
    {
        PareDelegateHandler += TutorialStep;
        TutorialStep();
        Debug.Log("tutorial hints started show");
        //StartCoroutine(MakeHint(hints[hint_id],5));

        currentStep = 0;
    }
Пример #2
0
    public void TutorialStep()
    {
        Debug.Log("Tutorial step:" + hint_id + " text - " + hints[Mathf.Clamp(hint_id, 0, hints.Length - 1)]);

        DestroyAllHints();

        switch (hint_id)
        {
        case 0:
        case 1:

            StartCoroutine(ShowHelp());
            StartCoroutine(MakeHint(hints[hint_id]));

            break;

        case 2:

            PareDelegateHandler       -= TutorialStep;
            ButtonHoldDelegateHandler += TutorialStep;

            StartCoroutine(MakeHint(hints[hint_id]));

            break;

        case 3:

            ButtonHoldDelegateHandler -= TutorialStep;

            StartCoroutine(MakeHint(hints[hint_id], 4));

            break;
        }

        hint_id++;
    }
Пример #3
0
    public IEnumerator Start()
    {
        PareDelegateHandler        += PareDelegateHandlerDebug;
        ButtonHoldDelegateHandler  += ButtonHoldDelegateHandlerDebug;
        ButtonTouchDelegateHandler += ButtonTouchDelegateHandlerDebug;

        gameStrategy        = GameStrategy.Normal;
        countPhotos         = DownloadManager.instance.GetCount();
        numMap              = 1;
        cellStateTMP        = 0;
        cellState           = 0;
        Screen.sleepTimeout = SleepTimeout.NeverSleep;
        transformUnity      = new TransformUnity();
        mainCamera          = Camera.main;
        LR   = new LineRenderer();
        Line = GameObject.FindGameObjectsWithTag("Line");

        Application.targetFrameRate = 60;


        stats = PlayerStats.instance;
        if (loadGame)
        {
            stats.LoadData();
            StartCoroutine(loadMap());
        }
        else
        {
            stats.LoadData();
            stats.SetPointsTo(0);
        }


        #region GridLoading
        if (loadGame == false)
        {
            yield return(StartCoroutine(CreateButtonCells()));
        }
        else
        {
            if (DataSave.GetData() != null)
            {
                Debug.Log("load map");
                yield return(StartCoroutine(loadMap()));
            }
            else
            {
                yield return(StartCoroutine(CreateButtonCells()));

                _Timer.AddTime();
            }
        }
        #endregion
        Camera.main.transparencySortMode = TransparencySortMode.Orthographic;

        ui.Init();

        if (loadGame)
        {
            _Timer.SetTime(DataSave.GetData().time);
        }
        else
        {
            _Timer.StartTimer();
        }

        //Save();
        if (PlayerPrefs.HasKey("_tut2"))
        {
            ui.GetComponent <Canvas>().renderMode  = RenderMode.ScreenSpaceCamera;
            ui.GetComponent <Canvas>().worldCamera = Camera.main;
        }
    }