Commit 4277b60f authored by Tt's avatar Tt

修复

parent b712af47
This diff is collapsed.
{
"ver": "1.0.1",
"uuid": "cd6fe422-c574-4b3d-92fe-b213e3e420f6",
"subMetas": {}
}
\ No newline at end of file
{"width":256,"imagePath":"L2BG2-下雪动效_tex.png","height":128,"name":"L2BG2-下雪动效","SubTexture":[{"width":39,"y":1,"height":42,"name":"下雪效果9秒内循环/图层17","x":124},{"width":39,"y":45,"height":42,"name":"下雪效果9秒内循环/图层17_拷贝","x":83},{"width":39,"y":1,"height":42,"name":"下雪效果9秒内循环/图层17_拷贝_7","x":1},{"width":39,"y":45,"height":42,"name":"下雪效果9秒内循环/图层17_拷贝_2","x":165},{"width":39,"y":1,"height":42,"name":"下雪效果9秒内循环/图层17_拷贝_6","x":83},{"width":39,"y":45,"height":42,"name":"下雪效果9秒内循环/图层17_拷贝_3","x":1},{"width":39,"y":45,"height":42,"name":"下雪效果9秒内循环/图层17_拷贝_9","x":42},{"width":39,"y":1,"height":42,"name":"下雪效果9秒内循环/图层17_拷贝_8","x":206},{"width":39,"y":45,"height":42,"name":"下雪效果9秒内循环/图层17_拷贝_4","x":124},{"width":39,"y":1,"height":42,"name":"下雪效果9秒内循环/图层17 拷贝 5_0","x":165},{"width":39,"y":1,"height":42,"name":"下雪效果9秒内循环/图层17_拷贝_5","x":42}]}
\ No newline at end of file
{
"ver": "1.0.1",
"uuid": "a12678ab-a8ee-4074-8d5c-74a81a328ad2",
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "d575b0a8-c642-41cc-a562-3f5a5f752255",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 256,
"height": 128,
"platformSettings": {},
"subMetas": {
"L2BG2-下雪动效_tex": {
"ver": "1.0.4",
"uuid": "a8d48cce-7bc1-48a5-b57a-f0aaba3863d7",
"rawTextureUuid": "d575b0a8-c642-41cc-a562-3f5a5f752255",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -5,
"offsetY": 20,
"trimX": 1,
"trimY": 1,
"width": 244,
"height": 86,
"rawWidth": 256,
"rawHeight": 128,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
......@@ -159,9 +159,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
(chessBoardBg.width * chessBoardBg.scaleX) / 2 +
(canvas.width - chessBoardBg.width * chessBoardBg.scaleX) / 4;
const lifeblue = cc.find("Canvas/bg/Lifeblue");
lifeblue.x = -offsetX;
lifeblue.x = offsetX;
const lifered = cc.find("Canvas/bg/Lifered");
lifered.x = offsetX;
lifered.x = -offsetX;
}
loadingLayer;
......@@ -285,21 +285,21 @@ export default class SceneComponent extends MyCocosSceneComponent {
const catBtn = cc.find("Canvas/bg/tree/catBase/catBtn");
catBtn.on("click", async () => {
asyncPlayDragonBoneAnimation(coolCat, "begin");
const playerMe = this.allPlayerList.find(
(player) => player.uuid == this.playerId
);
const playerMe = this.allPlayerList.find((player) => player.uuid == this.playerId);
if (this.audioId) cc.audioEngine.stop(this.audioId);
if (playerMe.color == this._status.current) {
if (this._status.letter == "") {
await this.playAudioByUrl(this.data.waitingWheel);
this.audioId = await this.playAudioByUrl(this.data.waitingWheel);
} else {
await this.playAudioByUrl(this.data.waitingPiece);
this.audioId = await this.playAudioByUrl(this.data.waitingPiece);
}
} else {
await this.playAudioByUrl(this.data.waitingTurn);
this.audioId = await this.playAudioByUrl(this.data.waitingTurn);
}
asyncPlayDragonBoneAnimation(coolCat, "normal");
asyncPlayDragonBoneAnimation(coolCat, "normal", 0);
});
}
private audioId: any;
addPieceTouchEventListener(node: cc.Node, color) {
node.on(cc.Node.EventType.TOUCH_START, (event: cc.Event.EventTouch) => {
......@@ -668,26 +668,39 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.greyDice();
}
const blueFrame = cc.find("Canvas/bg/Lifeblue/faceFrame");
const redFrame = cc.find("Canvas/bg/Lifered/faceFrame");
let blinkFrame: cc.Node, stopBlinkFrame: cc.Node;
// const blueFrame = cc.find("Canvas/bg/Lifeblue/faceFrame");
// const redFrame = cc.find("Canvas/bg/Lifered/faceFrame");
// let blinkFrame: cc.Node, stopBlinkFrame: cc.Node;
// if (this._status.current == "Red") {
// blinkFrame = redFrame;
// stopBlinkFrame = blueFrame;
// } else {
// blinkFrame = blueFrame;
// stopBlinkFrame = redFrame;
// }
// blinkFrame.stopAllActions();
// cc.tween(blinkFrame)
// .set({ opacity: 100 })
// .to(1.5, { opacity: 255 }, { easing: "cubicOut" })
// .to(1.5, { opacity: 100 }, { easing: "cubicIn" })
// .union()
// .repeatForever()
// .start();
// stopBlinkFrame.stopAllActions();
// stopBlinkFrame.opacity = 0;
const blueMask = cc.find("Canvas/bg/Lifeblue/faceMask");
const redMask = cc.find("Canvas/bg/Lifered/faceMask");
let blinkMask: cc.Node, stopBlinkMask: cc.Node;
if (this._status.current == "Red") {
blinkFrame = redFrame;
stopBlinkFrame = blueFrame;
blinkMask = blueMask;
stopBlinkMask = redMask;
} else {
blinkFrame = blueFrame;
stopBlinkFrame = redFrame;
blinkMask = redMask;
stopBlinkMask = blueMask;
}
blinkFrame.stopAllActions();
cc.tween(blinkFrame)
.set({ opacity: 100 })
.to(1.5, { opacity: 255 }, { easing: "cubicOut" })
.to(1.5, { opacity: 100 }, { easing: "cubicIn" })
.union()
.repeatForever()
.start();
stopBlinkFrame.stopAllActions();
stopBlinkFrame.opacity = 0;
blinkMask.active = true;
stopBlinkMask.active = false;
}
getCurrentPiece() {
......@@ -975,6 +988,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
imgLight.active = false;
imgGood.active = false;
imgTry.active = false;
catBase.active = true;
//img需要clone对应的节点塞进去。
img.removeAllChildren();
......
......@@ -123,17 +123,17 @@ export class MyCocosSceneComponent extends cc.Component {
});
}
log (str) {
log(str) {
const node = cc.find('middleLayer');
if(node){
if (node) {
node.getComponent('middleLayer').log(str);
}else{
} else {
cc.log(str);
}
}
onLoadEnd() {
}
......@@ -150,7 +150,7 @@ export class MyCocosSceneComponent extends cc.Component {
// ------------------------------------------------
getSprNode(resName) {
const sf = cc.find('Canvas/res/img/' + resName).getComponent(cc.Sprite).spriteFrame;
......@@ -181,15 +181,18 @@ export class MyCocosSceneComponent extends cc.Component {
}
playAudioByUrl(audio_url, cb = null) {
if (audio_url) {
cc.assetManager.loadRemote(audio_url, (err, audioClip) => {
const audioId = cc.audioEngine.play(audioClip, false, 0.8);
if (cb) {
cc.audioEngine.setFinishCallback(audioId, () => {
cb();
});
}
});
}
return new Promise((resolve, reject) => {
if (audio_url) {
cc.assetManager.loadRemote(audio_url, (err, audioClip) => {
const audioId = cc.audioEngine.play(audioClip, false, 0.8);
resolve(audioId);
if (cb) {
cc.audioEngine.setFinishCallback(audioId, () => {
cb();
});
}
});
}
});
}
}
\ No newline at end of file
......@@ -7,8 +7,8 @@
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 315,
"height": 315,
"width": 324,
"height": 378,
"platformSettings": {},
"subMetas": {
"frameBlue": {
......
......@@ -7,8 +7,8 @@
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 151,
"height": 487,
"width": 281,
"height": 469,
"platformSettings": {},
"subMetas": {
"life": {
......
......@@ -7,8 +7,8 @@
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 98,
"height": 151,
"width": 109,
"height": 200,
"platformSettings": {},
"subMetas": {
"pieceRed": {
......
......@@ -7,8 +7,8 @@
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 151,
"height": 487,
"width": 281,
"height": 469,
"platformSettings": {},
"subMetas": {
"prograssbar": {
......
assets/l2_boardgame2/textures/tree.png

41.8 KB | W: | H:

assets/l2_boardgame2/textures/tree.png

16.9 KB | W: | H:

assets/l2_boardgame2/textures/tree.png
assets/l2_boardgame2/textures/tree.png
assets/l2_boardgame2/textures/tree.png
assets/l2_boardgame2/textures/tree.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -7,8 +7,8 @@
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 591,
"height": 298,
"width": 656,
"height": 443,
"platformSettings": {},
"subMetas": {
"tree": {
......@@ -23,9 +23,9 @@
"trimX": 0,
"trimY": 0,
"width": 656,
"height": 443,
"height": 311,
"rawWidth": 656,
"rawHeight": 443,
"rawHeight": 311,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
......
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