LevelController.Awake C# (CSharp) Method

Awake() private method

private Awake ( ) : void
return void
    void Awake()
    {
        //player = GameObject.Find("Player");
        main = this;
        GameObject[] loadedDynamicSections = Resources.LoadAll("Sections/Dynamic", typeof(GameObject)).Cast<GameObject>().ToArray();
        dynamicSections = new SortedList<float, GameObject>(loadedDynamicSections.Length);
        foreach (GameObject go in loadedDynamicSections)
        {
            float difficulty = go.GetComponent<SectionController>().difficulty;
            dynamicSections.Add(difficulty, go);
        }

        staticSections = Resources.LoadAll("Sections/Static", typeof(GameObject)).Cast<GameObject>().ToArray();
        spawnInitialSections();
    }