Exemplo n.º 1
0
        public static Coroutine FloatTo(this AudioMixer audioMixer, string name, float to, float duration, EaseMethod ease)
        {
            var from = 0f;

            if (!audioMixer.GetFloat(name, out from))
            {
                throw new System.Exception($"Audio Mixer doesn't have a float called '{name} or is currently being edited.'");
            }
            return(Coroutween.To(from, to, duration, ease, x => audioMixer.SetFloat(name, x)));
        }
Exemplo n.º 2
0
 public static Coroutine ColorTo(this Light light, Color to, float duration, EaseType ease)
 {
     return(Coroutween.To(light.color, to, duration, ease, x => light.color = x));
 }
Exemplo n.º 3
0
 public static Coroutine IntensityTo(this Light light, float to, float duration, EaseMethod ease)
 {
     return(Coroutween.To(light.intensity, to, duration, ease, x => light.intensity = x));
 }
Exemplo n.º 4
0
 public static Coroutine ShadowStrengthTo(this Light light, float to, float duration, EaseMethod ease)
 {
     return(Coroutween.To(light.shadowStrength, to, duration, ease, x => light.shadowStrength = x));
 }
Exemplo n.º 5
0
 public static Coroutine PitchTo(this AudioSource source, float to, float duration, EaseMethod ease)
 {
     return(Coroutween.To(source.pitch, to, duration, ease, x => source.pitch = x));
 }
Exemplo n.º 6
0
 public static Coroutine VolumeTo(this AudioSource source, float to, float duration, EaseType ease)
 {
     return(Coroutween.To(source.volume, to, duration, ease, x => source.volume = x));
 }
Exemplo n.º 7
0
 public static Coroutine PositionTo(this Transform transform, Vector3 to, float duration, EaseType ease)
 {
     return(Coroutween.To(transform.position, to, duration, ease, x => transform.position = x));
 }
Exemplo n.º 8
0
 public static Coroutine ScaleTo(this Transform transform, Vector3 to, float duration, EaseMethod ease)
 {
     return(Coroutween.To(transform.localScale, to, duration, ease, x => transform.localScale = x));
 }
Exemplo n.º 9
0
 public static Coroutine LookTo(this Transform transform, Vector3 to, Vector3 up, float duration, EaseMethod ease)
 {
     return(Coroutween.To(transform.rotation, Quaternion.LookRotation(to - transform.position, up), duration, ease, x => transform.localRotation = x));
 }
Exemplo n.º 10
0
 public static Coroutine LocalRotationTo(this Transform transform, Quaternion to, float duration, EaseMethod ease)
 {
     return(Coroutween.To(transform.localRotation, to, duration, ease, x => transform.localRotation = x));
 }
Exemplo n.º 11
0
 public static Coroutine RotationTo(this Transform transform, Quaternion to, float duration, EaseType ease)
 {
     return(Coroutween.To(transform.rotation, to, duration, ease, x => transform.rotation = x));
 }
Exemplo n.º 12
0
 public static Coroutine BackgroundColorTo(this Camera camera, Color to, float duration, EaseType ease)
 {
     return(Coroutween.To(camera.backgroundColor, to, duration, ease, x => camera.backgroundColor = x));
 }
Exemplo n.º 13
0
 public static Coroutine FieldOfViewTo(this Camera camera, float to, float duration, EaseMethod ease)
 {
     return(Coroutween.To(camera.fieldOfView, to, duration, ease, x => camera.fieldOfView = x));
 }