// Use this for initialization void Start() { transform.position = startPas.transform.position; transform.rotation = startPas.transform.rotation; currentPosition = startPas.transform.position; currentDegree = transform.localEulerAngles; nextPas = startPas; movePasScript = nextPas.GetComponent <MovePasScript>(); currentToa = movePasScript.Pass[0].nextToa; }
// Update is called once per frame void Update() { frametime = Time.deltaTime; movePasScript = nextPas.GetComponent <MovePasScript>(); if (isGOGOGO && !isMove) { currentToa = nextToa; nextToa = movePasScript.getNextToa(); nextPas = movePasScript.getNextPas(); isMove = true; } move(); Rotate(); go(); }