Пример #1
0
    private void OnTriggerEnter2D(Collider2D collision)
    {
        GameObject objectThing = collision.gameObject;

        if (objectThing.CompareTag("PlayerGRAY") || objectThing.CompareTag("PlayerPINK"))
        {
            PlayerStateManager.AddItems(type, value);
            Destroy(gameObject);
        }
    }