Showing results for

player

movement

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