|
@@ -11,13 +11,13 @@ cc.Class({
|
|
avatarSprite: cc.Sprite,
|
|
avatarSprite: cc.Sprite,
|
|
|
|
|
|
hasUser: {
|
|
hasUser: {
|
|
- get: function() {
|
|
|
|
|
|
+ get: function () {
|
|
if (!this._hasUser) {
|
|
if (!this._hasUser) {
|
|
this._hasUser = false;
|
|
this._hasUser = false;
|
|
}
|
|
}
|
|
return this._hasUser;
|
|
return this._hasUser;
|
|
},
|
|
},
|
|
- set: function(value) {
|
|
|
|
|
|
+ set: function (value) {
|
|
this._hasUser = value;
|
|
this._hasUser = value;
|
|
if (this._hasUser) {
|
|
if (this._hasUser) {
|
|
this.inviteNode.active = false;
|
|
this.inviteNode.active = false;
|
|
@@ -32,10 +32,10 @@ cc.Class({
|
|
|
|
|
|
// LIFE-CYCLE CALLBACKS:
|
|
// LIFE-CYCLE CALLBACKS:
|
|
|
|
|
|
- onLoad () {
|
|
|
|
|
|
+ onLoad() {
|
|
},
|
|
},
|
|
|
|
|
|
- start () {
|
|
|
|
|
|
+ start() {
|
|
|
|
|
|
},
|
|
},
|
|
|
|
|
|
@@ -46,13 +46,13 @@ cc.Class({
|
|
configData(userData) {
|
|
configData(userData) {
|
|
this.hasUser = true;
|
|
this.hasUser = true;
|
|
|
|
|
|
- if (userData.head) {
|
|
|
|
- Api.createImageFromUrl(userData.head, (spriteFrame) => {
|
|
|
|
- this.avatarSprite.spriteFrame = spriteFrame;
|
|
|
|
- });
|
|
|
|
- } else {
|
|
|
|
- this.avatarSprite.spriteFrame = null;
|
|
|
|
- }
|
|
|
|
|
|
+ // if (userData.head) {
|
|
|
|
+ Api.createImageFromUrl(userData.head, (spriteFrame) => {
|
|
|
|
+ this.avatarSprite.spriteFrame = spriteFrame;
|
|
|
|
+ });
|
|
|
|
+ // } else {
|
|
|
|
+ // this.avatarSprite.spriteFrame = null;
|
|
|
|
+ // }
|
|
},
|
|
},
|
|
|
|
|
|
// update (dt) {},
|
|
// update (dt) {},
|