from manim import *
class SuccessionDemo(Scene):
    def construct(self):
        title = Text("Succession：先旋转、后移动", font="STLiti", font_size=30).to_edge(UP)
        self.play(FadeIn(title), run_time=0.6)
        star = Star(color=YELLOW, stroke_width=7).scale(1.1).shift(LEFT * 3)
        self.play(FadeIn(star), run_time=0.6)
        self.play(Succession(Rotate(star, angle=PI, run_time=1.6),
                             star.animate(run_time=1.6).shift(RIGHT * 5)), run_time=3.2)
        note = Text("Succession 按顺序串行播放，总时长是各段之和", font="STLiti", font_size=21, color=YELLOW).to_edge(DOWN)
        self.play(FadeIn(note), run_time=0.4)
        self.wait(1.2)
