Closed FlixelCommunityBot closed 10 years ago
Comment by photonstorm from Monday May 16, 2011 at 18:58 GMT
Actually I think it's just a logic thing in the way I named the parameter that makes it confusing. I have renamed the parameter from "onScreenScroller" to "onlyScrollOnscreen" and the following draw code now works fine (and makes more logical sense):
if ((obj.onlyScrollOnscreen == true && obj.source.onScreen()) && obj.scrolling == true && obj.source.exists)
Thanks for forcing me to change this :) It's on v1.4 which I'll upload later.
Issue by SeiferTim from Monday May 16, 2011 at 18:05 GMT Originally opened as https://github.com/photonstorm/Flixel-Power-Tools/issues/2
Trying to setup a sprite that's on a different camera from the default. Even when I set onlyScrollOnscreen to false it wouldn't scroll. It looks like the draw() function is incorrectly checking if the user wants to override onScreen() checks:
if ((obj.onScreenScroller == true && obj.source.onScreen()) && obj.scrolling == true && obj.source.exists)
Should be:if ((obj.onScreenScroller == false || obj.source.onScreen()) && obj.scrolling == true && obj.source.exists)