Skip to content

Commit

Permalink
FlxDirectoinFlags: add up, down, left and right fields
Browse files Browse the repository at this point in the history
  • Loading branch information
Geokureli committed Dec 3, 2024
1 parent b14d1e5 commit 9786f5c
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions flixel/util/FlxDirectionFlags.hx
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,23 @@ enum abstract FlxDirectionFlags(Int) from Int from FlxDirection to Int
{
return degrees * FlxAngle.TO_RAD;
}

/** Whether this has the `UP` flag **/
public var up(get, never):Bool;
inline function get_up() return has(UP);

/** Whether this has the `DOWN` flag **/
public var down(get, never):Bool;
inline function get_down() return has(DOWN);

/** Whether this has the `LEFT` flag **/
public var left(get, never):Bool;
inline function get_left() return has(LEFT);

/** Whether this has the `RIGHT` flag **/
public var right(get, never):Bool;
inline function get_right() return has(RIGHT);


/**
* Returns true if this contains **all** of the supplied flags.
Expand Down

0 comments on commit 9786f5c

Please sign in to comment.