Exemplo n.º 1
0
        public override void Init()
        {
            StaticSceneObjects.Clear();
            NonStaticSceneObjects.Clear();

            LightPosition      = new TGCVector3(0, 80000, -6 * skyBoxDimensions.X);
            lightBox           = TGCBox.fromSize(TGCVector3.One * 500, Color.Red);
            lightBox.Transform = TGCMatrix.Translation(LightPosition);

            InitFog();
            InitMainMeshes();
            InitHUD();
            LoadMainScene();
            ManageFocus();
            spawnManager = new SpawnManager(this);
            SetCamera();

            //DirectSound.ListenerTracking = Player.Meshes[0]; // Alguno de los meshes del player, cumplen con la interfaz ITransformObject

            LightPosition      = new TGCVector3(0, 8000, -5 * heightMaps[0].XZRadius);
            lightBox           = TGCBox.fromSize(TGCVector3.One * 500, Color.Red);
            lightBox.Transform = TGCMatrix.Translation(LightPosition);

            ScenesQuadTree.create(StaticSceneObjects, new TgcBoundingAxisAlignBox(SueloDelMar.centre - new TGCVector3(SueloDelMar.XZRadius, 3000, SueloDelMar.XZRadius), SueloDelMar.centre + new TGCVector3(SueloDelMar.XZRadius, 5000, SueloDelMar.XZRadius)));
            ScenesQuadTree.createDebugQuadTreeMeshes();

            InitFullQuadVB();
            InitAuxRenderTarget();
            InitGogleViewEffectResources();
            InitSounds();
            InitBubbleEmitter();

            InPrincipalMenu = true;
            FocusInGame     = false;
            MouseEnable();

            AmbientMusic.play(true);
        }
Exemplo n.º 2
0
 private void UpdateInstantiatedObjects()
 {
     StaticSceneObjects.RemoveAll(obj => removedObjects.Contains(obj));
     NonStaticSceneObjects.RemoveAll(obj => removedObjects.Contains(obj));
     removedObjects.Clear();
 }
Exemplo n.º 3
0
 public void InstanceStaticSceneObject(StaticObject obj)
 {
     StaticSceneObjects.Add(obj);
 }