Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
ActionScript 3 Example 6 MapTilemap Version 1
package
{
/**
* ...
* @author Dan Cox
*/
import org.flixel.*;
public class MapTilemap extends FlxTilemap
{
[Embed(source = "data/tilemap.png")] private var tilemapPng:Class;
[Embed(source = "data/map1.txt", mimeType = "application/octet-stream")] private var mapTxt:Class;
public function MapTilemap()
{
loadMap(new mapTxt, tilemapPng, 16, 16, 0, 0, 0);
}
override public function update():void
{
FlxG.collide(Registry.player, this);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment