Beispiel #1
0
        public static void TriggerAnimation(string shader, int duration, ShaderParameters start, ShaderParameters middle, ShaderParameters end)
        {
            bool exists = false;

            foreach (ShaderAnimation ani in animations)
            {
                if (ani.shader == shader)
                {
                    exists = true;
                }
            }

            if (!exists)
            {
                ShaderAnimation animation = new ShaderAnimation(shader, duration);
                animation.start  = start;
                animation.middle = middle;
                animation.end    = end;

                try
                {
                    animations.Add(animation);
                }
                catch
                {
                }
            }

            /*
             * rippleEffect.Parameters["center"].SetValue(new Vector2(0.8f, 0.8f));   // new Vector2(0.8f,0.8f)
             * rippleEffect.Parameters["amplitude"].SetValue(0.01f);  // 0.1
             * rippleEffect.Parameters["frequency"].SetValue(10);
             * rippleEffect.Parameters["phase"].SetValue(floodWaveTicks);
             */
        }
        public static void TriggerAnimation(string shader, int duration, ShaderParameters start, ShaderParameters middle, ShaderParameters end)
        {
            bool exists = false;
            foreach (ShaderAnimation ani in animations)
            {
                if (ani.shader == shader)
                {
                    exists = true;
                }
            }

            if (!exists)
            {
                ShaderAnimation animation = new ShaderAnimation(shader, duration);
                animation.start = start;
                animation.middle = middle;
                animation.end = end;

                try
                {
                    animations.Add(animation);
                }
                catch
                {
                }
            }
            /*
            rippleEffect.Parameters["center"].SetValue(new Vector2(0.8f, 0.8f));   // new Vector2(0.8f,0.8f)
            rippleEffect.Parameters["amplitude"].SetValue(0.01f);  // 0.1
            rippleEffect.Parameters["frequency"].SetValue(10);
            rippleEffect.Parameters["phase"].SetValue(floodWaveTicks);
            */
        }