comparison pyink/MBScene.py @ 1160:1a699dc00fa3

Fix the issue of not removing node in old scene when switching scenes. - When a timeline is playing and crossing two scenes (tween block), nodes, for the old scene, in duplicate group must be removed. But, it is not. - It is fixed by checking if nodes, in the duplicate group, are also in the key frame next to the new scene. All nodes that is not in next key frame are remove.
author Thinker K.F. Li <thinker@codemud.net>
date Tue, 28 Dec 2010 13:35:34 +0800
parents e731a0eaa35f
children a7faab54e8f8
comparison
equal deleted inserted replaced
1159:e731a0eaa35f 1160:1a699dc00fa3
603 603
604 next_idx, next_stop_idx, next_tween_type = \ 604 next_idx, next_stop_idx, next_tween_type = \
605 layer.get_frame_block(stop_idx + 1) 605 layer.get_frame_block(stop_idx + 1)
606 next_scene_group = layer.get_frame_data(next_idx) 606 next_scene_group = layer.get_frame_data(next_idx)
607 607
608 nframes = next_idx - start_idx + 1 608 nframes = stop_idx - start_idx + 1
609 percent = float(idx - start_idx) / nframes 609 percent = float(idx - start_idx) / nframes
610 self.tween.updateTweenContent(layer.duplicateGroup, 610 self.tween.updateTweenContent(layer.duplicateGroup,
611 tween_obj_tween_type, 611 tween_obj_tween_type,
612 scene_group, 612 scene_group,
613 next_scene_group, 613 next_scene_group,