Example #1
0
    protected override void Anim(float progress)
    {
        var from = GetFrom();
        var to   = GetTo();

        float x = easingFunction.Invoke(from.x, to.x, progress);
        float y = easingFunction.Invoke(from.y, to.y, progress);
        float z = easingFunction.Invoke(from.z, to.z, progress);

        var result = new Vector3(x, y, z);

        transform.localScale = result;
    }
Example #2
0
    protected override void Anim(float progress)
    {
        var from = GetFrom();
        var to   = GetTo();

        float r = easingFunction.Invoke(from.r, to.r, progress);
        float g = easingFunction.Invoke(from.g, to.g, progress);
        float b = easingFunction.Invoke(from.b, to.b, progress);
        float a = easingFunction.Invoke(from.a, to.a, progress);

        var result = new Color(r, g, b, a);

        sprite.tint = result;
    }
Example #3
0
    protected override void Anim(float progress)
    {
        var from = GetFrom();
        var to   = GetTo();

        float deltaX = Mathf.DeltaAngle(from.x, to.x);
        float deltaY = Mathf.DeltaAngle(from.y, to.y);
        float deltaZ = Mathf.DeltaAngle(from.z, to.z);

        float x = easingFunction.Invoke(from.x, from.x + deltaX, progress);
        float y = easingFunction.Invoke(from.y, from.y + deltaY, progress);
        float z = easingFunction.Invoke(from.z, from.z + deltaZ, progress);

        var result = new Vector3(x, y, z);

        transform.localRotation = Quaternion.Euler(result);
    }