예제 #1
0
        public virtual void Draw(_Camera camera)
        {
            if (multi >= 3 && !pode)
            {
                pode = true;
            }

            if (multi <= 0 && pode)
            {
                pode = false;
            }

            if (pode)
            {
                multi -= 0.003f;
            }
            else
            {
                multi += 0.003f;
            }


            this.device.SetVertexBuffer(this.buffer);

            //this.basicEffect.World = this.world;
            //this.basicEffect.View = camera.GetView();
            //this.basicEffect.Projection = camera.GetProjection();
            //this.basicEffect.TextureEnabled = true;
            //this.basicEffect.Texture = this.texture;

            this.effect.CurrentTechnique = this.effect.Techniques["Technique1"];
            this.effect.Parameters["World"].SetValue(this.world);
            this.effect.Parameters["View"].SetValue(camera.GetView());
            this.effect.Parameters["Projection"].SetValue(camera.GetProjection());
            this.effect.Parameters["colorTexture"].SetValue(this.texture);
            this.effect.Parameters["colorTextureSnow"].SetValue(this.texture2);
            //this.effect.Parameters["multi"].SetValue(this.multi);


            foreach (EffectPass pass in this.effect.CurrentTechnique.Passes)
            {
                pass.Apply();

                this.device.DrawUserPrimitives <VertexPositionTexture>(PrimitiveType.TriangleList,
                                                                       this.verts, 0, this.verts.Length / 3);
            }
        }
예제 #2
0
        public void Draw(_Camera camera)
        {
            this.effect.CurrentTechnique = this.effect.Techniques["Technique1"];
            this.effect.Parameters["World"].SetValue(world);
            this.effect.Parameters["View"].SetValue(camera.GetView());
            this.effect.Parameters["Projection"].SetValue(camera.GetProjection());
            this.effect.Parameters["colorTexture"].SetValue(colorTexture);
            this.effect.Parameters["colorTextureSnow"].SetValue(colorTextureSnow);
            //this.effect.Parameters["t"].SetValue(time);

            foreach (EffectPass pass in this.effect.CurrentTechnique.Passes)
            {
                pass.Apply();

                game.GraphicsDevice.DrawUserIndexedPrimitives <VertexPositionTexture>(PrimitiveType.TriangleList, this.verts, 0, this.verts.Length, this.indices, 0, this.indices.Length / 3);
            }
        }
예제 #3
0
        public virtual void Draw(_Camera camera)
        {
            this.device.SetVertexBuffer(this.buffer);

            this.effect.World          = this.world;
            this.effect.View           = camera.GetView();
            this.effect.Projection     = camera.GetProjection();
            this.effect.TextureEnabled = true;
            this.effect.Texture        = this.texture;

            foreach (EffectPass pass in this.effect.CurrentTechnique.Passes)
            {
                pass.Apply();

                this.device.DrawUserPrimitives <VertexPositionTexture>(PrimitiveType.TriangleList,
                                                                       this.verts, 0, this.verts.Length / 3);
            }
        }
예제 #4
0
        public virtual void Draw(_Camera camera)
        {
            this.device.SetVertexBuffer(this.vBuffer);

            this.effect.CurrentTechnique = this.effect.Techniques["Technique1"];
            this.effect.Parameters["World"].SetValue(this.world);
            this.effect.Parameters["View"].SetValue(camera.GetView());
            this.effect.Parameters["Projection"].SetValue(camera.GetProjection());
            this.effect.Parameters["seaTexture"].SetValue(this.texture);
            this.effect.Parameters["time"].SetValue(this.time);

            foreach (EffectPass pass in this.effect.CurrentTechnique.Passes)
            {
                pass.Apply();

                this.device.DrawUserIndexedPrimitives <VertexPositionTexture>(PrimitiveType.TriangleList,
                                                                              this.verts,
                                                                              0,
                                                                              this.verts.Length,
                                                                              this.indices,
                                                                              0,
                                                                              this.indices.Length / 3);
            }
        }