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.

37 lines
863B

  1. import arcade
  2. from desktop_Platform import *
  3. def desktop_loadTextures(p):
  4. texs = []
  5. for (id, td) in enumerate(p.c.textureDescriptions):
  6. tex = arcade.load_texture(
  7. td.fileName,
  8. x = td.x,
  9. y = td.y,
  10. width = td.width,
  11. height = td.height
  12. )
  13. texs.append(tex)
  14. #}
  15. p.textures = texs
  16. #}
  17. def desktop_createDeselectedTiles(p):
  18. for (id, pos) in enumerate(p.c.tilePositions):
  19. tile = arcade.AnimatedTimeBasedSprite()
  20. p.deselectedTiles.append(tile)
  21. p.sprites.append(tile)
  22. tile.guid = id
  23. tile.texture = p.textures[0]
  24. # Animation between two textures.
  25. a1 = arcade.sprite.AnimationKeyframe(0, 700, p.textures[0])
  26. a2 = arcade.sprite.AnimationKeyframe(1, 700, p.textures[1])
  27. tile.frames.append(a1)
  28. tile.frames.append(a2)
  29. # Position.
  30. tile.left = pos[0]
  31. tile.top = pos[1]
  32. #}
  33. #}