Closed andymatuschak closed 9 years ago
Ah, yes, will do
Yay! Thank you!!
On Feb 13, 2015, at 7:28 PM, Saniul Ahmed notifications@github.com wrote:
Ah, yes, will do
— Reply to this email directly or view it on GitHub.
Weird, can’t seem to reproduce, at least naively:
self.catLayer.behaviors = [ActionBehavior { layer in
Layer.root.backgroundColor = Color.red
}]
self.catLayer.behaviors = [CollisionBehavior(with: rainbowLayer) { kind in
switch kind {
case .Entering:
self.makeSparkle(self.catLayer)
default:
()
}
}]
(the background never gets set to red, if you put a breakpoint in the first behavior – it never gets triggered)
@andymatuschak @may-li mind sharing a scene which exhibits this bug?
Nope, I'm full of crap. You're right, @saniul!
@may-li, we must have been hitting a different problem! Hm hm.
@may-li and I noticed today that if we set a layer's behaviors list to a list which excludes a previously added behavior, that behavior isn't actually removed. Looks like that logic is missing from
BehaviorDriver.updateWithLayer()
.@saniul, would you be willing to take a look? If not, no worries at all!