Skip to content

possible FlxCamera screen conflict #168

@Beeblerox

Description

@Beeblerox

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;

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions