public void SetOwner(ref PlayerCore owner) { this.projectileOwner = owner; if (!damageSelf && owner != null) { foreach (var collider in owner.GetComponents <Collider2D>()) { Physics2D.IgnoreCollision(gameObject.GetComponent <Collider2D>(), collider); } } }