|
@@ -4,6 +4,7 @@ import os
|
4
|
4
|
import cocos
|
5
|
5
|
from synergine2.config import Config
|
6
|
6
|
from synergine2.log import get_logger
|
|
7
|
+from synergine2_cocos2d.util import get_map_file_path_from_dir
|
7
|
8
|
|
8
|
9
|
|
9
|
10
|
class MapMiddleware(object):
|
|
@@ -18,10 +19,7 @@ class MapMiddleware(object):
|
18
|
19
|
self.tmx = None
|
19
|
20
|
|
20
|
21
|
def get_map_file_path(self) -> str:
|
21
|
|
- return os.path.join(
|
22
|
|
- self.map_dir_path,
|
23
|
|
- '{}.tmx'.format(os.path.basename(self.map_dir_path)),
|
24
|
|
- )
|
|
22
|
+ return get_map_file_path_from_dir(self.map_dir_path)
|
25
|
23
|
|
26
|
24
|
def init(self) -> None:
|
27
|
25
|
map_file_path = self.get_map_file_path()
|