From cb2623fdd63b529c84f050ae42ad2796bd572422 Mon Sep 17 00:00:00 2001 From: Evan Hemsley <2342303+ehemsley@users.noreply.github.com> Date: Sat, 8 Jun 2019 15:07:38 -0700 Subject: [PATCH] bump remove --- content/pong/ball/bouncing/library_integration.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/content/pong/ball/bouncing/library_integration.md b/content/pong/ball/bouncing/library_integration.md index 412f336..18fcf03 100644 --- a/content/pong/ball/bouncing/library_integration.md +++ b/content/pong/ball/bouncing/library_integration.md @@ -45,6 +45,8 @@ export interface World { move(table: table, x: number, y: number): [number, number, Collision[], number]; update(table: table, x: number, y: number, width?: number, height?: number): void; + + remove(table: table): void; } ``` @@ -56,6 +58,8 @@ In Lua, *table* is our generic object. All of our classes and other objects are "check" and "move" return four variables. The first two are _actualX_ and _actualY_, which are the new positions after the move. The next is _cols_, which is a list of collisions detected during the move. The final is _len_, which is the total amount of collisions detected. +"remove" takes a table and removes it from the world. This is used when objects are destroyed and no longer exist in the game. + Inspecting the contents of _cols_ in the bump.lua documentation gives us the following types and interfaces: ```ts