Commit 35dd76ab authored by Tt's avatar Tt

树藤调整完成

parent 66b3465f
...@@ -2159,7 +2159,7 @@ ...@@ -2159,7 +2159,7 @@
"_id": "" "_id": ""
}, },
{ {
"__type__": "4d354gk3w1AIKtlOv2FygBk", "__type__": "2afff4ehS5KcIh0pByyGxDE",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
......
...@@ -5,10 +5,10 @@ ...@@ -5,10 +5,10 @@
// Learn life-cycle callbacks: // Learn life-cycle callbacks:
// - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html // - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html
const {ccclass, property} = cc._decorator; const { ccclass, property } = cc._decorator;
@ccclass @ccclass
export default class NewClass extends cc.Component { export default class BoardGame4_double_ItemData extends cc.Component {
@property @property
letter: string = ''; letter: string = '';
@property @property
...@@ -16,5 +16,5 @@ export default class NewClass extends cc.Component { ...@@ -16,5 +16,5 @@ export default class NewClass extends cc.Component {
@property @property
word: string = ''; word: string = '';
@property @property
jump: string ='' jump: string = ''
} }
...@@ -25,11 +25,11 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -25,11 +25,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
addPreloadAudio() { addPreloadAudio() {
// TODO 根据自己的配置预加载音频资源 // TODO 根据自己的配置预加载音频资源
this._audioResList.push({ url: this.data.gameStartAudio }); this.data.gameStartAudio && this._audioResList.push({ url: this.data.gameStartAudio });
this._audioResList.push({ url: this.data.gameLoadingAudio }); this.data.gameLoadingAudio && this._audioResList.push({ url: this.data.gameLoadingAudio });
this._audioResList.push({ url: this.data.waitingWheel }); this.data.waitingWheel && this._audioResList.push({ url: this.data.waitingWheel });
this._audioResList.push({ url: this.data.waitingPiece }); this.data.waitingPiece && this._audioResList.push({ url: this.data.waitingPiece });
this._audioResList.push({ url: this.data.waitingTurn }); this.data.waitingTurn && this._audioResList.push({ url: this.data.waitingTurn });
} }
addPreloadAnima() { } addPreloadAnima() { }
...@@ -190,7 +190,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -190,7 +190,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
const loadingLayerNode = cc.instantiate(this.loadingLayerPrefab); const loadingLayerNode = cc.instantiate(this.loadingLayerPrefab);
loadingLayerBase.addChild(loadingLayerNode); loadingLayerBase.addChild(loadingLayerNode);
this.loadingLayer = loadingLayerNode.getComponent("BoardGame2_LoadingLayer"); this.loadingLayer = loadingLayerNode.getComponent("BoardGame4_double_LoadingLayer");
this.loadingLayer.setMaxPlayerNumber(2); this.loadingLayer.setMaxPlayerNumber(2);
this.loadingLayer.onLoadFinished(() => { this.loadingLayer.onLoadFinished(() => {
this.playAudioByUrl(this.data.gameStartAudio); this.playAudioByUrl(this.data.gameStartAudio);
...@@ -608,7 +608,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -608,7 +608,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
async pieceFindRightBlock(rightBlock, idx) { async pieceFindRightBlock(rightBlock, idx) {
const color = this._status.current; const color = this._status.current;
const piece = cc.find(`Canvas/bg/chessBoard/piece${color}`); const piece = cc.find(`Canvas/bg/chessBoard/piece${color}`);
// console.log(idx + "_进度条高:" + targetHeight); // console.log(idx + "_进度条高:" + targetHeight);
const offsetX = { Red: -45, Blue: 45 }; const offsetX = { Red: -45, Blue: 45 };
...@@ -976,6 +976,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -976,6 +976,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
await this.pieceFindRightBlock(rightBlock, idx); await this.pieceFindRightBlock(rightBlock, idx);
} }
this.updateProgress(idx);
pieceRed["cantMove"] = true; pieceRed["cantMove"] = true;
pieceBlue["cantMove"] = true; pieceBlue["cantMove"] = true;
this._status.letter = ""; this._status.letter = "";
......
...@@ -3,7 +3,7 @@ import { asyncPlayDragonBoneAnimation } from "./util"; ...@@ -3,7 +3,7 @@ import { asyncPlayDragonBoneAnimation } from "./util";
const { ccclass, property } = cc._decorator; const { ccclass, property } = cc._decorator;
@ccclass @ccclass
export default class SceneComponent extends cc.Component { export default class BoardGame4_double_LoadingLayer extends cc.Component {
ctor() { ctor() {
} }
......
{ {
"ver": "1.0.8", "ver": "1.0.8",
"uuid": "4d354824-df0d-4020-ab65-3afd85ca0064", "uuid": "2afffe1e-852e-4a70-8874-a41cb21b10c4",
"isPlugin": false, "isPlugin": false,
"loadPluginInWeb": true, "loadPluginInWeb": true,
"loadPluginInNative": true, "loadPluginInNative": true,
......
...@@ -192,6 +192,11 @@ export class MyCocosSceneComponent extends cc.Component { ...@@ -192,6 +192,11 @@ export class MyCocosSceneComponent extends cc.Component {
}); });
} }
}); });
} else {
resolve(0);
if (cb) {
cb();
}
} }
}); });
} }
......
export const defaultData = { export const defaultData = {
gameStartAudio: gameStartAudio:
"http://staging-teach.cdn.ireadabc.com/7c18e0838dcf0707f885842ed09e1579.mp3", "",
gameLoadingAudio: gameLoadingAudio:
"http://staging-teach.cdn.ireadabc.com/6b3846cee6afa2ae450234aeec835beb.mp3", "",
waitingWheel: waitingWheel:
"http://staging-teach.cdn.ireadabc.com/23376490a9ba0f4a3fe0618fc1c935e1.mp3", "",
waitingPiece: waitingPiece:
"http://staging-teach.cdn.ireadabc.com/b44fa51172b19b555fda30717c773027.mp3", "",
waitingTurn: waitingTurn:
"http://staging-teach.cdn.ireadabc.com/a6a5c388c636bc6d063946e91b4bd21a.mp3", "",
}; };
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