// Update is called once per frame void Update() { JsonFile altro = another.GetComponent <JsonFile>(); framerate fra = another.GetComponent <framerate>(); int rate = fra.frame_rate; Posi = altro.vet1(); //Debug.Log(Posi[1].x); //Posi = Pos(); int n = Posi.Count; if (i % rate == 0) { movimento = Posi[i / 100]; //Debug.Log("ciao"); transform.position = movimento; } i++; if (i > n * rate) { i = 0; } //Debug.Log(i); // Debug.Log(n); }
// Start is called before the first frame update public void Start() { //Debug.Log("ciao"); JsonFile altro = another.GetComponent <JsonFile>(); framerate fra = another.GetComponent <framerate>(); // int rate = fra.frame_rate; Posi = altro.vet1(); }