From 112bf56c8845edbb73eb60a628600c2e27c05020 Mon Sep 17 00:00:00 2001 From: Evan Hemsley Date: Mon, 27 Jul 2020 14:07:48 -0700 Subject: [PATCH] forgot to mention clearing the moveamounts --- content/pong/ball/bouncing/motion_engine.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/content/pong/ball/bouncing/motion_engine.md b/content/pong/ball/bouncing/motion_engine.md index b501be7..f4726a4 100644 --- a/content/pong/ball/bouncing/motion_engine.md +++ b/content/pong/ball/bouncing/motion_engine.md @@ -83,6 +83,9 @@ Next, in a separate block, let's consolidate our MotionMessages per Entity. ... + _spatialHash.Clear(); + _moveAmounts.Clear(); + foreach (var entity in TrackedEntities) { ... @@ -235,7 +238,7 @@ Now, in the final block of our **MotionEngine**, we can perform our collision te { ... } - + foreach (ref readonly var entity in ReadEntities()) { ...