Commit d11fb8da authored by Lwd's avatar Lwd

aaaa

parent c2f26035
......@@ -243,10 +243,10 @@ var game = cc.Class({
com.updateUI(listInfo[i]);
newItem.active = true;
newItem.parent = content;
this.scheduleOnce(function () {
this.scheduleOnce(() => {
i += 1;
this.addItem(listInfo, content, item, i)
}.bind(this), 0);
}, 0);
},
//点亮 conten:上列表,下列表 state:0 点亮,2变暗
......@@ -288,10 +288,10 @@ var game = cc.Class({
var difnode = ex > sx ? difx < ex : difx > ex;
}
if (difnode) {
this.scheduleOnce(function () {
this.scheduleOnce(() => {
this.DrawLine(sx, sy, difx, dify);
this.ShowLine(difx, dify, ex, ey, cb);
}.bind(this), 0.01);
}, 0.01);
}
else {
this.DrawLine(ex, ey, ex, ey);
......
......@@ -49,11 +49,11 @@ cc.Class({
//设置图片
setPicture: function (url) {
//图片资源
g.res_mgr.getSpriteFrimeByUrl(url, function (list) {
g.res_mgr.getSpriteFrimeByUrl(url, (list) => {
this.Picture.getComponent(cc.Sprite).spriteFrame = list;
this.photoScare(this.Picture);
this.Picture.active = true;
}.bind(this));
});
},
//图片适配
......
......@@ -99,11 +99,11 @@ var result = cc.Class({
//设置图片
setPicture: function (url) {
//图片资源
g.res_mgr.getSpriteFrimeByUrl(url, function (list) {
g.res_mgr.getSpriteFrimeByUrl(url, (list) => {
this.Picture.getComponent(cc.Sprite).spriteFrame = list;
this.photoScare(this.Picture);
this.Picture.active = true;
}.bind(this));
});
},
//图片适配
......
......@@ -6,13 +6,13 @@ g.res_mgr = {
getFormData() {
console.log('初始化数据');
try {
window.courseware.getData(function (res) {
window.courseware.getData((res) => {
//存入数据管理器
g.data_mgr.data = res;
//数据处理
g.data_mgr.proGameData();
console.log("获得表单数据:" + res);
}.bind(this));
});
} catch (error) {
//console.error('没有查找到courseware.getData方法', error);
//获得默认数据
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment