Commit 1996ed54 authored by 范雪寒's avatar 范雪寒

fix: 删除左下角的调试信息

parent 1f9f265c
......@@ -5,7 +5,7 @@
// Learn life-cycle callbacks:
// - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html
import {localPosTolocalPos} from "./util";
import { localPosTolocalPos } from "./util";
cc.Class({
extends: cc.Component,
......@@ -59,6 +59,7 @@ cc.Class({
},
start() {
cc.debug.setDisplayStats(false);
let getData = this.getData.bind(this);
if (window && window.courseware) {
// console.log('has window');
......@@ -164,14 +165,14 @@ cc.Class({
addPreloadImage() {
if (this.data.bgItem) {
this._imageResList.push({url: this.data.bgItem.url});
this._imageResList.push({ url: this.data.bgItem.url });
}
if (!this.data.hotZoneItemArr) {
return;
}
this.data.hotZoneItemArr.forEach((item) => {
if (item.gIdx == '0' && item.pic_url) {
this._imageResList.push({url: item.pic_url});
this._imageResList.push({ url: item.pic_url });
}
})
......@@ -183,7 +184,7 @@ cc.Class({
return;
}
this.data.hotZoneItemArr.forEach((item) => {
this._audioResList.push({url: item.audio_url});
this._audioResList.push({ url: item.audio_url });
})
},
......@@ -193,9 +194,9 @@ cc.Class({
}
this.data.hotZoneItemArr.forEach((item) => {
if (item.gIdx == '0' && item.skeJsonData) {
this._animaResList.push({url: item.skeJsonData.url});
this._animaResList.push({url: item.texJsonData.url});
this._animaResList.push({url: item.texPngData.url});
this._animaResList.push({ url: item.skeJsonData.url });
this._animaResList.push({ url: item.texJsonData.url });
this._animaResList.push({ url: item.texPngData.url });
}
})
......@@ -216,7 +217,7 @@ cc.Class({
const bgBottom = cc.find('Canvas/bgBottom');
const canvas = cc.find('Canvas');
let downFlag = false;
bgBottom.on('item_touch_start', (item) => {
downFlag = true;
......@@ -325,8 +326,8 @@ cc.Class({
const bgNode = cc.find('Canvas/bg');
// const sx = cc.winSize.width / bgNode.width;
// const sy = cc.winSize.height / bgNode.height;
sx = frameSize.width / bgNode.width;
sy = frameSize.height / bgNode.height;
sx = frameSize.width / bgNode.width;
sy = frameSize.height / bgNode.height;
bgNode.scale = Math.max(sx, sy) * s;
bgNode.anchorX = 1;
bgNode.anchorY = 0;
......@@ -355,7 +356,7 @@ cc.Class({
return;
}
cc.loader.load({url: this.data.bgItem.url}, (err, img) => {
cc.loader.load({ url: this.data.bgItem.url }, (err, img) => {
this.addMask(this.hotZoneBg);
......@@ -386,8 +387,8 @@ cc.Class({
bgBottom.scale = mapS * this._cocosScale;
// subNum = bgBottom.height;
sx = frameSize.width * this._cocosScale / img.width;
sy = (frameSize.height * this._cocosScale - subNum * mapS * this._cocosScale) / img.height;
sx = frameSize.width * this._cocosScale / img.width;
sy = (frameSize.height * this._cocosScale - subNum * mapS * this._cocosScale) / img.height;
const sprNode = new cc.Node();
......@@ -402,7 +403,7 @@ cc.Class({
this.hotZoneBg.scale = Math.min(sx, sy);
// this.hotZoneBg.y = -frameSize.height / 2 * this._cocosScale + this.hotZoneBg.height / 2 * this.hotZoneBg.scaleY + (subNum * mapS * this._cocosScale);
this.hotZoneBg.y = frameSize.height / 2 * this._cocosScale - this.hotZoneBg.height / 2 * this.hotZoneBg.scaleY ;
this.hotZoneBg.y = frameSize.height / 2 * this._cocosScale - this.hotZoneBg.height / 2 * this.hotZoneBg.scaleY;
// this.hotZoneBg.opacity = 20;
......@@ -435,7 +436,7 @@ cc.Class({
// if (item.gIdx == '0') {
// this.setOneAnima(item);
// } else {
this.setOneCirclePoint(item);
this.setOneCirclePoint(item);
// }
this.setOnePic(item);
......@@ -535,9 +536,9 @@ cc.Class({
const atlas = data.texJsonData.url//"http://staging-teach.cdn.ireadabc.com/246f8991b729fa3e5a7f4802de828efa.json";
cc.loader.load(image, (error, texture) => {
cc.loader.load({url: atlas, type: 'txt'}, (error, atlasJson) => {
cc.loader.load({ url: atlas, type: 'txt' }, (error, atlasJson) => {
cc.loader.load({url: ske, type: 'txt'}, (error, dragonBonesJson) => {
cc.loader.load({ url: ske, type: 'txt' }, (error, dragonBonesJson) => {
const atlas = new dragonBones.DragonBonesAtlasAsset();
atlas.atlasJson = atlasJson;
......@@ -602,7 +603,7 @@ cc.Class({
picNode.data = data;
this.hotZoneBg.addChild(picNode);
cc.loader.load({url: data.pic_url}, (err, img) => {
cc.loader.load({ url: data.pic_url }, (err, img) => {
const spr = picNode.addComponent(cc.Sprite);
spr.spriteFrame = new cc.SpriteFrame(img)
......@@ -682,9 +683,9 @@ cc.Class({
const atlas = data.texJsonData.url//"http://staging-teach.cdn.ireadabc.com/246f8991b729fa3e5a7f4802de828efa.json";
cc.loader.load(image, (error, texture) => {
cc.loader.load({url: atlas, type: 'txt'}, (error, atlasJson) => {
cc.loader.load({ url: atlas, type: 'txt' }, (error, atlasJson) => {
cc.loader.load({url: ske, type: 'txt'}, (error, dragonBonesJson) => {
cc.loader.load({ url: ske, type: 'txt' }, (error, dragonBonesJson) => {
const atlas = new dragonBones.DragonBonesAtlasAsset();
atlas.atlasJson = atlasJson;
......@@ -718,7 +719,7 @@ cc.Class({
// rectNode.addComponent(cc.Button);
animaNode.showAnima = () => {
animaNode.active = true;
// rectNode.on('click', () => {
// rectNode.on('click', () => {
if (rectNode.isClicked) {
// return;
}
......@@ -827,7 +828,7 @@ cc.Class({
_toCenterShow(node) {
const bgBottom = cc.find('Canvas/bgBottom');
cc.tween(node)
.to(1, {x:0, y: 0, scale: bgBottom.scale}, {easing: 'cubicOut'})
.to(1, { x: 0, y: 0, scale: bgBottom.scale }, { easing: 'cubicOut' })
.call(() => {
})
.start();
......@@ -850,7 +851,7 @@ cc.Class({
const changeNode = this._curShowItem;
changeNode.cantouch = false;
cc.tween(this._curShowItem)
.to(1, {scale: s * 0.95, x: localPos.x, y: localPos.y}, {easing: 'cubicOut'})
.to(1, { scale: s * 0.95, x: localPos.x, y: localPos.y }, { easing: 'cubicOut' })
.call(() => {
changeNode.cantouch = true;
})
......@@ -1001,8 +1002,8 @@ cc.Class({
const backItem = this._curShowItem;
cc.tween(backItem)
.to(0.3, {x: backItem.baseX, y: backItem.baseY}, {easing: 'elasticOut'})
.call(( ) => {
.to(0.3, { x: backItem.baseX, y: backItem.baseY }, { easing: 'elasticOut' })
.call(() => {
backItem.bgBottomItem.opacity = 255;
backItem.removeFromParent();
backItem.data.isDrag = false;
......
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