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.

desktop_Window.py 669B

4 mesi fa
4 mesi fa
4 mesi fa
4 mesi fa
4 mesi fa
4 mesi fa
4 mesi fa
4 mesi fa
12345678910111213141516171819202122232425
  1. import arcade
  2. class desktop_Window(arcade.Window):
  3. def __init__(self, p):
  4. super().__init__(
  5. p.c.windowWidth,
  6. p.c.windowHeight,
  7. p.c.windowTitle,
  8. )
  9. self.antialiasing = p.c.windowAntialiasing
  10. self.background_color = arcade.color_from_hex_string(p.c.windowBackgroundColor)
  11. self.p = p
  12. def on_draw(self):
  13. arcade.start_render()
  14. self.p.sprites.draw()
  15. def on_mouse_press(self, x, y, button, key_modifiers):
  16. print("click", x, y)
  17. sprites = arcade.get_sprites_at_point([x, y], self.p.sprites)
  18. id = sprites[0].guid
  19. print("selected id: ", id)
  20. def on_update(self, delta):
  21. self.p.sprites.update_animation()