public static void StartGame()
 {
     Score.StopScore = false;
     Score.increeze();
     TapToGo.SetActiveScreen(true);
     StartStopWatch();
 }
 public static void StopGame()
 {
     ReverseMainParent.ReverseParent();
     Score.StopScore = true;
     speed           = 0;
     backgroundSpeed = 0;
     TapToGo.SetActiveScreen(false);
     StopStopWatch();
 }
 public static void SetDefaultVal()
 {
     setDefault();
     Storage.SetDefaultValue();
     Score.SetDefaultRecord();
     MessageSystemGameBlock.SetDefaultValue();
     Hint.SetDefaultValue();
     TapToGo.SetDefaulValue();
     OpenMenu.NumberOperation = 0;
 }
 public void OpenFailPanel()
 {
     Score.stop();
     TapToGo.SetActiveScreen(false);
     disableScreen.SetActive(false);
     Score.SetScoreFailPanel();
     failPanel.SetActive(true);
     MessageSystemGameBlock.ChangeLayerRight(0);
     StartCoroutine(FinishStopWatch());
     Question.DisableMenuAndQuestion();
     PauseGame.SetActivePause(false);
 }
    public IEnumerator PingPongPlayerAfterDeath()
    {
        inPingPong       = true;
        player.tag       = "InVisible";
        exitFromPingPong = false;
        TapToGo.SetActiveScreen(true);
        EnableCollider();

        int   count       = 5;
        float pingTime    = 0.2f;
        float changeColor = 0.6f;
        Image img         = player.GetComponent <Image>();

        SetVisibleImagePlayer(false);
        StartCoroutine(CheckOnVisible());
        while (count > 0)
        {
            count--;
            img.color = new Color(changeColor, changeColor, changeColor, 1);
            yield return(new WaitForSeconds(pingTime));

            img.color = new Color(1, 1, 1, 1);
            yield return(new WaitForSeconds(pingTime));

            if (exitFromPingPong)
            {
                inPingPong = false;
                break;
            }
        }
        SetVisibleImagePlayer(true);

        player.tag       = "Player";
        inPingPong       = false;
        exitFromPingPong = true;
    }