iTween.ApplyPunchScaleTargets C# (CSharp) Method

ApplyPunchScaleTargets() private method

private ApplyPunchScaleTargets ( ) : void
return void
    void ApplyPunchScaleTargets()
    {
        //calculate:
        if(vector3s[1].x>0){
            vector3s[2].x = punch(vector3s[1].x,percentage);
        }else if(vector3s[1].x<0){
            vector3s[2].x=-punch(Mathf.Abs(vector3s[1].x),percentage);
        }
        if(vector3s[1].y>0){
            vector3s[2].y=punch(vector3s[1].y,percentage);
        }else if(vector3s[1].y<0){
            vector3s[2].y=-punch(Mathf.Abs(vector3s[1].y),percentage);
        }
        if(vector3s[1].z>0){
            vector3s[2].z=punch(vector3s[1].z,percentage);
        }else if(vector3s[1].z<0){
            vector3s[2].z=-punch(Mathf.Abs(vector3s[1].z),percentage);
        }

        //apply:
        transform.localScale=vector3s[0]+vector3s[2];

        //dial in:
        /*
        if(percentage==1){
            transform.localScale=vector3s[0];
        }
        */
    }
iTween