-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmap.py
27 lines (20 loc) · 862 Bytes
/
map.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import arcade
TILE_SCALING = 0.5
COIN_SCALING = 0.5
class Map:
def __init__(self, map_name):
# Read in the tiled map
my_map = arcade.tilemap.read_tmx(map_name)
# -- Platforms
self.wall_list = arcade.tilemap.process_layer(my_map, 'Platforms', TILE_SCALING)
# -- Coins
self.damage_list = arcade.tilemap.process_layer(my_map, 'Damage', TILE_SCALING)
# -- Tweets
self.tweet_list = arcade.tilemap.process_layer(my_map, 'Tweets', TILE_SCALING)
# -- Tan
self.tan_list = arcade.tilemap.process_layer(my_map, 'Tan', TILE_SCALING)
self.enemy_list = arcade.tilemap.process_layer(my_map, 'Enemies', TILE_SCALING)
# --- Other stuff
# Set the background color
if my_map.background_color:
arcade.set_background_color(my_map.background_color)