Replies: 1 comment
-
Yeah, it is a bit weird that it's working outside the overlap but not inside it. I've looked at your code from Pastebin and have a question.
Also, there is a way you can omit the overlap callback altogether: if (FlxG.overlap(this, Reg.boardData)) {
Reg.boardData.kill();
} The above code is a possible route you could take. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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:
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...
As a note, "player" is a custom property of the objects and it's public. If i log it from the playstate, it shows the correct value for each object instance.
Any ideas why?
HERE IS A MORE COMPLET CODE EXAMPLE: https://pastebin.com/aVQJFF41
The thing is I don't know why is null the specific player property of the objects passed to the callback function...
They are declared and traceable from PlayState and show the correct value, but when they are passed to the callback function they show as null. Probably there is something I'm doing wrong but can't identify it ...
Beta Was this translation helpful? Give feedback.
All reactions