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

possible FlxCamera screen conflict #168

Open
Beeblerox opened this issue Jun 20, 2013 · 1 comment
Open

possible FlxCamera screen conflict #168

Beeblerox opened this issue Jun 20, 2013 · 1 comment
Labels

Comments

@Beeblerox
Copy link

It may appear if you create:

 FlxSprite.makeGraphic(FlxG.width, FlxG.height, 0);

The problem is in following: default camera's screen:FlxSprite have the same size and color, so this newly created sprite and camera's screen will share the same pixels BitmapData.

Possible solution for this issue is to replace lines from FlxCamera:

screen = new FlxSprite();
screen.makeGraphic(width,height,0,true);
screen.setOriginToCorner();
buffer = screen.pixels;

with

buffer = new BitmapData(width,height,true,0);
screen = new FlxSprite();
screen.pixels = buffer;
@Dovyski
Copy link
Member

Dovyski commented Sep 23, 2013

I'm moving this to the future release milestone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants