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

fix: Flappybalt: bounce panels resetting thier sprites to default on resetState() #372

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

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);

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