Commit 939dde67 authored by yu's avatar yu

公共部分调整

parent 6a447bde
{
"ver": "2.0.1",
"uuid": "ef016121-135b-4760-ab0c-c50f620e4fa1",
"downloadMode": 0,
"duration": 1.724082,
"subMetas": {}
}
\ No newline at end of file
This diff is collapsed.
......@@ -116,20 +116,26 @@ export default class SceneComponent extends MyCocosSceneComponent {
pg.event.on("check_next_question", () => {
// this.checkClickEnd();
});
pg.event.on("mouse_num_game_end", () => {
pg.event.on("mouse_08_num_game_end", () => {
if (this.checkOver()) {
this.showFind();
}
});
}
private onAgain() {
this.playLocalAudio("again");
this.layout_finish.active = false;
this.initData();
pg.event.emit("mouse_num", Game.getIns().getCardInfo().length);
pg.event.emit("mouse_08_num", Game.getIns().getCardInfo().length);
this.gameStart();
}
private onNext() {
const middleLayer = cc.find('middleLayer');
if (middleLayer) {
const mc = middleLayer.getComponent('middleLayer');
// // 切换下一页
mc.goNextPage();
}
}
private intervalId;
......@@ -282,7 +288,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
target.y = pos.y;
target.angle = pos.angle;
this.playLocalAudio("right");
pg.event.emit("mouse_add");
pg.event.emit("mouse_08_add");
}
private setTouchPos(e) {
......@@ -366,12 +372,12 @@ export default class SceneComponent extends MyCocosSceneComponent {
private initStart() {
this.layout_start.active = true;
cc.find("layout_top/label_title", this.node).getComponent(cc.Label).string = Game.getIns().title;
pg.event.emit("mouse_num", Game.getIns().getCardInfo().length);
pg.event.emit("mouse_08_num", Game.getIns().getCardInfo().length);
let start_ske = cc.find("layout_start/start_ske", this.node);
pg.load.loadDB(start_ske, { ske: Game.getIns().aniEnter.ske.url, tex: Game.getIns().aniEnter.tex.url, png: Game.getIns().aniEnter.png.url }).then((animationName) => {
if (animationName && animationName != "") {
let db = start_ske.getComponent(dragonBones.ArmatureDisplay);
let anis = db.getAnimationNames("armatureName");
let anis = db.getAnimationNames(db.armatureName);
db.playAnimation(anis[0], 0);
cc.tween(start_ske).by(1, { x: -500 }).call(() => {
pg.audio.playAudioByUrl(Game.getIns().startAudio).then(() => {
......
......@@ -12,16 +12,16 @@ import pg from "../tool/pg";
const { ccclass, property } = cc._decorator;
@ccclass
export default class NewClass extends cc.Component {
export default class Ngt_star_08 extends cc.Component {
// LIFE-CYCLE CALLBACKS:
onLoad() {
pg.event.on("mouse_add", (isRight = true) => {
pg.event.on("mouse_08_add", (isRight = true) => {
this.showBigStar(isRight);
});
pg.event.on("mouse_num", (max: number) => {
pg.event.on("mouse_08_num", (max: number) => {
this.initStar(max);
});
pg.event.on("mouse_add_error", (isRight = true) => {
pg.event.on("mouse_08_add_error", (isRight = true) => {
this.showErrorStar();
});
}
......@@ -124,7 +124,7 @@ export default class NewClass extends cc.Component {
star.x = 0;
star.y = 0;
star.scale = 1 / bigStarBg.scale;
pg.event.emit("mouse_num_game_end")
pg.event.emit("mouse_08_num_game_end")
}
showBigStar(isRight) {
if (!this.bigStarArr || this.bigStarArr.length <= 0) {
......@@ -170,7 +170,7 @@ export default class NewClass extends cc.Component {
.delay(0.6)
.to(0.8, { scale: 0 }, { easing: 'quadOut' })
.call(() => {
pg.event.emit("mouse_num_game_end")
pg.event.emit("mouse_08_num_game_end")
// this.playAudio(this.starCountClip);
})
.start();
......
{
"ver": "1.0.8",
"uuid": "cbcab305-7bef-41fe-93cd-896a850b6cf4",
"uuid": "7ff4d822-9f35-42b2-a94e-b984fc46c882",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
......
......@@ -4590,6 +4590,9 @@ declare namespace cc {
forward: Vec3;
pageIdx: any;
data: any;
star: Node;
starBig: Node;
star_wrong: Node;
/**
@param name name
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