LevelController.addEndingSection C# (CSharp) Method

addEndingSection() private method

private addEndingSection ( ) : void
return void
    private void addEndingSection()
    {
        GameObject lastSection = ((GameObject) currentPath [currentPath.Count-1]);
        Vector3 pos = lastSection.transform.position;
        pos.z += lastSection.GetComponent<SectionController>().Length/2;
        GameObject caveInstance = (GameObject) Instantiate(endCave, pos, Quaternion.identity);
        caveInstance.transform.position = pos;
    }