|
|
|
|
57
|
class TMXMiddleware(MapMiddleware):
|
57
|
class TMXMiddleware(MapMiddleware):
|
58
|
def get_background_sprite(self) -> 'cocos.sprite.Sprite':
|
58
|
def get_background_sprite(self) -> 'cocos.sprite.Sprite':
|
59
|
# TODO: Extract it from tmx
|
59
|
# TODO: Extract it from tmx
|
|
|
60
|
+ import cocos
|
60
|
return cocos.sprite.Sprite(os.path.join(
|
61
|
return cocos.sprite.Sprite(os.path.join(
|
61
|
self.map_dir_path,
|
62
|
self.map_dir_path,
|
62
|
'background.png',
|
63
|
'background.png',
|
|
|
|
|
64
|
|
65
|
|
65
|
def get_interior_sprite(self) -> 'cocos.sprite.Sprite':
|
66
|
def get_interior_sprite(self) -> 'cocos.sprite.Sprite':
|
66
|
# TODO: Extract it from tmx
|
67
|
# TODO: Extract it from tmx
|
|
|
68
|
+ import cocos
|
67
|
return cocos.sprite.Sprite(os.path.join(
|
69
|
return cocos.sprite.Sprite(os.path.join(
|
68
|
self.map_dir_path,
|
70
|
self.map_dir_path,
|
69
|
'background_interiors.png',
|
71
|
'background_interiors.png',
|