Beispiel #1
0
    private void OnCollisionEnter2D(Collision2D collision)
    {
        Photon other = collision.gameObject.GetComponent <Photon>();

        if (other)
        {
            other.Wall(m_Pos);
        }
    }
Beispiel #2
0
    private void OnTriggerEnter2D(Collider2D collision)
    {
        print("Hello");

        Photon other = collision.gameObject.GetComponent <Photon>();

        if (other)
        {
            other.Wall(m_Pos);
        }
    }