// Use this for initialization void Start() { //find the ball object and assign it to a local variable ball = GameObject.FindGameObjectWithTag("ball"); //find the movement behaviour script component of the ball and store it in a local variable ballMovement = ball.GetComponent <MoveBallnoPhysics> (); //find the arena object and store it in a local variable arena = GameObject.FindGameObjectWithTag("arena"); //find the arena behaviour script and store it in a local variable arenaScript = arena.GetComponent <Arena> (); }
void Start() { ball = GameObject.FindGameObjectWithTag("ball"); ballMover = ball.GetComponent <MoveBallnoPhysics> (); }