Skip to content

Conversation

@ninjamuffin99
Copy link
Member

fixes #366

See my lil comment there on null stuff

Copy link
Member

@Geokureli Geokureli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we remove Reg._bitmapData and Reg._rect since it's seems to be no longer cached

If so than please rename this to createBounceImage, have these two calls use the same bitmapData instance via:

		// The bounce panels. Drawn via code in Reg to fit screen height.
		final bounceImage = Reg.createBounceImage(FlxG.height - 34);
		
		// The left bounce panel. 
		
		_bounceLeft = new FlxSprite(1, 17);
		_bounceLeft.loadGraphic(bounceImage, true, 4, FlxG.height - 34);
		_bounceLeft.animation.add("flash", [1, 0], 8, false);
		add(_bounceLeft);

		// The right bounce panel.

		_bounceRight = new FlxSprite(FlxG.width - 5, 17);
		_bounceRight.loadGraphic(bounceImage, true, 4, FlxG.height - 34);
		_bounceRight.animation.add("flash", [1, 0], 8, false);
		add(_bounceRight);

@ninjamuffin99
Copy link
Member Author

how does this implementation look @Geokureli ? the bitmapdata and rect are created just in local variables

@Geokureli Geokureli merged commit 2f00e84 into HaxeFlixel:dev Mar 16, 2025
8 checks passed
@Geokureli
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flappybalt: bounce panels resetting thier sprites to default on clearSave

2 participants