void Start()
        {
            CreateSkybox();
            CreateDayClouds();
            CreateSun();
            CreateStars();
            CreateNightClouds();

            instance = this;
        }
Example #2
0
        public void SetScene(int id)
        {
            currentSceneID = id;
            currentScene   = Instantiate(demoScenes[id]) as GameObject;
            currentScene.transform.position = new Vector3((id + 1) * 50f, 1f, 0f);

            switch (DemoBackgroundManager.GetDayState())
            {
            case DemoBackgroundManager.DayState.day:
                DemoBackgroundManager.SetDayState(DemoBackgroundManager.DayState.night);
                break;

            case DemoBackgroundManager.DayState.night:
                DemoBackgroundManager.SetDayState(DemoBackgroundManager.DayState.day);
                break;
            }
        }