Ejemplo n.º 1
0
    private void CheckGameComplete()
    {
        SaveProcess();
        bool      isFinish = true;
        Transform group    = wordGroup.transform;

        for (int i = 1; i < group.childCount; i++)
        {
            Cell cell = group.GetChild(i).GetComponent <Cell> ();
            if (cell.isShown == false)
            {
                isFinish = false;
                break;
            }
        }
        if (isFinish)
        {
            hint.HintData();
            //处理数据
            CSVReadManager.Instance.crossyData = new CrossyData();
            GameState.crossyLevel++;
            PlayerDataManager.Instance.playerData.crossyLevelID  = GameState.crossyLevel;
            PlayerDataManager.Instance.playerData.isCrossyFinish = true;
            PlayerDataManager.Instance.playerData.crossyCount++;
            PlayerDataManager.Instance.JudeReachAchieve(12, PlayerDataManager.Instance.playerData.crossyCount);
            PlayerPrefs.DeleteKey("crossy_progress");
            Timer.Schedule(this, 1f, () => {
                DialogController.instance.ShowDialog(DialogType.DailyWin);
            });
            hint.HintData();
        }
    }
Ejemplo n.º 2
0
    private void CheckGameComplete()
    {
        SaveLevelProgress();
        ////forteset
        //string isNotShown = null;
        var isNotShown = lines.Find(x => !x.isShown);

        if (isNotShown == null)
        {
            ClearLevelProgress();

            MainController.instance.OnComplete();

            //统计提示点击次数
            if (EventTrackingController.instance != null)
            {
                hint.HintData();
                if (mExtraWordClickCount > 0)
                {
                    EventTrackingController.instance.LogExtraWordClickEvent(mExtraWordClickCount);
                }
            }
            mExtraWordClickCount = 0;
            //if (lines.Count >= 6) {
            //    compliment.ShowRandom ();
            //}
        }
    }
Ejemplo n.º 3
0
 public void CheckGameComplete()
 {
     Timer.Schedule(this, 0.6f, () => {
         SaveProcess();
     });
     if (notPlaceRightBlock.Count == 0)
     {
         hint.HintData();
         CSVReadManager.Instance.puzzleData = new PuzzleData();
         GameState.puzzleLevel++;
         PlayerDataManager.Instance.playerData.puzzleLevelID  = GameState.puzzleLevel;
         PlayerDataManager.Instance.playerData.isPuzzleFinish = true;
         PlayerDataManager.Instance.playerData.puzzleCount++;
         PlayerDataManager.Instance.JudeReachAchieve(13, PlayerDataManager.Instance.playerData.puzzleCount);
         Timer.Schedule(this, 1, () => {
             TextManager.Instance.DeleteFile("PuzzleProgress.json");
             DialogController.instance.ShowDialog(DialogType.DailyWin);
         });
     }
     else if (place.Count == totalPlaceCount)
     {
         foreach (BlockParentManager item in place)
         {
             item.ShowBlocksWrong();
         }
     }
 }
Ejemplo n.º 4
0
    private void CheckGameComplete()
    {
        SaveProgress();
        if (answer.Count <= 0)
        {
            hint.HintData();
            //处理数据
            CSVReadManager.Instance.searchData = new SearchData();
            GameState.searchLevel++;
            PlayerDataManager.Instance.playerData.searchLevelID  = GameState.searchLevel;
            PlayerDataManager.Instance.playerData.isSearchFinish = true;
            TextManager.Instance.DeleteFile(path);

            PlayerDataManager.Instance.playerData.searchCount++;
            PlayerDataManager.Instance.JudeReachAchieve(10, PlayerDataManager.Instance.playerData.searchCount);
            Timer.Schedule(this, 1, () => {
                DialogController.instance.ShowDialog(DialogType.DailyWin);
            });
        }
    }
Ejemplo n.º 5
0
    public void CheckGameComplete()
    {
        SaveProcess();
        PictureLetter pic = select.Find(x => x.isShowing == false);

        if (pic == null)
        {
            PictureLetter notRight = select.Find(x => x.rightLetter != x.letter.text);
            if (notRight == null)
            {
                hint.HintData();
                for (int j = 0; j < select.Count; j++)
                {
                    select[j].ShowColorChange(new Color(115f / 255f, 251f / 255f, 205f / 255f), false);
                }
                //处理数据
                GameState.pictureLevel++;
                PlayerDataManager.Instance.playerData.pictureLevelID = GameState.pictureLevel;
                TextManager.Instance.DeleteFile("PictureProgress.json");
                PlayerDataManager.Instance.playerData.isPictureFinish = true;
                PlayerDataManager.Instance.playerData.pictureCount++;
                PlayerDataManager.Instance.JudeReachAchieve(11, PlayerDataManager.Instance.playerData.pictureCount);

                Timer.Schedule(this, 2, () => {
                    DialogController.instance.ShowDialog(DialogType.DailyWin);
                });
            }
            else
            {
                for (int j = 0; j < select.Count; j++)
                {
                    select[j].ShowColorChange(Color.red);
                }
            }
        }
    }