// Update is called once per frame
 void Update()
 {
     if (previousScore == Score)
     {
         return;
     }
     score.text = FarsiTextUtil.FixText(Score + " امتیاز ");
 }
 /// <summary>
 /// Update score text while the player zigs and zags
 /// </summary>
 void Update()
 {
     if (statType != StatType.Score)
     {
         StartCoroutine(nameof(WaitToDisplay));
     }
     else
     {
         txt.text = FarsiTextUtil.FixText(ProgressManager._score + " امتیاز ");
     }
 }
            /// <summary>
            /// Wait to fill in any text until the player data has been loaded
            /// </summary>
            IEnumerator WaitToDisplay()
            {
                while (DataStorage.LOADING_USER)
                {
                    yield return(null);
                }

                        #if UNITY_WEBGL
                        #elif !UNITY_WEBGL
                switch (statType)
                {
                case StatType.HighScore:
                    txt.text = FarsiTextUtil.FixText("بیشترین امتیاز : " + ProgressManager.HighScore);
                    break;

                case StatType.Attempts:
                    txt.text = FarsiTextUtil.FixText("تعداد بازی : " + ProgressManager.Attempts);
                    break;

                case StatType.Score:
                    txt.text = FarsiTextUtil.FixText("امتیاز : " + ProgressManager.Score);
                    break;

                case StatType.About:
                    txt.text = FarsiTextUtil.FixText(
                        "بازی زیگزاگ \n قدرت گرفته از ");
                    break;

                case StatType.Start:
                    txt.text = FarsiTextUtil.FixText("شروع بازی");
                    break;

                case StatType.Continue:
                    txt.text = FarsiTextUtil.FixText("دوباره");
                    break;

                case StatType.GameName:
                    txt.text = FarsiTextUtil.FixText("زیگزاگ");
                    break;

                case StatType.GameDescription:
                    txt.text = FarsiTextUtil.FixText("قدرت گرفته از");
                    break;

                default:
                    throw new ArgumentOutOfRangeException();
                }
                        #endif
            }
    private void Start()
    {
        Text = GetComponent <Text>();
        switch (Type)
        {
        case TextType.Restart:
            Text.text = FarsiTextUtil.FixText("دوباره");
            break;

        case TextType.Play:
            Text.text = FarsiTextUtil.FixText("شروع");
            break;

        case TextType.Achievement:
            Text.text = FarsiTextUtil.FixText("دستاورد ها");
            break;

        case TextType.LeaderBoard:
            Text.text = FarsiTextUtil.FixText("لیست های مقایسه ای");
            break;

        case TextType.Survey:
            Text.text = FarsiTextUtil.FixText("نظر سنجی");
            break;

        case TextType.GameOver:
            Text.text = FarsiTextUtil.FixText("باختی!!");
            break;

        case TextType.Des:
            Text.text = FarsiTextUtil.FixText("پرنده جهنده");
            break;

        default:
            break;
        }
    }