Commit d11fb8da authored by Lwd's avatar Lwd

aaaa

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