public virtual void OnTriggerEnter2D(Collider2D other) { ShooterEntity shooter = other.gameObject.GetComponent <ShooterEntity>(); if ((shooter != null && shooter.type != this.type && ownerPool) || other.gameObject.tag == "shootLimit") { if (shooter != null && shooter.type == CharacterType.npc && this.type == CharacterType.player) { return; } if (ownerSpawner) { ownerSpawner.DeleteCurrentShoot(this.gameObject); ownerSpawner = null; } ownerPool.RecycleObject(this.gameObject); } }