|
@@ -5,18 +5,17 @@ import typing
|
5
|
5
|
from xml.etree import ElementTree
|
6
|
6
|
from xml.etree.ElementTree import Element
|
7
|
7
|
|
8
|
|
-from cocos.tiles import Resource
|
9
|
|
-
|
10
|
8
|
from synergine2.config import Config
|
11
|
9
|
from synergine2.log import get_logger
|
12
|
10
|
from synergine2_cocos2d.util import get_map_file_path_from_dir
|
13
|
11
|
|
14
|
12
|
if typing.TYPE_CHECKING:
|
15
|
13
|
import cocos
|
|
14
|
+ from cocos.tiles import Resource
|
16
|
15
|
|
17
|
16
|
|
18
|
17
|
class MapLoader(object):
|
19
|
|
- def load(self, map_file_path: str) -> Resource:
|
|
18
|
+ def load(self, map_file_path: str) -> 'Resource':
|
20
|
19
|
# import cocos here for prevent test crash when no X server is
|
21
|
20
|
# present
|
22
|
21
|
import cocos
|