Esempio n. 1
0
    public void CleanRank()
    {
        var list = ImitateRankManager.IORankData;

        list.Clear();
        ImitateRankManager.IORankData = list;
        ImitateRankManager.Init();
        ImitateUIService.Dialog("Developer: 排行榜已清空");
    }
Esempio n. 2
0
 void Start()
 {
     Application.targetFrameRate = 60;
     StaticData.Init();
     ImitateDecoImageManager.Init();
     ImitateRankManager.Init();
     UIEngine.Init();
     UIEngine.Forward <ImitateMainPage>();
     AudioManager.PlayBgm("main");
 }
Esempio n. 3
0
    public async void RateAsync()
    {
        Text_score.text = "...";
        CleanDetailData();
        SetupRating();
        try
        {
            var result = await ImitateManager.RateAsync();

            var json = JsonMapper.Instance.ToJson(result);
            Debug.Log(json);

            PlayScoreAnimation(result.score);
            // detail tab
            var dataRowList = ResultToDetailRowList(result);
            SetDetailData(dataRowList);
            // 记录
            var row = new RankRowData()
            {
                name  = "你",
                icon  = "icon1",
                score = result.score,
            };
            ImitateRankManager.IOInsertRow(row);

            // 是否通关判断
            if (result.score >= 40)
            {
                ImitateLevelManager.levelIndex++;
                if (ImitateLevelManager.levelIndex >= 3)
                {
                    ImitateLevelManager.levelIndex = 0;
                    SetupReturn();
                }
                else
                {
                    SetupPass();
                }
            }
            else
            {
                SetupNotPass();
            }
        }
        catch
        {
            Text_score.text = "0%";
            SetupNotPass();
            throw;
        }
    }