const Api = require('../net/Api');
cc.Class({
    extends: cc.Component,

    properties: {
        avatarSprite: cc.Sprite,
    },

    setAvatar(path) {
        Api.createImageFromUrl(path, (spriteFrame) => {
            this.avatarSprite.spriteFrame = spriteFrame;
        });
    },

    // update (dt) {},
});
