Ejemplo n.º 1
0
    private IEnumerator ll_cr()
    {
        yield return(null);

        CfgLevel lcfg = _prog.GetLevelConfigByIndex(_index);

        _levelBuilder = GameObject.Instantiate(lcfg.m_content, Vector3.zero, Quaternion.identity) as LevelBuilder;
        foreach (TileHub th in _levelBuilder.gameObject.GetComponentsInChildren <TileHub>())
        {
            th.Init(_prog, _state);
        }
    }
Ejemplo n.º 2
0
 void ParseConfigBundle(string assetBundleId, ConfigBundle bundle)
 {
     for (int i = 0; i < bundle.m_levels.Count; ++i)
     {
         CfgLevel lcfg = bundle.m_levels[i];
         _levels.Add(lcfg);
         _levelSaveMap.Add(new KeyValuePair <string, int> (assetBundleId, i));
     }
     for (int i = 0; i < bundle.m_frog.Count; ++i)
     {
         CfgFrog fcfg = bundle.m_frog[i];
         _frogs.Add(fcfg);
     }
     _generalConfig = bundle.m_general;
 }
Ejemplo n.º 3
0
    public void LoadLevel(int i)
    {
        _gameState.m_currentLevel = i;

        CfgLevel lcfg = _prog.GetLevelConfigByIndex(_gameState.m_currentLevel);

        AudioSource aSrc = Camera.main.GetComponent <AudioSource> ();

        aSrc.clip = lcfg.m_music;
        aSrc.Play();

        _levelController.LoadLevel(_prog, _gameState, i);
        //_gameState.OnStartLevel ( _levelController );

        _ui.OnLevelChange();
    }