public void init()
        {
            Device device = GuiController.Instance.D3dDevice;
                sphere = new TgcBoundingSphere(posicion, EXPLOSION_RADIUS);

                sound = new TgcStaticSound();
                time = 0;

                int width = GuiController.Instance.Panel3d.Width;
                int height = GuiController.Instance.Panel3d.Height;

                int cantExplosion = 20;
                float particleTime = 1f, sizeMax = 2000f, expSpeed = 1f, expSizeSpeed = 20f; ;
                float expUpdateTime = 0;

                //Creo el emisor de explosion
                emisorExplosion = new ExplosionEmitter(cantExplosion, posicion, new Vector3(expSpeed, expSpeed, expSpeed), new Vector3(0.00f, 0.00f, 0.00f), 500f, sizeMax, particleTime, Color.White, 150, 0f, expUpdateTime, GameManager.Instance.random.Next(0, 1000), expSizeSpeed, 2);
                emisorExplosion.Init();

                int cantidad = 20;
                Vector3 origen1 = posicion;
                float speed = 5f;
                float divergence = 7f;
                Vector3 velocidad = new Vector3(divergence, speed, divergence);
                Vector3 aceleracion = new Vector3(0, 0, 0);
                float min = 500f, max = 1000f, tiempoVida_Particula = 1f;
                int alpha = 150;
                float spawn = 0.01f;
                float sizeSpeed = 1000f;
                float updateTime = 0.02f;

                //Creo los emisores de humo
                emisorHumo = new SmokeEmitter(cantidad, origen1, velocidad, aceleracion, min, max, tiempoVida_Particula, Color.DarkGray, alpha, spawn, updateTime, sizeSpeed);
                emisorHumo.Init();
        }
Example #2
0
        public override void Update_Modifiers(Emitter emisor)
        {
            SmokeEmitter e = (SmokeEmitter)emisor;

            if (e.SizeSpeed != this.SizeSpeed)
            {
                this.SizeSpeed = e.SizeSpeed;
            }
            base.Update_Modifiers(emisor);
        }
        public void init()
        {
            Device device = GuiController.Instance.D3dDevice;

            sphere = new TgcBoundingSphere(posicion, EXPLOSION_RADIUS);

            sound = new TgcStaticSound();
            time  = 0;

            int width  = GuiController.Instance.Panel3d.Width;
            int height = GuiController.Instance.Panel3d.Height;

            int   cantExplosion = 20;
            float particleTime = 1f, sizeMax = 2000f, expSpeed = 1f, expSizeSpeed = 20f;;
            float expUpdateTime = 0;

            //Creo el emisor de explosion
            emisorExplosion = new ExplosionEmitter(cantExplosion, posicion, new Vector3(expSpeed, expSpeed, expSpeed), new Vector3(0.00f, 0.00f, 0.00f), 500f, sizeMax, particleTime, Color.White, 150, 0f, expUpdateTime, GameManager.Instance.random.Next(0, 1000), expSizeSpeed, 2);
            emisorExplosion.Init();


            int     cantidad = 20;
            Vector3 origen1 = posicion;
            float   speed = 5f;
            float   divergence = 7f;
            Vector3 velocidad = new Vector3(divergence, speed, divergence);
            Vector3 aceleracion = new Vector3(0, 0, 0);
            float   min = 500f, max = 1000f, tiempoVida_Particula = 1f;
            int     alpha      = 150;
            float   spawn      = 0.01f;
            float   sizeSpeed  = 1000f;
            float   updateTime = 0.02f;

            //Creo los emisores de humo
            emisorHumo = new SmokeEmitter(cantidad, origen1, velocidad, aceleracion, min, max, tiempoVida_Particula, Color.DarkGray, alpha, spawn, updateTime, sizeSpeed);
            emisorHumo.Init();
        }
Example #4
0
        public override void init()
        {
            Device d3dDevice = GuiController.Instance.D3dDevice;

            SystemState_Particulas.Instance.SetState_Zero();

            //Relative Positioning
            width  = GuiController.Instance.Panel3d.Width;
            height = GuiController.Instance.Panel3d.Height;

            //Variables del humo
            int     cantidad = 100;                                 //Parametrizable
            Vector3 origen = new Vector3(width / 2, height / 2, 0); //Parametrizable
            float   speed = 0.03f;                                  //Parametrizable
            float   divergence = 0.005f;                            //Parametrizable
            Vector3 velocidad = new Vector3(divergence, speed, divergence);
            Vector3 aceleracion = new Vector3(0.00f, 0f, 0.00f);
            float   min = 0.1f, max = 20f, tiempoVida_Particula = 10f;//Parametrizables
            int     alpha      = 255;
            float   spawn      = 0.03f;
            float   sizeSpeed  = 0.14f;
            float   updateTime = 0.03f;

            //Inicializo el emisor de humo
            humo = new SmokeEmitter(cantidad, origen, velocidad, aceleracion, min, max, tiempoVida_Particula, Color.DarkGray, alpha, spawn, updateTime, sizeSpeed);

            //INIT
            humo.Init();
            humo.AgregarModifiers(width, height);

            //Camara
            GuiController.Instance.RotCamera.Enable = true;
            //GuiController.Instance.RotCamera.CameraDistance = 10;
            GuiController.Instance.BackgroundColor        = Color.Black;
            GuiController.Instance.RotCamera.CameraCenter = new Vector3(width / 2, height / 2, 0);
        }
Example #5
0
        public override void init()
        {
            Device d3dDevice = GuiController.Instance.D3dDevice;

            SystemState_Particulas.Instance.SetState_Zero();

            //Relative Positioning
            width = GuiController.Instance.Panel3d.Width;
            height = GuiController.Instance.Panel3d.Height;

            //Variables del humo
            int cantidad = 100;//Parametrizable
            Vector3 origen = new Vector3(width / 2, height / 2, 0);//Parametrizable
            float speed = 0.03f;//Parametrizable
            float divergence = 0.005f;//Parametrizable
            Vector3 velocidad = new Vector3(divergence, speed, divergence);
            Vector3 aceleracion = new Vector3(0.00f, 0f, 0.00f);
            float min = 0.1f, max = 20f, tiempoVida_Particula = 10f;//Parametrizables
            int alpha = 255;
            float spawn = 0.03f;
            float sizeSpeed = 0.14f;
            float updateTime = 0.03f;

            //Inicializo el emisor de humo
            humo = new SmokeEmitter(cantidad, origen, velocidad, aceleracion, min, max, tiempoVida_Particula, Color.DarkGray, alpha, spawn,updateTime,sizeSpeed);

            //INIT
            humo.Init();
            humo.AgregarModifiers(width, height);

            //Camara
            GuiController.Instance.RotCamera.Enable = true;
            //GuiController.Instance.RotCamera.CameraDistance = 10;
            GuiController.Instance.BackgroundColor = Color.Black;
            GuiController.Instance.RotCamera.CameraCenter = new Vector3(width / 2, height / 2, 0);
        }