Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update 07-6-loading-the-tilemap.html.md #252

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions documentation/01_tutorial/07-6-loading-the-tilemap.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ One of the great things about using Ogmo with HaxeFlixel is that there is alread
var map:FlxOgmo3Loader;
var walls:FlxTilemap;
```
(`import flixel.tile.FlxTilemap;`)
(`import flixel.addons.editors.ogmo.FlxOgmo3Loader;`)

We're basically just creating an object to hold our Ogmo map, and then another one to hold the `FlxTilemap` that we will generate from the Ogmo map.

Expand Down Expand Up @@ -83,6 +85,7 @@ One of the great things about using Ogmo with HaxeFlixel is that there is alread
```haxe
FlxG.collide(player, walls);
```
(`import flixel.FlxG;`)

All this does is check for overlaps between our player and the walls tilemap each `update()` call. If there are any overlaps, the objects are automatically separated from each other.

Expand Down