Beispiel #1
0
    private void OnCollisionEnter2D(Collision2D collision)
    {
        GameObject other = collision.gameObject;

        if (other.tag == "PhotonLight" || other.tag == "PhotonDark")
        {
            Photon ph = other.GetComponent <Photon>();
            if (!ph.m_heldPower && !m_dualTakenFix)
            {
                m_dualTakenFix = true;
                ph.ObtainPower(this);
                m_Owner.Taken();
                Destroy(gameObject);
            }
        }
    }