public void LoadLevel(ContentState state)
        {
            _instance = this;
            this.state = state;
            ObjectComposer.level = _level;
            List<ObjectComposer> allComposers = new List<ObjectComposer>();
            // Switch driven developement
            if (_level == 1)
            {
                AddObjects("FlatGround", state, allComposers);
                AddObjects("Sky", state, allComposers, false)[0].AppendMaterialLights(MaterialManager.InfiniteLight);
                AddObjects("Rock", state, allComposers);
                AddObjects("Stone", state, allComposers);
                AddObjects("StartStone", state, allComposers);
                AddObjects("HagravenSticks", state, allComposers);
                AddObjects("FalmerTotem", state, allComposers);
                AddObjects("Altar", state, allComposers);
                AddObjects("FlatGround", state, allComposers);
                AddObjects("MountainPeak", state, allComposers).ForEach(composer => composer.AppendMaterialLights(MaterialManager.BackgroundLights));
                AddObjects("MountainRidge", state, allComposers).ForEach(composer => composer.AppendMaterialLights(MaterialManager.BackgroundLights));
            }
            else if (_level == 2)
            {
                AddObjects("Altar", state, allComposers);
                AddObjects("StartStone", state, allComposers);
                AddObjects("RockBridge1", state, allComposers);
                AddObjects("RockBridge2", state, allComposers);
                AddObjects("RockBridge3", state, allComposers);
                AddObjects("RockBridge4", state, allComposers);
                AddObjects("StonePillar1", state, allComposers);
                AddObjects("StonePillar2", state, allComposers);
                AddObjects("StonePillar3", state, allComposers);
                AddObjects("Monster1a", state, allComposers);
                AddObjects("Monster1b", state, allComposers);
            }
            else if (_level == 3)
            {
                AddObjects("Altar", state, allComposers);
                AddObjects("StartStone", state, allComposers);
                AddObjects("FrozenMarshIceFloe1", state, allComposers);
                AddObjects("FrozenMarshIceFloe2", state, allComposers);
                AddObjects("Water", state, allComposers);
                AddObjects("Iceberg", state, allComposers);
                AddObjects("GlacierPillar1", state, allComposers);
            }

            SetParticles(state);
        }
예제 #2
0
	    public void LoadLevel(int i)
	    {
            currentScene = new TestScene(Content, camera, i);
            currentScene.LoadLevel(contentState);
            SetScene(currentScene);

            GameObject cameraDummy = ObjectComposer.Compose(currentScene, contentState)
                .AppendName("player")
                .AppendColliderSphere(2, 1)
                .AppendPhysicsDamping(0.989f, 0.3f)
                .AppendColliderWorld(Vector3.Up * 10)
                .Finish();

            Camera.MakeCamera(camera, cameraDummy);
            HandController.MakeController(Camera.instance, currentScene, contentState);
	    }
예제 #3
0
	    public void SetScene(TestScene nextScene)
		{
			currentScene = nextScene;
		}