https://pastebin.com/fhnsHjWR
https://pastebin.com/6fEqrNXY El dia dijous, 21 de gener de 2021 a les 23:06:43 UTC+1, Claudio Canepa va escriure: > could you paste the code and traceback on some pastebin, by example > https://pastebin.com ? > > On Thu, Jan 21, 2021 at 6:59 PM Antoni Rocafort <[email protected]> > wrote: > >> >> Hello I'm developing a game with cocos2d in python. I am trying load a >> tiled map, but i have problems with it. >> >> 1-Large time of loading a tmx file. >> >> 2-Atribute error while loading the tiled map. >> >> My code: >> class Level(Scene): >> def __init__(self): >> super().__init__() >> cha = Character() >> bg = load_tmx("maps/space_map_2.tmx")["space"] >> character_layer = ScrollingManager() >> character_layer.add(bg) character_layer.add(cha) >> self.add(character_layer) >> >> How can i reduce the loading time? >> Traceback (most recent call last): File >> "***/PycharmProjects/smashking/Main.py", line 74, in <module> escena_2 = >> Level() File "***/PycharmProjects/smashking/Levels.py", line 13, in >> __init__ character_layer.add(bg) File >> "***/PycharmProjects/course/venv/lib/python3.8/site-packages/cocos/layer/scrolling.py", >> >> line 295, in add self.set_focus(self.fx, self.fy, force=True) File >> "***/PycharmProjects/course/venv/lib/python3.8/site-packages/cocos/layer/scrolling.py", >> >> line 373, in set_focus return self.force_focus(fx, fy) File >> "***/PycharmProjects/course/venv/lib/python3.8/site-packages/cocos/layer/scrolling.py", >> >> line 481, in force_focus layer.set_view(childs_scroll_x, >> childs_scroll_y, w, h, AttributeError: 'TileSet' object has no attribute >> 'set_view' >> >> Why is getting this error while loading? >> >> -- >> You received this message because you are subscribed to the Google Groups >> "cocos2d discuss" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/cocos-discuss/c222af1f-abb9-49df-8413-7d553b6ba813n%40googlegroups.com >> >> <https://groups.google.com/d/msgid/cocos-discuss/c222af1f-abb9-49df-8413-7d553b6ba813n%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- You received this message because you are subscribed to the Google Groups "cocos2d discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/cocos-discuss/46698ce8-453a-4505-8140-4e6ed2a2b7c0n%40googlegroups.com.
