Showing results for
on haxeflixel.com...First, define our player's movement speed and deceleration amounts:
-
In your player class, above the constructor, add:
static inline var SPEED:Float = 100...
-
In your player class, above the constructor, add:
static inline var SPEED:Float = 100...
...var player = new FlxSprite();
player.loadGraphic("assets/player.png");
add(player);
HAXE
makeGraphic()
player.loadGraphic("assets/player.png");
add(player);
HAXE
makeGraphic()
...Important Methods
create()
This is where you setup and create all your state's objects; for example your level tilemaps, your player sprites, spawn...
create()
This is where you setup and create all your state's objects; for example your level tilemaps, your player sprites, spawn...
...Well, HaxeFlixel comes with a
FlxVirtualPad
class which we can use to accept touch input from the user and translate it into movement. Head...
FlxVirtualPad
class which we can use to accept touch input from the user and translate it into movement. Head...