Exemplo n.º 1
0
    public EnumLevelState currentLevelState;            //of the level that just finished, not written to server yet.

    private void BattleGrade(int score)
    {
        string levelName = LevelManager.Singleton.CurrentLevel;

        LevelData ld = _levelConfig.GetLevelData(levelName);

        if (_consumeTime <= ld.minTime)
        {
            currentLevelState = EnumLevelState.S;
        }
        else
        if (_consumeTime <= ld.minTime + (ld.maxTime - ld.minTime) / 3)
        {
            currentLevelState = EnumLevelState.A;
        }
        else
        if (_consumeTime <= ld.minTime + (ld.maxTime - ld.minTime) * 2 / 3)
        {
            currentLevelState = EnumLevelState.B;
        }
        else
        if (_consumeTime < ld.maxTime)
        {
            currentLevelState = EnumLevelState.C;
        }
        else
        {
            currentLevelState = EnumLevelState.D;
        }
    }
Exemplo n.º 2
0
 private void Start()
 {
     WindowMgr.instance.ShowWindow <DialogWindow>(false).Init(0, 5, () => { });
     MainMgr.instance.PlayBackGroupAudio(2);
     _levelData        = LevelConfig.GetLevelData(1);
     monsterSpawnIndex = 0;
     Game.instance.DisplayNum(monsterSpawnIndex + 1, _levelData.monsterIdList.Count);
     Game.instance.ShowCrystalCnt();
     Game.instance.DisplayCoin();
 }