Created
October 17, 2013 12:24
-
-
Save videlais/7023967 to your computer and use it in GitHub Desktop.
ActionScript 3 Example 4 PlayState Version 1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package | |
{ | |
/** | |
* ... | |
* @author Dan Cox | |
*/ | |
import org.flixel.*; | |
public class PlayState extends FlxState | |
{ | |
private var player:PlayerSprite; | |
private var map:MapTilemap; | |
public function PlayState() | |
{ | |
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