On Mon, Apr 9, 2012 at 5:21 AM, Oninoshiko <[email protected]> wrote:
> I'm putting together a pair of InstantActions to solve the problem > where you want to change Scenes after the action completes. I'm > calling the ScenePop and SceneReplace. > > ScenePop works like a charm. > > SceneReplace, on the other hand, does not. It thows an error about a > deepcopy failing when I try to pass in the scene I want to replace the > current one with. Honestly, I'm not sure why it would need a deep copy > in this case rather then just passing a reference (is there a way to > force that behavior?), > > I'm using Cocos2d 0.5 and Python 2.6.6 > > -- It is a limitation in current design. They are some workaounds, like store the reference in the action target, or pass the reference you want not deepcopied as an action.init2 method to be called as in template_action = MyAction() worker_action = node.do(template_action) worker_action.init2( param_to_not_deepcopy) The last workaround can be seen in the test\test_action_non_interval.py example. I you show code maybe a more specific workaround can be sugested. -- claudio -- You received this message because you are subscribed to the Google Groups "cocos2d discuss" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/cocos-discuss?hl=en.
