Skip to content

FlxObjectExt

Will Blanton edited this page Sep 12, 2019 · 1 revision

Added functionality for FlxObjects

This is an Extension! Learn about using Extensions here!

Examples:

var object:FlxObject = new FlxObject(0, 0, 100, 100);
var anchor = object.get_anchor(); // FlxPoint with x: 50, y: 100
object.set_position(anchor); // sets object position x: 50, y: 100
object.set_anchor_position(anchor); // sets object position x: 0, y: 0
object.set_midpoint_position(anchor); // sets object position x: 0, y: 50
Clone this wiki locally