Skip to content

Instantly share code, notes, and snippets.

@videlais
Created October 20, 2013 03:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save videlais/7064712 to your computer and use it in GitHub Desktop.
Save videlais/7064712 to your computer and use it in GitHub Desktop.
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