Allow level props to have a flipX field in JSON
This commit is contained in:
@@ -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>;
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user