Saturday, October 22, 2022
HomeGame DevelopmentDegree Information Query(s) - Cocos Creator

Degree Information Query(s) – Cocos Creator


Hello there. I’m utilizing v2.x of Cocos Creator. I used to be questioning about easy methods to save degree knowledge (format, x and y positions, and so on.) with out utilizing tilemap like in this submit. For the nodes whose format I’d be saving, I’d additionally want to connect elements to them. Initially, I created a brand new scene for each degree however that appears very inefficient. I’m not fairly certain easy methods to learn textual content information on startup and whereas threaded, which was really helpful within the thread I linked. Additionally, what’s one of the simplest ways to jot down out every node and its particulars to a file as slackmoehrle stated? Code examples can be appreciated.


You should use cc.assets.load to load the textual content:
https://docs.cocos.com/creator/2.4/handbook/en/asset-workflow/textual content.html

You should use ‘jsb.fileUtils.writeStringToFile’ to jot down to a file.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments