Browse Source

synergine2_cocos2d/middleware.py: More trailing '/'

Tom Low-Shang 6 years ago
parent
commit
37d72e033f
1 changed files with 2 additions and 4 deletions
  1. 2 4
      synergine2_cocos2d/middleware.py

+ 2 - 4
synergine2_cocos2d/middleware.py View File

4
 import cocos
4
 import cocos
5
 from synergine2.config import Config
5
 from synergine2.config import Config
6
 from synergine2.log import get_logger
6
 from synergine2.log import get_logger
7
+from synergine2_cocos2d.util import get_map_file_path_from_dir
7
 
8
 
8
 
9
 
9
 class MapMiddleware(object):
10
 class MapMiddleware(object):
18
         self.tmx = None
19
         self.tmx = None
19
 
20
 
20
     def get_map_file_path(self) -> str:
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
     def init(self) -> None:
24
     def init(self) -> None:
27
         map_file_path = self.get_map_file_path()
25
         map_file_path = self.get_map_file_path()