Nape Sub States

10 views
Skip to first unread message

joacko bengochea

unread,
Mar 18, 2015, 10:56:23 AM3/18/15
to haxef...@googlegroups.com
Hi everybody! i'm trying to integrate nape in my game, and i had a problem when i try to add nape to a state and a subState called by the first one. 
I made a FlxNapeSubState class by extending FlxSubState and copying all the nape stuff just like in FlxNape. 
It compiles and runs fine, but, when i open the substate, the sprites doesn't move at all. looking at the shapes in the debugger, i can see that the walls are added to the substate, but the sprites are added to the parent state, and moves with it(only moves if i set persistentUpdate to true in the parentState and collisions with the objects in the parent state).

Any ideas of how can i handle multiple nape states at the same time?

joacko bengochea

unread,
Mar 18, 2015, 11:10:56 AM3/18/15
to haxef...@googlegroups.com
Solved it! it can be specified what space a body belongs to, i just had to change the body.space manually for the sprites i wanted to belong to the other space :D
Reply all
Reply to author
Forward
0 new messages