Commit 295340c7 authored by Tt's avatar Tt

处理bug

parent 1cbf5ebb
{
"ver": "1.1.2",
"uuid": "c35bb2f6-f24a-4850-ae44-643f2fdc7541",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {
"ios": false,
"android": false
},
"subMetas": {}
}
\ No newline at end of file
{"ver":"1.1.2","uuid":"c35bb2f6-f24a-4850-ae44-643f2fdc7541","isBundle":false,"bundleName":"","priority":1,"compressionType":{},"optimizeHotUpdate":{},"inlineSpriteFrames":{},"isRemoteBundle":{"ios":false,"android":false},"subMetas":{}}
\ No newline at end of file
......@@ -58,7 +58,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"autoReleaseAssets": true,
"_id": "0737ce42-24f0-45c6-8e1a-8bdab4f74ba3"
"_id": "771f1a6d-1545-4697-8ea3-a0913edefc6f"
},
{
"__type__": "cc.Node",
......@@ -7524,13 +7524,13 @@
"_id": "29zXboiXFBKoIV4PQ2liTe"
},
{
"__type__": "408a6f4ZfpM8Yzyg+IOGg/V",
"__type__": "c263blay+lCoI8jH31a/8w1",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"_id": "eaTVUpqahPfZeO9+sUI7RP"
"_id": "6ce9f9aff78f49e1a542c4"
}
]
\ No newline at end of file
{
"ver": "1.2.9",
"uuid": "0737ce42-24f0-45c6-8e1a-8bdab4f74ba3",
"uuid": "771f1a6d-1545-4697-8ea3-a0913edefc6f",
"asyncLoadAssets": false,
"autoReleaseAssets": true,
"subMetas": {}
......
......@@ -80,7 +80,9 @@ export default class NewClass extends MyCocosSceneComponent {
onTouchRight(data) {
pg.event.emit("player_point_update");
if (Game.getIns().isRobot) {
this.scheduleOnce(() => {
this.onSpeakScueess();
}, 1)
} else {
this.touchData = data;
pg.event.emit("speak_open", data.text);
......@@ -96,8 +98,9 @@ export default class NewClass extends MyCocosSceneComponent {
this.gameOver();
} else {
//播放题干后继续
pg.event.emit("game_stop_loop");
//清理界面
this.scheduleOnce(() => {
pg.event.emit("game_stop_loop");
//播放题干然后继续
pg.event.emit("play_stem");
}, 0.4)
......@@ -105,6 +108,7 @@ export default class NewClass extends MyCocosSceneComponent {
}
onSpeakFail() {
//回退到最后一个位置
Game.getIns().pause = false;
this.touchData && this.touchData.cbFailed && this.touchData.cbFailed();
}
//----------------------------小企鹅-------------------
......
{
"ver": "1.0.8",
"uuid": "408a67f8-65fa-4cf1-8cf2-83e20e1a0fd5",
"uuid": "c263b95a-cbe9-42a0-8f23-1f7d5affcc35",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
......
......@@ -55,6 +55,19 @@ export default class NewClass extends cc.Component {
pg.view.visible(this.txt, false)
}
pg.hw.playLocalAudio("appear");
// Game.getIns().pause
// cc.tween(this.penguin).to(0.4, { y: 190 }).call(() => {
// if (Game.getIns().pause) {
// } else {
// cc.tween(this.penguin).delay(2).call(() => {
// this.touched = true;
// cc.tween(this.penguin).to(0.4, { y: -100 }).delay(0.1).call(() => {
// this.node.parent = null;
// }).start();
// }).start();
// }
// }).start();
cc.tween(this.penguin).to(0.4, { y: 190 }).delay(2).call(() => {
this.touched = true;
}).to(0.4, { y: -100 }).delay(0.1).call(() => {
......@@ -67,14 +80,13 @@ export default class NewClass extends cc.Component {
let time = 0.4 + wait + Math.random() * 2;
this.scheduleOnce(() => {
if (this.touched) return;
if (Game.getIns().pause) return;
Game.getIns().isRobot = true;
this.onTouchText();
}, time);
}
}
showSuccessAni() {
Game.getIns().pause = false;
pg.hw.playLocalAudio("right");
cc.tween(this.penguin).to(0.4, { y: -100 }).delay(0.1).call(() => {
this.node.parent = null;
}).start();
......@@ -99,16 +111,19 @@ export default class NewClass extends cc.Component {
}
onPlayerText() {
if (this.touched) return;
if (Game.getIns().pause) return;
Game.getIns().isRobot = false;
this.onTouchText();
}
onTouchText() {
if (Game.getIns().isOver) return;
if (Game.getIns().pause) return;
if (this.touched) return;
this.touched = true;
let data = this.data;
if (Game.getIns().isRobot) {
if (data.right == "1") {
Game.getIns().pause = true;
pg.view.visible(this.right, true);
Game.getIns().audioing = true;
pg.hw.playLocalAudio("right").then(() => {
......@@ -134,7 +149,6 @@ export default class NewClass extends cc.Component {
this.showSuccessAni();
}
data.cbFailed = () => {
Game.getIns().pause = false;
this.showErrorAni();
}
pg.event.emit("item_touch_right", data);
......
......@@ -33,6 +33,7 @@ export default class NewClass extends cc.Component {
}
startLoop() {
//播放一次题干后继续
Game.getIns().pause = false;
this.lastId = [];
this.unschedule(this.createItem);
this.schedule(this.createItem, 1);
......@@ -41,6 +42,8 @@ export default class NewClass extends cc.Component {
}
stopLoop() {
this.unschedule(this.createItem);
this.layout_up.removeAllChildren();
this.layout_down.removeAllChildren();
}
private lastId: Array<number>;
createItem() {
......
......@@ -114,7 +114,7 @@ export default class NewClass extends cc.Component {
"fluency": 60,
"rhythm": 90,
"kernel_version": "5.2.4",
"overall": 20,//75
"overall": 80,//75
"integrity": 100,
"duration": "6.779",
"rear_tone": "fall",
......@@ -163,7 +163,7 @@ export default class NewClass extends cc.Component {
pg.hw.playLocalAudio("tryagain");
this.tryCount++;
this.scheduleOnce(() => {
this.open(null);
this.open(this.val);
}, 2.5)
}
}
......
......@@ -52,7 +52,7 @@ function execCmd(cmd, params, path) {
}
let creatorBasePath = 'CocosCreator';
let creatorBasePath = 'D:\\work\\CocosDashboard_1.0.9\\resources\\.editors\\Creator\\2.4.5\\CocosCreator.exe';
if (process.platform !== 'win32') {
creatorBasePath = "/Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/MacOS/CocosCreator";
}
......@@ -128,10 +128,10 @@ async function buildWebBundle() {
await buildCocos(args);
}
function createConfigFile (projectName, type) {
function createConfigFile(projectName, type) {
let iosVersion = "";
let androidVersion = "";
if(!type){
if (!type) {
const androidPaths = fs.readdirSync(`dist/android/${projectName}`);
const androidConfigFileName = androidPaths.find(path => path.indexOf('config') == 0);
androidVersion = androidConfigFileName.split('.')[1];
......@@ -139,11 +139,11 @@ function createConfigFile (projectName, type) {
const iosConfigFileName = iosPaths.find(path => path.indexOf('config') == 0);
iosVersion = iosConfigFileName.split('.')[1];
} else {
if(type=="android"){
if (type == "android") {
const androidPaths = fs.readdirSync(`dist/android/${projectName}`);
const androidConfigFileName = androidPaths.find(path => path.indexOf('config') == 0);
androidVersion = androidConfigFileName.split('.')[1];
}else{
} else {
const iosPaths = fs.readdirSync(`dist/ios/${projectName}`);
const iosConfigFileName = iosPaths.find(path => path.indexOf('config') == 0);
iosVersion = iosConfigFileName.split('.')[1];
......@@ -164,7 +164,7 @@ function createConfigFile (projectName, type) {
fs.writeFileSync('dist/config.json', JSON.stringify(config));
}
function compressAll (projectName) {
function compressAll(projectName) {
const tarStream = new compressing.zip.Stream();
tarStream.addEntry('dist/play');
tarStream.addEntry('dist/form');
......@@ -176,7 +176,7 @@ function compressAll (projectName) {
tarStream.pipe(destStream);
}
function build_check () {
function build_check() {
const dirNames = process.cwd().split(/\/|\\/);
const projectName = dirNames[dirNames.length - 1];
const path = 'assets'
......@@ -211,20 +211,20 @@ function build_check () {
return projectName;
}
function changeSettingToWebDesktop () {
function changeSettingToWebDesktop() {
const path = 'assets'
const folderName = getFolderName(path);
editFolderMeta(path, folderName, false);
}
function changeSettingsToBundle () {
function changeSettingsToBundle() {
const path = 'assets'
const folderName = getFolderName(path);
editFolderMeta(path, folderName, true);
}
function replaceUuids () {
function replaceUuids() {
console.log('build_step_0 开始~!');
const path = 'assets'
......@@ -303,7 +303,7 @@ function replaceUuids () {
console.log('build_step_0 完成~!');
}
function replaceIndexHtml () {
function replaceIndexHtml() {
const data = fs.readFileSync('index.html');
fs.writeFileSync('dist/play/index.html', data);
}
......
{
"title": "play",
"packageName": "org.cocos2d.demo",
"startScene": "0737ce42-24f0-45c6-8e1a-8bdab4f74ba3",
"startScene": "771f1a6d-1545-4697-8ea3-a0913edefc6f",
"excludeScenes": [],
"includeSDKBox": false,
"orientation": {
......
{
"last-module-event-record-time": 1600677246969,
"last-module-event-record-time": 1641110457128,
"migrate-history": [
"cloud-function"
],
......
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