Ejemplo n.º 1
0
    // 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> ();
    }
Ejemplo n.º 2
0
 void Start()
 {
     ball      = GameObject.FindGameObjectWithTag("ball");
     ballMover = ball.GetComponent <MoveBallnoPhysics> ();
 }