Quantcast
Channel: Cocos中文社区 - 最新主题
Viewing all articles
Browse latest Browse all 88746

Jsb.FileUtils is undefined

$
0
0

@jumpchess1 写道:

这个需要require么.

var self = null;

var HttpGetImg = cc.Class({

    name: "HttpGetImg",
    properties: () => ({
        node: cc.Node,
        name: cc.String, 
    }),

    ctor: function () {
        self = this;
    },

    init: function (node) {
        this.node = node;
        return this;
    },

    response: function (buffer) {
        if (buffer.length > 0) {
            jsb.fileUtils.writeStringToFile(buffer.toString(), self.name);
        }
    },
});

module.exports = HttpGetImg;

帖子: 1

参与者: 1

阅读整个主题


Viewing all articles
Browse latest Browse all 88746

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>