Commit fa703d42 authored by 范雪寒's avatar 范雪寒

feat: 格式化

parent 9cf134b4
......@@ -95,13 +95,13 @@ cc.Class({
addPreloadImage() {
this._imageResList.push({url: this.data.pic_url});
this._imageResList.push({url: this.data.pic_url_2});
this._imageResList.push({ url: this.data.pic_url });
this._imageResList.push({ url: this.data.pic_url_2 });
},
addPreloadAudio() {
this._audioResList.push({url: this.data.audio_url});
this._audioResList.push({ url: this.data.audio_url });
},
addPreloadAnima() {
......@@ -264,11 +264,11 @@ cc.Class({
this._cantouch = false;
const len = this.pic1.parent.width;
cc.tween(this.pic1)
.to(1, {x: this.pic1.baseX}, {easing: 'cubicInOut'})
.to(1, { x: this.pic1.baseX }, { easing: 'cubicInOut' })
.start();
cc.tween(this.pic2)
.to(1, {x: this.pic2.baseX}, {easing: 'cubicInOut'})
.to(1, { x: this.pic2.baseX }, { easing: 'cubicInOut' })
.call(() => {
this._cantouch = true;
})
......@@ -279,11 +279,11 @@ cc.Class({
this._cantouch = false;
const len = this.pic1.parent.width;
cc.tween(this.pic1)
.to(1, {x: this.pic1.baseX - len}, {easing: 'cubicInOut'})
.to(1, { x: this.pic1.baseX - len }, { easing: 'cubicInOut' })
.start();
cc.tween(this.pic2)
.to(1, {x: this.pic2.baseX - len}, {easing: 'cubicInOut'})
.to(1, { x: this.pic2.baseX - len }, { easing: 'cubicInOut' })
.call(() => {
this._cantouch = true;
})
......@@ -324,7 +324,7 @@ cc.Class({
getSpriteFrimeByUrl(url, cb) {
cc.loader.load({url}, (err, img) => {
cc.loader.load({ url }, (err, img) => {
const spriteFrame = new cc.SpriteFrame(img)
if (cb) {
cb(spriteFrame);
......@@ -343,7 +343,7 @@ cc.Class({
})
},
playAudioByUrl(audio_url, cb=null) {
playAudioByUrl(audio_url, cb = null) {
if (audio_url) {
cc.assetManager.loadRemote(audio_url, (err, audioClip) => {
const audioId = cc.audioEngine.play(audioClip, false, 0.8);
......
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