public override void init() { Device d3dDevice = GuiController.Instance.D3dDevice; terrain = new Terrain(); skeletal = new SkeletalRepresentation(terrain.getPosition(477, 129)); tree = new Tree(terrain.getPosition(420, 129), new Vector3(5,7,5),new Vector3(0,0,0)); wall = new Wall(terrain.getPosition(200, 337), new Vector3(500,100,50)); effect = TgcShaders.loadEffect(CommandosUI.Instance.ShadersDir + "shaders.fx"); skeletal.Effect = effect; terrain.Effect = effect; wall.Effect = effect; tree.Effect = effect; GuiController.Instance.Modifiers.addFloat("timeSpeed", 0.01f, 0.5f, 0.25f); new StandardCamera(); //initShadows(d3dDevice); }
public override void init() { Microsoft.DirectX.Direct3D.Device d3dDevice = GuiController.Instance.D3dDevice; String mediaDir = CommandosUI.Instance.MediaDir; Terrain terrain = new Terrain( mediaDir+"Heightmaps\\"+"HeightmapParedes.jpg", mediaDir + "Heightmaps\\"+"TexturaParedes.jpg", 10f, 0.4f); nivel = new Level(terrain); commando = new Commando(terrain.getPosition(200, 200)); nivel.add(commando); commando.Life.Infinite = true; Vector3[] waitpoints = new Vector3[1]; terrain.heightmapCoordsToXYZ(new Vector2(60, 60), out waitpoints[0]); //terrain.heightmapCoordsToXYZ(new Vector2(22, 80), out waitpoints[1]); //terrain.heightmapCoordsToXYZ(new Vector2(10, 37), out waitpoints[2]); enemigo = new Enemy(new Vector3(0,0,0)); nivel.add(enemigo); //Seleccion multiple selection = new Selection(nivel.Characters, nivel.Terrain); //Movimiento por picking picking = new MovementPicking(nivel.Terrain); GuiController.Instance.Modifiers.addFloat("RadioVision", 0, 500, 100); GuiController.Instance.Modifiers.addFloat("AnguloVision", 0, 90, 45); GuiController.Instance.Modifiers.addBoolean("Direccion", "Mostrar", false); GuiController.Instance.Modifiers.addVertex3f("posicionEnemigo", new Vector3(-1000, -1000, -1000), new Vector3(1000, 1000, 1000), new Vector3(400, 0, 100)); GuiController.Instance.Modifiers.addFloat("RotacionEnemigo", 0, 360, 0); previousAngle = 0; new StandardCamera(); nivel.CullingEnabled = false; }