Warp.scaleTimer C# (CSharp) Method

scaleTimer() public method

public scaleTimer ( ) : void
return void
    public void scaleTimer()
    {
        timePassed += Time.deltaTime;
        if (timePassed <= changeTime && timePassed >= 0.0F) {
            interpolant = timePassed/changeTime;
            if (interpolant >= 1.0F){
                interpolant = 1.0F;
            }
            transform.localScale = Vector3.Lerp (origScale, origScale + deltaScale, interpolant);
        } else if (timePassed >= duration - changeTime && timePassed <= duration) {
            interpolant = (timePassed - (duration - changeTime))/changeTime;
            if (interpolant >= 1.0F){
                interpolant = 1.0F;
            }
            if (transform.localScale != origScale)
            {
                transform.localScale = Vector3.Lerp(origScale + deltaScale, origScale, interpolant);
            }
        }
    }