Now that we have bouncing capabilities, we can add them easily to other entities. Let's make boundary boxes that make the ball bounce off the sides of the game area.
**PongFE/Messages/BoundarySpawnMessage.cs**:
```cs
using Encompass;
using MoonTools.Structs;
namespace PongFE.Messages
{
public struct BoundarySpawnMessage : IMessage
{
public Position2D Position { get; }
public int Width { get; }
public int Height { get; }
public BoundarySpawnMessage(Position2D position, int width, int height)
{
Position = position;
Width = width;
Height = height;
}
}
}
```
**PongFE/Engines/BoundarySpawner.cs**:
```cs
using Encompass;
using PongFE.Components;
using PongFE.Messages;
namespace PongFE.Spawners
{
public class BoundarySpawner : Spawner<BoundarySpawnMessage>