Research portable Memory game | Исследовать портируемую игру Память
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
828B

  1. import arcade
  2. class Window(arcade.Window):
  3. def __init__(self):
  4. super().__init__(900, 600, "OGS Memory")
  5. arcade.set_background_color(arcade.color.WHITE)
  6. self.all_sprites = arcade.SpriteList()
  7. # Animated begin button.
  8. player = arcade.AnimatedTimeBasedSprite()
  9. for i in range(2):
  10. tex = arcade.load_texture("res/buttons_begin.png", x = i*350, y = 0, width = 350, height = 100)
  11. player.append_texture(tex)
  12. a = arcade.sprite.AnimationKeyframe(i, 700, tex)
  13. player.frames.append(a)
  14. player.center_x = 300
  15. player.center_y = 200
  16. self.all_sprites.append(player)
  17. def on_draw(self):
  18. arcade.start_render()
  19. arcade.draw_circle_filled(400, 300, 15, arcade.color.BLUE)
  20. self.all_sprites.draw()
  21. def on_update(self, delta):
  22. self.all_sprites.update_animation()