Skip to content

Instantly share code, notes, and snippets.

@videlais
Created October 19, 2013 00:49
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/7050405 to your computer and use it in GitHub Desktop.
Save videlais/7050405 to your computer and use it in GitHub Desktop.
ActionScript 3 Example 5 PlayState Version 1
package
{
/**
* ...
* @author Dan Cox
*/
import org.flixel.*;
public class PlayState extends FlxState
{
private var player:PlayerSprite;
private var map:MapTilemap;
public function PlayState()
{
}
override public function create():void
{
map = new MapTilemap();
add(map);
player = new PlayerSprite(50,50);
add(player);
}
override public function update():void
{
super.update();
FlxG.collide(player, map);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment