Created
October 15, 2013 19:16
-
-
Save videlais/6997113 to your computer and use it in GitHub Desktop.
ActionScript 3 Example 3 PlayState Version 5
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; | |
[Embed(source = "data/tilemap.png")] private var tilemapPng:Class; | |
private var mapData:Array = | |
[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, | |
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1, | |
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1, | |
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1, | |
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1, | |
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1, | |
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1, | |
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1, | |
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1, | |
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1, | |
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1, | |
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1, | |
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1, | |
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1, | |
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]; | |
public function PlayState() | |
{ | |
player = new PlayerSprite(); | |
add(player); | |
} | |
override public function update():void | |
{ | |
super.update(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment