Пример #1
0
    def __init__(self):
        super(TestLayer, self).__init__()

        x, y = director.get_window_size()

        self.sprite1 = Sprite('grossini.png', (x // 4, y // 2))
        self.add(self.sprite1)
        self.sprite2 = Sprite('grossini.png', ((x // 4) * 3, y // 2))
        self.add(self.sprite2)

        self.sprite1.do(Accelerate(Speed(Rotate(360, 1), 0.1), 4))
        self.sprite2.do(Speed(Accelerate(Rotate(360, 1), 4), 0.1))
Пример #2
0
    def __init__(self):
        super(TestLayer, self).__init__()

        x, y = director.get_window_size()

        self.sprite = Sprite('grossini.png', (x // 2, y // 2))
        self.add(self.sprite)

        self.sprite.do(Speed(Rotate(360, 10), 10))