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 { ...@@ -159,9 +159,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
(chessBoardBg.width * chessBoardBg.scaleX) / 2 + (chessBoardBg.width * chessBoardBg.scaleX) / 2 +
(canvas.width - chessBoardBg.width * chessBoardBg.scaleX) / 4; (canvas.width - chessBoardBg.width * chessBoardBg.scaleX) / 4;
const lifeblue = cc.find("Canvas/bg/Lifeblue"); const lifeblue = cc.find("Canvas/bg/Lifeblue");
lifeblue.x = -offsetX; lifeblue.x = offsetX;
const lifered = cc.find("Canvas/bg/Lifered"); const lifered = cc.find("Canvas/bg/Lifered");
lifered.x = offsetX; lifered.x = -offsetX;
} }
loadingLayer; loadingLayer;
...@@ -285,21 +285,21 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -285,21 +285,21 @@ export default class SceneComponent extends MyCocosSceneComponent {
const catBtn = cc.find("Canvas/bg/tree/catBase/catBtn"); const catBtn = cc.find("Canvas/bg/tree/catBase/catBtn");
catBtn.on("click", async () => { catBtn.on("click", async () => {
asyncPlayDragonBoneAnimation(coolCat, "begin"); asyncPlayDragonBoneAnimation(coolCat, "begin");
const playerMe = this.allPlayerList.find( const playerMe = this.allPlayerList.find((player) => player.uuid == this.playerId);
(player) => player.uuid == this.playerId if (this.audioId) cc.audioEngine.stop(this.audioId);
);
if (playerMe.color == this._status.current) { if (playerMe.color == this._status.current) {
if (this._status.letter == "") { if (this._status.letter == "") {
await this.playAudioByUrl(this.data.waitingWheel); this.audioId = await this.playAudioByUrl(this.data.waitingWheel);
} else { } else {
await this.playAudioByUrl(this.data.waitingPiece); this.audioId = await this.playAudioByUrl(this.data.waitingPiece);
} }
} else { } 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) { addPieceTouchEventListener(node: cc.Node, color) {
node.on(cc.Node.EventType.TOUCH_START, (event: cc.Event.EventTouch) => { node.on(cc.Node.EventType.TOUCH_START, (event: cc.Event.EventTouch) => {
...@@ -668,26 +668,39 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -668,26 +668,39 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.greyDice(); this.greyDice();
} }
const blueFrame = cc.find("Canvas/bg/Lifeblue/faceFrame"); // const blueFrame = cc.find("Canvas/bg/Lifeblue/faceFrame");
const redFrame = cc.find("Canvas/bg/Lifered/faceFrame"); // const redFrame = cc.find("Canvas/bg/Lifered/faceFrame");
let blinkFrame: cc.Node, stopBlinkFrame: cc.Node; // 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") { if (this._status.current == "Red") {
blinkFrame = redFrame; blinkMask = blueMask;
stopBlinkFrame = blueFrame; stopBlinkMask = redMask;
} else { } else {
blinkFrame = blueFrame; blinkMask = redMask;
stopBlinkFrame = redFrame; stopBlinkMask = blueMask;
} }
blinkFrame.stopAllActions(); blinkMask.active = true;
cc.tween(blinkFrame) stopBlinkMask.active = false;
.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;
} }
getCurrentPiece() { getCurrentPiece() {
...@@ -975,6 +988,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -975,6 +988,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
imgLight.active = false; imgLight.active = false;
imgGood.active = false; imgGood.active = false;
imgTry.active = false; imgTry.active = false;
catBase.active = true;
//img需要clone对应的节点塞进去。 //img需要clone对应的节点塞进去。
img.removeAllChildren(); img.removeAllChildren();
......
...@@ -123,11 +123,11 @@ export class MyCocosSceneComponent extends cc.Component { ...@@ -123,11 +123,11 @@ export class MyCocosSceneComponent extends cc.Component {
}); });
} }
log (str) { log(str) {
const node = cc.find('middleLayer'); const node = cc.find('middleLayer');
if(node){ if (node) {
node.getComponent('middleLayer').log(str); node.getComponent('middleLayer').log(str);
}else{ } else {
cc.log(str); cc.log(str);
} }
} }
...@@ -181,9 +181,11 @@ export class MyCocosSceneComponent extends cc.Component { ...@@ -181,9 +181,11 @@ export class MyCocosSceneComponent extends cc.Component {
} }
playAudioByUrl(audio_url, cb = null) { playAudioByUrl(audio_url, cb = null) {
return new Promise((resolve, reject) => {
if (audio_url) { if (audio_url) {
cc.assetManager.loadRemote(audio_url, (err, audioClip) => { cc.assetManager.loadRemote(audio_url, (err, audioClip) => {
const audioId = cc.audioEngine.play(audioClip, false, 0.8); const audioId = cc.audioEngine.play(audioClip, false, 0.8);
resolve(audioId);
if (cb) { if (cb) {
cc.audioEngine.setFinishCallback(audioId, () => { cc.audioEngine.setFinishCallback(audioId, () => {
cb(); cb();
...@@ -191,5 +193,6 @@ export class MyCocosSceneComponent extends cc.Component { ...@@ -191,5 +193,6 @@ export class MyCocosSceneComponent extends cc.Component {
} }
}); });
} }
});
} }
} }
\ No newline at end of file
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
"premultiplyAlpha": false, "premultiplyAlpha": false,
"genMipmaps": false, "genMipmaps": false,
"packable": true, "packable": true,
"width": 315, "width": 324,
"height": 315, "height": 378,
"platformSettings": {}, "platformSettings": {},
"subMetas": { "subMetas": {
"frameBlue": { "frameBlue": {
......
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
"premultiplyAlpha": false, "premultiplyAlpha": false,
"genMipmaps": false, "genMipmaps": false,
"packable": true, "packable": true,
"width": 151, "width": 281,
"height": 487, "height": 469,
"platformSettings": {}, "platformSettings": {},
"subMetas": { "subMetas": {
"life": { "life": {
......
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
"premultiplyAlpha": false, "premultiplyAlpha": false,
"genMipmaps": false, "genMipmaps": false,
"packable": true, "packable": true,
"width": 98, "width": 109,
"height": 151, "height": 200,
"platformSettings": {}, "platformSettings": {},
"subMetas": { "subMetas": {
"pieceRed": { "pieceRed": {
......
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
"premultiplyAlpha": false, "premultiplyAlpha": false,
"genMipmaps": false, "genMipmaps": false,
"packable": true, "packable": true,
"width": 151, "width": 281,
"height": 487, "height": 469,
"platformSettings": {}, "platformSettings": {},
"subMetas": { "subMetas": {
"prograssbar": { "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 @@ ...@@ -7,8 +7,8 @@
"premultiplyAlpha": false, "premultiplyAlpha": false,
"genMipmaps": false, "genMipmaps": false,
"packable": true, "packable": true,
"width": 591, "width": 656,
"height": 298, "height": 443,
"platformSettings": {}, "platformSettings": {},
"subMetas": { "subMetas": {
"tree": { "tree": {
...@@ -23,9 +23,9 @@ ...@@ -23,9 +23,9 @@
"trimX": 0, "trimX": 0,
"trimY": 0, "trimY": 0,
"width": 656, "width": 656,
"height": 443, "height": 311,
"rawWidth": 656, "rawWidth": 656,
"rawHeight": 443, "rawHeight": 311,
"borderTop": 0, "borderTop": 0,
"borderBottom": 0, "borderBottom": 0,
"borderLeft": 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