Beispiel #1
0
    void OnCollisionEnter(Collision collision)
    {
        Debug.Log("Score detected!");



        Destroy(ball);
        Debug.Log("Ball destroyed!");



        //set next direction of ball
        ballscript.SetPlayerDirection(scorer.name);

        //update scores
        StartCoroutine(manager.UpdateScore(scorer));
    }