public Girasol(TGCVector3 posicion, GameLogic logica, Plataforma plataforma)
        {
            base.Init(logica, plataforma);

            #region configurarObjeto

            float factorEscalado = 30.0f;
            girasol          = new TgcSceneLoader().loadSceneFromFile(GameModel.mediaDir + "modelos\\Girasol-TgcScene.xml").Meshes[0];
            girasol.Scale    = new TGCVector3(factorEscalado, factorEscalado, factorEscalado);
            girasol.Position = new TGCVector3(posicion.X - 8, posicion.Y + 35, posicion.Z - 10);
            girasol.RotateX(60);
            girasol.RotateY(90);
            girasol.RotateZ(90);
            girasol.Effect    = efecto;
            girasol.Technique = "RenderScene";

            tallo           = new TgcSceneLoader().loadSceneFromFile(GameModel.mediaDir + "modelos\\PlantaFinal-TgcScene.xml").Meshes[0];
            tallo.Scale     = new TGCVector3(factorEscalado * 0.5f, factorEscalado * 0.5f, factorEscalado * 0.5f);
            tallo.Position  = new TGCVector3(posicion.X, posicion.Y - 50, posicion.Z);  // new TGCVector3(500f, 200f, 1500f);
            tallo.Effect    = efecto;
            tallo.Technique = "RenderScene";

            #endregion

            #region manejarTiempo
            time           = new Timer(INTERVALO);
            time.Elapsed  += OnTimedEvent;
            time.AutoReset = true;
            time.Enabled   = true;
            #endregion

            PostProcess.agregarPostProcessObject(this);
        }
        public void Init(GameLogic logica, Plataforma plataformaSeleccionada)
        {
            this.logica = logica;
            plataforma  = plataformaSeleccionada;

            #region configurarEfecto
            efecto = TgcShaders.loadEffect(GameModel.shadersDir + "shaderPlanta.fx");
            #endregion
        }
Пример #3
0
        public Mina(TGCVector3 posicion, GameLogic logica, Plataforma plataforma)
        {
            base.Init(logica, plataforma);

            #region configurarObjeto
            mina           = new TgcSceneLoader().loadSceneFromFile(GameModel.mediaDir + "modelos\\Mina-TgcScene.xml").Meshes[0];
            mina.Scale     = new TGCVector3(35.5f, 35.5f, 35.5f);
            mina.Position  = new TGCVector3(posicion.X, posicion.Y - 35, posicion.Z - 50);
            mina.Effect    = efecto;
            mina.Technique = "RenderScene";
            #endregion

            Explosivo disparo = new Explosivo(new TGCVector3(posicion.X, posicion.Y - 40, posicion.Z + 20), logica, this);
            PostProcess.agregarPostProcessObject(this);
        }
        public Chile(TGCVector3 posicion, GameLogic logica, Plataforma plataforma)
        {
            base.Init(logica, plataforma);

            #region configurarObjeto
            float factorEscalado = 16.0f;
            chile           = new TgcSceneLoader().loadSceneFromFile(GameModel.mediaDir + "modelos\\Chile-TgcScene.xml").Meshes[0];
            chile.Scale     = new TGCVector3(factorEscalado, factorEscalado, factorEscalado);
            chile.Position  = new TGCVector3(posicion.X, posicion.Y - 40, posicion.Z + 20);
            chile.Effect    = efecto;
            chile.Technique = "Explosivo";

            haloFuego           = new TgcSceneLoader().loadSceneFromFile(GameModel.mediaDir + "modelos\\semiesfera-TgcScene.xml").Meshes[0];
            haloFuego.Scale     = new TGCVector3(100.5f, 100.5f, 100.5f);
            haloFuego.Effect    = efecto;
            haloFuego.Technique = "calado";
            haloFuego.Position  = new TGCVector3(posicion.X, 260, posicion.Z);
            #endregion

            Explosivo disparo = new Explosivo(new TGCVector3(posicion.X, posicion.Y - 40, posicion.Z + 20), logica, this);
            PostProcess.agregarPostProcessObject(this);
        }
Пример #5
0
        //float axisRotation = 0;
        //float ayisRotation = 0;
        //private const float AXIS_ROTATION_SPEED = 0.02f;
        #endregion

        public Congelador(TGCVector3 posicion, GameLogic logica, Plataforma plataforma)
        {
            base.Init(logica, plataforma);

            #region configurarObjeto
            float factorEscalado = 20.0f;
            congelador          = new TgcSceneLoader().loadSceneFromFile(GameModel.mediaDir + "modelos\\CANIONERO-TgcScene.xml").Meshes[0];
            congelador.Scale    = new TGCVector3(factorEscalado, factorEscalado, factorEscalado);
            congelador.Position = new TGCVector3(posicion.X, posicion.Y + 40, posicion.Z);
            congelador.RotateX(90);
            congelador.Effect    = efecto;
            congelador.Technique = "RenderSceneCongelada";

            tallo           = new TgcSceneLoader().loadSceneFromFile(GameModel.mediaDir + "modelos\\PlantaFinal-TgcScene.xml").Meshes[0];
            tallo.Scale     = new TGCVector3(factorEscalado * 0.75f, factorEscalado * 0.75f, factorEscalado * 0.75f);
            tallo.Position  = new TGCVector3(posicion.X, posicion.Y - 50, posicion.Z);
            tallo.Effect    = efecto;
            tallo.Technique = "RenderScene";
            #endregion

            PostProcess.agregarPostProcessObject(this);
        }