class MenuState extends FlxState
{
public var player:FlxSprite;
public var trail:FlxTrail;
/**
* Function that is called up when to state is created to set it up.
*/
override public function create():Void
{
super.create();
player = new FlxSprite(FlxG.width * .5, FlxG.height * .5);
player.loadGraphic("assets/images/character.png", true);
player.animation.add("anim01", [0]);
player.animation.add("anim02", [1]);
add(player);
FlxTween.circularMotion(player, (FlxG.width * 0.5) - (player.width / 2), (FlxG.height * 0.5) - (player.height / 2), FlxG.width*.35, 359, true, 5, true, { type:FlxTween.PINGPONG } );
trail = new FlxTrail(player, null, 100, 3, 1, 0);
trail.setAll("width", player.width);
trail.setAll("height", player.height);
trail.setAll("offset", new FlxPoint(0, 0));
add(trail);
}
/**
* Function that is called when this state is destroyed - you might want to
* consider setting all objects this state uses to null to help garbage collection.
*/
override public function destroy():Void
{
super.destroy();
}
/**
* Function that is called once every frame.
*/
override public function update():Void
{
super.update();
{
{
}
else
{
}
}
}
}