예제 #1
0
    /// <summary>
    /// Load terrain and water
    /// </summary>
    /// <param name="terrainRoot"></param>
    public void LoadTerrain()
    {
        Debug.Log("LoadTerrain:" + Time.time);
        //bz music
        CamControl.CreateCam(H.CamRTS);

        if (string.IsNullOrEmpty(Program.MyScreen1.TerraRoot))
        {
            //the default terrain
            Terreno = Terreno.CreateTerrain(Root.bayAndMountain1River, true);
        }
        else
        {
            //will create cvamera if is null
            Terreno = Terreno.CreateTerrain(Program.MyScreen1.TerraRoot);
        }

        if (WaterBody == null)
        {
            //at the Moment Water Small is not visible Apr1 2016. since the mirror was duplicating
            //the Draw calls
            _waterBody = General.Create(Root.waterSmall, new Vector3(0, 8, 0));
        }
        controllerMain = Create(Root.controllerMain, container: Program.ClassContainer.transform) as ControllerMain;
        Debug.Log("LoadTerrain:" + Time.time);
    }