Exemple #1
0
        public override void Oscillate(TTarget target, OscillationSettings[] settings, int flags, float time)
        {
            var value = Getter(target);
            var axes  = (Axes)flags;

            if ((axes & Axes.X) != 0)
            {
                value.x = OscillationUtility.Oscillate(settings[0], time);
            }
            if ((axes & Axes.Y) != 0)
            {
                value.y = OscillationUtility.Oscillate(settings[1], time);
            }

            Setter(target, value);
        }
Exemple #2
0
        public override void Oscillate(TTarget target, OscillationSettings[] settings, int flags, float time)
        {
            var value    = Getter(target);
            var channels = (Channels)flags;

            if ((channels & Channels.R) != 0)
            {
                value.r = OscillationUtility.Oscillate(settings[0], time);
            }
            if ((channels & Channels.G) != 0)
            {
                value.g = OscillationUtility.Oscillate(settings[1], time);
            }
            if ((channels & Channels.B) != 0)
            {
                value.b = OscillationUtility.Oscillate(settings[2], time);
            }
            if ((channels & Channels.A) != 0)
            {
                value.a = OscillationUtility.Oscillate(settings[3], time);
            }

            Setter(target, value);
        }
Exemple #3
0
 public override void Oscillate(TTarget target, OscillationSettings[] settings, int flags, float time)
 {
     Setter(target, OscillationUtility.Oscillate(settings[0], time));
 }