Commit 5ce350d8 authored by Tt's avatar Tt

效果调整

parent c7c9e3c5
{
"ver": "2.3.5",
"uuid": "63b857a9-da4c-47b7-bdc3-e4cd19b60f0b",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 200,
"height": 142,
"platformSettings": {},
"subMetas": {
"img_jili_03大": {
"ver": "1.0.4",
"uuid": "5283c4c3-1c25-4d0a-b870-0feb5eaf51fc",
"rawTextureUuid": "63b857a9-da4c-47b7-bdc3-e4cd19b60f0b",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 1,
"offsetY": -0.5,
"trimX": 4,
"trimY": 1,
"width": 194,
"height": 141,
"rawWidth": 200,
"rawHeight": 142,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
This diff is collapsed.
......@@ -54,6 +54,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
pg.event.emit("mouse_start_play", { voice: Game.getIns().aniEnter.audioUrl, time: Game.getIns().aniEnter.time });
}
initEvent() {
this.schedule(this.updateLoop, 1 / 60)
pg.view.touchOn(pg.view.find(this, 'bg/bg_card/btn_check'), this.onTouchCheck, this);
pg.event.on("startGame", () => { this.startGame() })
......@@ -73,6 +74,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.nextPage();
}
nextPage() {
this.checked = false;
this.cards = [];
this.cardBgs = [];
this.currentCards = [];
......@@ -242,7 +244,13 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
onItemTouchCancel() {
}
checked: boolean;
updateCheckBtn() {
if (this.checked) {
pg.view.visible(pg.view.find(this, 'bg/bg_card/btn_check'), false)
pg.view.visible(pg.view.find(this, 'bg/bg_card/btn_check_grey'), false)
return;
}
let isFull = this.checkFull();
pg.view.visible(pg.view.find(this, 'bg/bg_card/btn_check'), isFull)
pg.view.visible(pg.view.find(this, 'bg/bg_card/btn_check_grey'), !isFull)
......@@ -266,6 +274,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
return;
}
this.onTouchCheckCantouch = true;
this.checked = true;
let page = Game.getIns().getCurrentPage();
if (!!page.image) {
this.layout_card.active = false;
......@@ -274,7 +283,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
let img = pg.view.find(this.layout_card_result, "img");
pg.view.setNetImg(img, page.image, { w: 340, h: 150 })
}
pg.audio.playAudioByUrl(page.audio).then(() => {
if (!page.audio) {
pg.event.emit("mouse_add");
setTimeout(() => {
this.updateCardResult();
......@@ -287,8 +296,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.onTouchCheckCantouch = false;
})
}, 2000);
})
if (!page.audio) {
} else {
pg.audio.playAudioByUrl(page.audio).then(() => {
pg.event.emit("mouse_add");
setTimeout(() => {
this.updateCardResult();
......@@ -301,6 +310,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.onTouchCheckCantouch = false;
})
}, 2000);
})
}
}
updateCardResult() {
......@@ -350,8 +360,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
let progressbar_red = pg.view.find(this.layout_lollipop, 'progressbar_red');
let sprite = progressbar_red.getComponent(cc.Sprite);
sprite.fillRange = 1;
let countdown = pg.view.find(this.layout_lollipop, 'countdown');
pg.audio.playAudioByNode(countdown);
let i2 = setInterval(() => {
sprite.fillRange -= 0.009;
sprite.fillRange -= 0.01;
}, 30)
setTimeout(() => {
......@@ -388,7 +401,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
update() {
updateLoop() {
this.updateCheckBtn();
this.updateProgress();
}
......
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