Exemplo n.º 1
0
    // Start is called before the first frame update
    void Start()
    {
        sc_gamemanager = GameObject.Find("GameManager").GetComponent <GameManager_Pong>();

        v2_Startpos = transform.position;

        Launch();
    }
Exemplo n.º 2
0
 void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.name == "Ball")
     {
         string wallName = transform.name;
         GameManager_Pong.Score(wallName);
         collision.gameObject.SendMessage("RestartGame", 1.0f, SendMessageOptions.RequireReceiver);
     }
 }