Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENHANCEMENT] Add flipX and flipY to Stage Props #3474

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions source/funkin/data/stage/StageData.hx
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,22 @@ typedef StageDataProp =
@:default(false)
var isPixel:Bool;

/**
* If set to true, the prop will be flipped horizontally.
* @default false
*/
@:optional
@:default(false)
var flipX:Bool;

/**
* If set to true, the prop will be flipped vertically.
* @default false
*/
@:optional
@:default(false)
var flipY:Bool;

/**
* Either the scale of the prop as a float, or the [w, h] scale as an array of two floats.
* Pro tip: On pixel-art levels, save the sprite small and set this value to 6 or so to save memory.
Expand Down
3 changes: 3 additions & 0 deletions source/funkin/play/stage/Stage.hx
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,9 @@ class Stage extends FlxSpriteGroup implements IPlayStateScriptedClass implements

propSprite.zIndex = dataProp.zIndex;

propSprite.flipX = dataProp.flipX;
propSprite.flipY = dataProp.flipY;

switch (dataProp.animType)
{
case 'packer':
Expand Down
Loading