Game Development Reference
Figure 4-13. Spawning the Ball actor rule
Brick Rules and Behaviors
There will be only one rule for the brick actor. The rule will detect a collision with
the ball and then destroy the actor and decrement the brickCount attribute.
Click Create Rule and add the condition ''Actor receives event'' ''overlaps or
collides'' with ''actor of type'' ''Ball.'' Drag and drop a Destroy behavior. Drag
and drop a Change Attribute behavior and change game.BrickCount to
game.BrickCount-1. Your rule should be similar to Figure 4-14.