Hi I have a question, I’m checking for overlap between a FlxExtendedSprite and an object from a class that extends FlxSpriteGroup (Pice)… I have a NotifyCallback for the overlap, and in this callback i have the following:
private function onOverlap(object1:Pice, object2:Pice) {
///Logs null on both objects properties
FlxG.log.add(object1.player);
FlxG.log.add(object2.player);
object2.kill();
}
The weird thing is that both logs return null, for the player property of the objects… But the kill function works in the correct object. Also if i print the x property of the objects, it shows shows in the log correctly…
private function onOverlap(object1:Pice, object2:Pice) {
///Works
FlxG.log.add(object1.x);
FlxG.log.add(object2.x);
object2.kill();
}
Any ideas why?