Allow level props to have a flipX field in JSON

This commit is contained in:
ImVeryBad
2025-10-22 17:06:57 -05:00
committed by Abnormal
parent 33a020a34b
commit 4961d4ee99
2 changed files with 8 additions and 0 deletions
@@ -114,4 +114,11 @@ typedef LevelPropData =
@:default([])
@:optional
var animations:Array<AnimationData>;
/**
* Flips the sprite on X axis.
*/
@:default(false)
@:optional
var flipX:Null<Bool>;
}
+1
View File
@@ -78,6 +78,7 @@ class LevelProp extends Bopper
this.alpha = propData.alpha;
this.x = propData.offsets[0];
this.y = propData.offsets[1];
this.flipX = propData.flipX;
FlxAnimationUtil.addAtlasAnimations(this, propData.animations);
for (propAnim in propData.animations)