Ejemplo n.º 1
0
    private void DestroyBlocksInsideFireBall()
    {
        var hits = Physics.OverlapSphere(_fireBall.transform.position, _fireBall.transform.localScale.x * .5f);

        foreach (var hit in hits)
        {
            var block = hit.gameObject.GetComponentInChildren <Block>();
            if (block)
            {
                _worldPlane.RemoveAndDestroyBlock(block);
            }
        }
    }