var speed : float = 1.0;
private var started : boolean = false;
private var frame : int = 0;
private var curMovementScript : Movement_Current;
private var curObject : GameObject;

function init(){
	started = true;
}

function Start(){
	// Exchange "Current" with the tag of the current object, i.e. the present object
	curObject = GameObject.FindGameObjectWithTag("Current");
	curMovementScript = curObject.GetComponent(Movement_Current);
}

function Update () {
	if(started){
    var x_translation : float = curMovementScript.getPrevX(frame);
    var y_translation : float = curMovementScript.getPrevY(frame);
    
    //x_translation *= Time.deltaTime;
    //y_translation *= Time.deltaTime;
    
    // Move translation along the object's x-axis
    transform.Translate (x_translation, y_translation, 0);
    
    frame++;
    // Replace 49 with the number of frames to be saved - 1
    if(frame > 49)
    	frame = 0;
    
    }
}
