protected void OnEnable() { var bounds = gameObject.GetComponent <Collider2D>().bounds; var bubbles = CastingUtil.BoundsBoxCast(bounds, 1 << (int)Layers.GameObjects); foreach (var bubble in bubbles) { ActivateBubble(bubble.transform.gameObject, true); } }
protected bool IsTouchingBubbles() { return(CastingUtil.BoundsBoxCast(castingBox.bounds, 1 << (int)Layers.GameObjects).Length > 0); }