def __init__( self, creature, content, target_mode="ask", bubble_mode="speech", look_at_arg = None, bubble_creation_class = Write, content_introduction_class= Write, **kwargs, ): bubble = creature.get_bubble(content, bubble_mode=bubble_mode) Group(bubble, bubble.content).shift_onto_screen() creature.generate_target() creature.target.change_mode(target_mode) if look_at_arg: creature.target.look_at(look_at_arg) change_mode = MoveToTarget(creature) bubble_creation = bubble_creation_class(bubble) content_introduction = content_introduction_class(bubble.content) AnimationGroup.__init__( self, change_mode, bubble_creation, content_introduction, **kwargs )
def __init__( self, creature, look_at_arg = None, run_time= 0.5, **kwargs ): assert hasattr(creature, "bubble") if look_at_arg: creature.target.look_at(look_at_arg) AnimationGroup.__init__( self, Uncreate(creature.bubble), FadeOut(creature.bubble.content), run_time = run_time )