bump remove

pull/1/head
Evan Hemsley 2019-06-08 15:07:38 -07:00
parent 12db507cc3
commit cb2623fdd6
1 changed files with 4 additions and 0 deletions

View File

@ -45,6 +45,8 @@ export interface World {
move(table: table, x: number, y: number): [number, number, Collision[], number]; move(table: table, x: number, y: number): [number, number, Collision[], number];
update(table: table, x: number, y: number, width?: number, height?: number): void; 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. "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: Inspecting the contents of _cols_ in the bump.lua documentation gives us the following types and interfaces:
```ts ```ts