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.

29 lines
866B

  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.GRAY)
  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. player.color = arcade.color.BLUE
  13. a = arcade.sprite.AnimationKeyframe(i, 700, tex)
  14. player.frames.append(a)
  15. player.center_x = 300
  16. player.center_y = 200
  17. self.all_sprites.append(player)
  18. def on_draw(self):
  19. arcade.start_render()
  20. arcade.draw_circle_filled(400, 300, 15, arcade.color.BLUE)
  21. self.all_sprites.draw()
  22. def on_update(self, delta):
  23. self.all_sprites.update_animation()