|
- import arcade
- from desktop_Platform import *
-
- def desktop_loadTextures(p):
- texs = []
- for (id, td) in enumerate(p.c.textureDescriptions):
- tex = arcade.load_texture(
- td.fileName,
- x = td.x,
- y = td.y,
- width = td.width,
- height = td.height
- )
- texs.append(tex)
- #}
- p.textures = texs
- #}
-
- def desktop_createDeselectedTiles(p):
- for (id, pos) in enumerate(p.c.tilePositions):
- tile = arcade.AnimatedTimeBasedSprite()
- p.deselectedTiles.append(tile)
- p.sprites.append(tile)
-
- tile.guid = id
- tile.texture = p.textures[0]
- # Animation between two textures.
- a1 = arcade.sprite.AnimationKeyframe(0, 700, p.textures[0])
- a2 = arcade.sprite.AnimationKeyframe(1, 700, p.textures[1])
- tile.frames.append(a1)
- tile.frames.append(a2)
- # Position.
- tile.left = pos[0]
- tile.top = pos[1]
- #}
- #}
|