From 9abf05753af37db72d75428bb7b383503b86f06f Mon Sep 17 00:00:00 2001 From: Evan Hemsley Date: Tue, 21 Jul 2020 15:30:21 -0700 Subject: [PATCH] forgot to define BounceMessage --- .../pong/ball/bouncing/collision_dispatch.md | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/content/pong/ball/bouncing/collision_dispatch.md b/content/pong/ball/bouncing/collision_dispatch.md index 30e4cdc..538be3d 100644 --- a/content/pong/ball/bouncing/collision_dispatch.md +++ b/content/pong/ball/bouncing/collision_dispatch.md @@ -30,6 +30,28 @@ namespace PongFE.Components } ``` +We'll also need **PongFE/Messages/BounceMessage.cs**: + +```cs +using Encompass; +using PongFE.Components; + +namespace PongFE.Messages +{ + public struct BounceMessage : IMessage, IHasEntity + { + public Entity Entity { get; } + public HitOrientation HitOrientation { get; } + + public BounceMessage(Entity entity, HitOrientation hitOrientation) + { + Entity = entity; + HitOrientation = hitOrientation; + } + } +} +``` + In **PongFE/Engines/CollisionEngine.cs**: ```cs