-
Notifications
You must be signed in to change notification settings - Fork 450
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
George 6.0.0 #3079
George 6.0.0 #3079
Changes from 17 commits
c72b219
f2959a6
8708ef1
9bdea91
adcaa36
a837386
6af9faf
8c030ad
b2d2363
07c6018
25c84b2
2afdd54
4d054bd
edfaf85
44f2961
5823c46
4d51f0c
a7d8e3b
ed33afd
735187e
128d9ee
fd4a996
9d3d561
d3f64d7
7845afc
6b4260c
7427f01
ce3661f
09c891b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -129,6 +129,16 @@ class FlxFlicker implements IFlxDestroyable | |
progressCallback = null; | ||
} | ||
|
||
public function pause():Void { | ||
if (timer == null) return; | ||
timer.active = false; | ||
} | ||
|
||
public function resume():Void { | ||
if (timer == null) return; | ||
timer.active = true; | ||
} | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. pretty simple change, why not, same for preventing double release, below |
||
/** | ||
* Starts flickering behavior. | ||
*/ | ||
|
@@ -182,7 +192,12 @@ class FlxFlicker implements IFlxDestroyable | |
{ | ||
completionCallback(this); | ||
} | ||
release(); | ||
|
||
// NOTE: Calling `flicker` in the completion callback will call release() on this object before reinstantiating it. | ||
// If that happens, we don't want to call release() again! So we check if the flicker is still done before releasing. | ||
if (this.timer == Timer) { | ||
release(); | ||
} | ||
} | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -499,7 +499,8 @@ class FlxGraphic implements IFlxDestroyable | |
if (collection.type != null) | ||
{ | ||
var collections:Array<Dynamic> = getFramesCollections(collection.type); | ||
collections.push(collection); | ||
if (collections.indexOf(collection) == -1) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should I add this to flixel? what does it improve? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I want to say I made this change back when I was working on trying to resolve an issue with FlxAnimate. I'd definitely keep it as you don't want the list of collections to have duplicate references in it (as that can cause the reference counts to get messed up). |
||
collections.push(collection); | ||
} | ||
} | ||
|
||
|
@@ -511,6 +512,8 @@ class FlxGraphic implements IFlxDestroyable | |
*/ | ||
public inline function getFramesCollections(type:FlxFrameCollectionType):Array<Dynamic> | ||
{ | ||
if (isDestroyed) return []; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same question, should this have been added in #2974 |
||
|
||
var collections:Array<Dynamic> = frameCollections.get(type); | ||
if (collections == null) | ||
{ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -116,6 +116,9 @@ class FlxDrawQuadsItem extends FlxDrawBaseItem<FlxDrawQuadsItem> | |
return; | ||
|
||
var shader = shader != null ? shader : graphics.shader; | ||
|
||
if (shader == null) throw 'Attempted to render an invalid FlxDrawItem, did you destroy a cached sprite?'; | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ditto, re: #2974 |
||
shader.bitmap.input = graphics.bitmap; | ||
shader.bitmap.filter = (camera.antialiasing || antialiasing) ? LINEAR : NEAREST; | ||
shader.alpha.value = alphas; | ||
|
@@ -144,4 +147,4 @@ class FlxDrawQuadsItem extends FlxDrawBaseItem<FlxDrawQuadsItem> | |
parameter.value[0] = value; | ||
} | ||
#end | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ class FlxGraphicsShader extends GraphicsShader | |
openfl_ColorOffsetv = colorOffset / 255.0; | ||
openfl_ColorMultiplierv = colorMultiplier; | ||
} | ||
}") | ||
}", true) | ||
@:glFragmentHeader(" | ||
uniform bool hasTransform; | ||
uniform bool hasColorTransform; | ||
|
@@ -62,7 +62,7 @@ class FlxGraphicsShader extends GraphicsShader | |
} | ||
return vec4(0.0, 0.0, 0.0, 0.0); | ||
} | ||
") | ||
", true) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what does this change? |
||
@:glFragmentSource(" | ||
#pragma header | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this triggering for you? My hope with #2974 was to prevent these issues
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in discord: