Exemplo n.º 1
0
    public void CreateLevel()
    {
        // Local level variable to predict how much platforms_count will be in the future
        int predicted_level = levels_passed.v;

        // Update the real level progress data
        SODict level_difficulty_elem = GetElemByLevel.Get(levels_passed.v, difficulty_list);

        int level_platforms_count = (level_difficulty_elem.v["platforms_count"] as IntVariable).v;

        // Create tiles
        for (int i = 0; i < level_platforms_count + extra_platforms; i++)
        {
            dist_z += height_step;
            CreateNextTile();
        }

        currlevel_platforms_count.v = (level_difficulty_elem.v["platforms_count"] as IntVariable).v;

        currlevel_platforms_passed.v = 0;
    }
Exemplo n.º 2
0
    public void SetCoinsByList(IntVariable levels_passed)
    {
        SODict elem = GetElemByLevel.Get(levels_passed.v - 1, difficulty_list);

        coins = (elem.v["coins"] as IntVariable).v;
    }