From 4961d4ee992445a487587dd3a7f3ab965eb4f5cf Mon Sep 17 00:00:00 2001 From: ImVeryBad <80699736+Starexify@users.noreply.github.com> Date: Sun, 5 Oct 2025 17:27:34 +0200 Subject: [PATCH] Allow level props to have a flipX field in JSON --- source/funkin/data/story/level/LevelData.hx | 7 +++++++ source/funkin/ui/story/LevelProp.hx | 1 + 2 files changed, 8 insertions(+) diff --git a/source/funkin/data/story/level/LevelData.hx b/source/funkin/data/story/level/LevelData.hx index d1b00bbe6..ea2d9365e 100644 --- a/source/funkin/data/story/level/LevelData.hx +++ b/source/funkin/data/story/level/LevelData.hx @@ -114,4 +114,11 @@ typedef LevelPropData = @:default([]) @:optional var animations:Array; + + /** + * Flips the sprite on X axis. + */ + @:default(false) + @:optional + var flipX:Null; } diff --git a/source/funkin/ui/story/LevelProp.hx b/source/funkin/ui/story/LevelProp.hx index 167cda5a6..42db1f841 100644 --- a/source/funkin/ui/story/LevelProp.hx +++ b/source/funkin/ui/story/LevelProp.hx @@ -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)