Compare commits
No commits in common. "f311e7624dec6372e31d9716d1e87e06cae1627b" and "c3d141fa6acc67501d07c369017f20cd7d4c5197" have entirely different histories.
f311e7624d
...
c3d141fa6a
|
@ -964,9 +964,15 @@
|
||||||
"mask": {
|
"mask": {
|
||||||
"__id__": 80
|
"__id__": 80
|
||||||
},
|
},
|
||||||
"iceLabel": null,
|
"iceLabel": {
|
||||||
"hammerLabel": null,
|
"__id__": 76
|
||||||
"magicLabel": null,
|
},
|
||||||
|
"hammerLabel": {
|
||||||
|
"__id__": 27
|
||||||
|
},
|
||||||
|
"magicLabel": {
|
||||||
|
"__id__": 44
|
||||||
|
},
|
||||||
"iceNode": {
|
"iceNode": {
|
||||||
"__id__": 71
|
"__id__": 71
|
||||||
},
|
},
|
||||||
|
|
|
@ -176,7 +176,7 @@ export default class Block extends cc.Component {
|
||||||
this.type = block_Info.type;
|
this.type = block_Info.type;
|
||||||
this.color = block_Info.color;
|
this.color = block_Info.color;
|
||||||
this.blockId = block_Info.id;
|
this.blockId = block_Info.id;
|
||||||
//console.log("方块类型",this.type,"方块颜色",this.color,"方块ID",this.blockId);
|
console.log("方块类型",this.type,"方块颜色",this.color,"方块ID",this.blockId);
|
||||||
// if(posX&&posY){
|
// if(posX&&posY){
|
||||||
// this.posX = posX;
|
// this.posX = posX;
|
||||||
// this.posY = posY;
|
// this.posY = posY;
|
||||||
|
@ -518,7 +518,7 @@ export default class Block extends cc.Component {
|
||||||
this.block_Info.node = null;
|
this.block_Info.node = null;
|
||||||
}
|
}
|
||||||
else if(this.type == BlockType.炸弹块){
|
else if(this.type == BlockType.炸弹块){
|
||||||
this.node.getChildByName("boom").getComponent("Boom").destroyBoom();
|
this.node.getChildByName("boom").getComponent("Boom").stopBoom();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -757,7 +757,7 @@ export default class Block extends cc.Component {
|
||||||
self.block_Info.node.getComponent("Block").posY,false);
|
self.block_Info.node.getComponent("Block").posY,false);
|
||||||
}
|
}
|
||||||
else if(self.type == BlockType.炸弹块){
|
else if(self.type == BlockType.炸弹块){
|
||||||
this.node.getChildByName("boom").getComponent("Boom").destroyBoom();
|
this.node.getChildByName("boom").getComponent("Boom").stopBoom();
|
||||||
}
|
}
|
||||||
|
|
||||||
MapConroler._instance.nextLevel();
|
MapConroler._instance.nextLevel();
|
||||||
|
|
|
@ -72,9 +72,6 @@ private heathScheduleCallback: Function = null;
|
||||||
else if(version == "正式版"){
|
else if(version == "正式版"){
|
||||||
this.node.getChildByName("Load").getChildByName("New EditBox").active = false
|
this.node.getChildByName("Load").getChildByName("New EditBox").active = false
|
||||||
}
|
}
|
||||||
else{
|
|
||||||
this.node.getChildByName("Load").getChildByName("New EditBox").active = true;
|
|
||||||
}
|
|
||||||
// 预加载 shop 预制体
|
// 预加载 shop 预制体
|
||||||
if (!JiaZai.cachedShopPrefab) {
|
if (!JiaZai.cachedShopPrefab) {
|
||||||
cc.assetManager.loadBundle('shop', (err: Error, bundle: cc.AssetManager.Bundle) => {
|
cc.assetManager.loadBundle('shop', (err: Error, bundle: cc.AssetManager.Bundle) => {
|
||||||
|
@ -311,17 +308,10 @@ stopHeathTimeCutDown() {
|
||||||
cc.fx.GameConfig.LEVEL_INFO_init(true, 1000);
|
cc.fx.GameConfig.LEVEL_INFO_init(true, 1000);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
if(this.custom.string != ""){
|
cc.fx.AudioManager._instance.playEffect("zhuan1", null);
|
||||||
cc.fx.GameConfig.GM_INFO.level = parseInt(this.custom.string) - 1;
|
this.node.getChildByName("zhuanchang").active = true;
|
||||||
// cc.fx.StorageMessage.setStorage("level",cc.fx.GameConfig.GM_INFO.level.toString());
|
this.node.getChildByName("zhuanchang").getComponent(sp.Skeleton).setAnimation(1, "up", false);
|
||||||
cc.fx.GameConfig.LEVEL_INFO_init(true);
|
cc.fx.GameConfig.LEVEL_INFO_init(true, 1000);
|
||||||
}
|
|
||||||
else{
|
|
||||||
cc.fx.AudioManager._instance.playEffect("zhuan1", null);
|
|
||||||
this.node.getChildByName("zhuanchang").active = true;
|
|
||||||
this.node.getChildByName("zhuanchang").getComponent(sp.Skeleton).setAnimation(1, "up", false);
|
|
||||||
cc.fx.GameConfig.LEVEL_INFO_init(true, 1000);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -73,7 +73,9 @@ export default class MapConroler extends cc.Component {
|
||||||
|
|
||||||
@property(cc.Node)
|
@property(cc.Node)
|
||||||
freezeMask: cc.Node = null;
|
freezeMask: cc.Node = null;
|
||||||
|
//第一关引导动画
|
||||||
|
@property(cc.Node)
|
||||||
|
guide: cc.Node = null;
|
||||||
|
|
||||||
@property(cc.Node)
|
@property(cc.Node)
|
||||||
coinPop: cc.Node = null;
|
coinPop: cc.Node = null;
|
||||||
|
@ -152,10 +154,10 @@ export default class MapConroler extends cc.Component {
|
||||||
this.add_Time = 0;
|
this.add_Time = 0;
|
||||||
|
|
||||||
|
|
||||||
//this.iceLabel.string = cc.fx.GameConfig.GM_INFO.freezeAmount.toString();
|
this.iceLabel.string = cc.fx.GameConfig.GM_INFO.freezeAmount.toString();
|
||||||
// this.hammerLabel.string = cc.fx.GameConfig.GM_INFO.hammerAmount.toString();
|
this.hammerLabel.string = cc.fx.GameConfig.GM_INFO.hammerAmount.toString();
|
||||||
// this.magicLabel.string = cc.fx.GameConfig.GM_INFO.magicAmount.toString();
|
this.magicLabel.string = cc.fx.GameConfig.GM_INFO.magicAmount.toString();
|
||||||
this.setPropNum();
|
// this.setPropNum();
|
||||||
// cc.game.addPersistRootNode(this.node);
|
// cc.game.addPersistRootNode(this.node);
|
||||||
MapConroler._instance = this;
|
MapConroler._instance = this;
|
||||||
}
|
}
|
||||||
|
@ -179,34 +181,30 @@ export default class MapConroler extends cc.Component {
|
||||||
|
|
||||||
}
|
}
|
||||||
//道具数量
|
//道具数量
|
||||||
setPropNum() {
|
// setPropNum() {
|
||||||
//如果道具数量大于0,显示 cc.fx.GameConfig.GM_INFO.freezeAmount,如果为零显示'mul10'
|
// //如果道具数量大于0,显示 cc.fx.GameConfig.GM_INFO.freezeAmount,如果为零显示'mul10'
|
||||||
|
// if(cc.fx.GameConfig.GM_INFO.freezeAmount == 0) {
|
||||||
if(cc.fx.GameConfig.GM_INFO.freezeAmount > 0) {
|
// this.iceNode.children[1].active = true;
|
||||||
this.iceNode.children[0].active = false;
|
// this.iceNode.children[2].active = true;
|
||||||
this.iceNode.children[1].active = true;
|
// NumberToImage.numberToImageNodes(13, 18,15, "mul", this.iceNode.children[2], false);
|
||||||
NumberToImage.numberToImageNodes(cc.fx.GameConfig.GM_INFO.freezeAmount, 35, 15, "mul", this.iceNode.children[1], true);
|
// } else {
|
||||||
} else {
|
// this.iceNode.children[0].active = true
|
||||||
this.iceNode.children[0].active = true
|
// }
|
||||||
this.iceNode.children[1].active = false;
|
// if(cc.fx.GameConfig.GM_INFO.hammerAmount == 0) {
|
||||||
}
|
// this.hammerNode.children[1].active = true;
|
||||||
if(cc.fx.GameConfig.GM_INFO.hammerAmount > 0) {
|
// this.hammerNode.children[2].active = true;
|
||||||
this.hammerNode.children[1].active = true;
|
// NumberToImage.numberToImageNodes(1, 18, 15, "mul", this.hammerNode.children[2], true);
|
||||||
this.hammerNode.children[0].active = false;
|
// } else {
|
||||||
NumberToImage.numberToImageNodes(cc.fx.GameConfig.GM_INFO.hammerAmount, 35, 15, "mul", this.hammerNode.children[1], true);
|
// this.hammerNode.children[0].active = true
|
||||||
} else {
|
// }
|
||||||
this.hammerNode.children[0].active = true;
|
// if(cc.fx.GameConfig.GM_INFO.magicAmount == 0) {
|
||||||
this.hammerNode.children[1].active = false;
|
// this.magicNode.children[1].active = true;
|
||||||
}
|
// this.magicNode.children[2].active = true;
|
||||||
if(cc.fx.GameConfig.GM_INFO.magicAmount > 0) {
|
// NumberToImage.numberToImageNodes(34, 18, 15, "mul", this.magicNode.children[2], true);
|
||||||
this.magicNode.children[1].active = true;
|
// } else {
|
||||||
this.magicNode.children[0].active = false;
|
// this.magicNode.children[0].active = true
|
||||||
NumberToImage.numberToImageNodes(cc.fx.GameConfig.GM_INFO.magicAmount, 35, 15, "mul", this.magicNode.children[1], true);
|
// }
|
||||||
} else {
|
// }
|
||||||
this.magicNode.children[0].active = true
|
|
||||||
this.magicNode.children[1].active = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
startUpdate() {
|
startUpdate() {
|
||||||
if (this.gameStart == false) {
|
if (this.gameStart == false) {
|
||||||
|
@ -215,6 +213,16 @@ export default class MapConroler extends cc.Component {
|
||||||
console.log("准备进入下一关,发送下一关进入");
|
console.log("准备进入下一关,发送下一关进入");
|
||||||
cc.fx.GameTool.shushu_Track("enter_stage");
|
cc.fx.GameTool.shushu_Track("enter_stage");
|
||||||
this.startTimeCutDown();
|
this.startTimeCutDown();
|
||||||
|
// if (cc.fx.GameConfig.GM_INFO.level + 1 == 1) {
|
||||||
|
// this.guide.getComponent(cc.Animation).stop();
|
||||||
|
// this.guide.active = false;}
|
||||||
|
console.log("开始游戏倒计时");
|
||||||
|
for (let i = 0; i < this.blocks.length; i++) {
|
||||||
|
if (this.blocks[i].getComponent("Block").type == 6) {
|
||||||
|
this.blocks[i].getChildByName("boom").getComponent("Boom").startBoom();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -305,7 +313,13 @@ export default class MapConroler extends cc.Component {
|
||||||
this.mapBlocksWall[i].push(block);
|
this.mapBlocksWall[i].push(block);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(cc.fx.GameConfig.GM_INFO.level + 1 == 10000) {
|
||||||
|
this.guide.active = true;
|
||||||
|
this.guide.zIndex = 1000;
|
||||||
|
this.guide.getComponent(cc.Animation).play();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
this.wallInit();
|
this.wallInit();
|
||||||
this.blockInit();
|
this.blockInit();
|
||||||
|
|
||||||
|
@ -1480,7 +1494,7 @@ export default class MapConroler extends cc.Component {
|
||||||
console.log("复活回调函数内", data);
|
console.log("复活回调函数内", data);
|
||||||
cc.fx.GameTool.changeCoin(data);
|
cc.fx.GameTool.changeCoin(data);
|
||||||
MiniGameSdk.API.showToast("继续游戏");
|
MiniGameSdk.API.showToast("继续游戏");
|
||||||
NumberToImage.numberToImageNodes(cc.fx.GameConfig.GM_INFO.coin, 30, 15, "coin_", this.coin, true);
|
|
||||||
if (cc.fx.GameConfig.GM_INFO.review < 2)
|
if (cc.fx.GameConfig.GM_INFO.review < 2)
|
||||||
cc.fx.GameConfig.GM_INFO.review += 1;
|
cc.fx.GameConfig.GM_INFO.review += 1;
|
||||||
|
|
||||||
|
@ -1631,7 +1645,6 @@ export default class MapConroler extends cc.Component {
|
||||||
|
|
||||||
//开始倒计时
|
//开始倒计时
|
||||||
startTimeCutDown() {
|
startTimeCutDown() {
|
||||||
this.startBoom();
|
|
||||||
this.scheduleCallback = function () {
|
this.scheduleCallback = function () {
|
||||||
if (this.pause) return;
|
if (this.pause) return;
|
||||||
if (this.timeNumber <= 0) {
|
if (this.timeNumber <= 0) {
|
||||||
|
@ -1684,7 +1697,7 @@ export default class MapConroler extends cc.Component {
|
||||||
if (!this.node.parent.getChildByName("Ice").active && !this.pause) {
|
if (!this.node.parent.getChildByName("Ice").active && !this.pause) {
|
||||||
const timestamp = Date.now();
|
const timestamp = Date.now();
|
||||||
this.freezeMask.active = true;
|
this.freezeMask.active = true;
|
||||||
this.stopBoom();
|
|
||||||
this.pause = true;
|
this.pause = true;
|
||||||
this.node.parent.getChildByName("Ice").active = true;
|
this.node.parent.getChildByName("Ice").active = true;
|
||||||
// this.node.parent.getChildByName("Top").getChildByName("Ice").active = true;
|
// this.node.parent.getChildByName("Top").getChildByName("Ice").active = true;
|
||||||
|
@ -1692,8 +1705,7 @@ export default class MapConroler extends cc.Component {
|
||||||
cc.fx.GameConfig.GM_INFO.freezeAmount -= 1;
|
cc.fx.GameConfig.GM_INFO.freezeAmount -= 1;
|
||||||
if (cc.fx.GameConfig.GM_INFO.freezeAmount < 0)
|
if (cc.fx.GameConfig.GM_INFO.freezeAmount < 0)
|
||||||
cc.fx.GameConfig.GM_INFO.freezeAmount = 0;
|
cc.fx.GameConfig.GM_INFO.freezeAmount = 0;
|
||||||
this.setPropNum();
|
this.iceLabel.string = cc.fx.GameConfig.GM_INFO.freezeAmount.toString();
|
||||||
// this.iceLabel.string = cc.fx.GameConfig.GM_INFO.freezeAmount.toString();
|
|
||||||
let propInfo = cc.fx.StorageMessage.getStorage("prop");
|
let propInfo = cc.fx.StorageMessage.getStorage("prop");
|
||||||
propInfo.freezeAmount = cc.fx.GameConfig.GM_INFO.freezeAmount;
|
propInfo.freezeAmount = cc.fx.GameConfig.GM_INFO.freezeAmount;
|
||||||
propInfo.timestamp = timestamp;
|
propInfo.timestamp = timestamp;
|
||||||
|
@ -1722,15 +1734,12 @@ export default class MapConroler extends cc.Component {
|
||||||
this.node.parent.getChildByName("Ice").active = false;
|
this.node.parent.getChildByName("Ice").active = false;
|
||||||
// this.node.parent.getChildByName("Top").getChildByName("Ice").active = false;
|
// this.node.parent.getChildByName("Top").getChildByName("Ice").active = false;
|
||||||
this.pause = false;
|
this.pause = false;
|
||||||
this.startBoom();
|
|
||||||
// this.startTimeCutDown();
|
// this.startTimeCutDown();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
handleBuySuccess(data) {
|
handleBuySuccess(data) {
|
||||||
NumberToImage.numberToImageNodes(cc.fx.GameConfig.GM_INFO.coin, 30, 15, "coin_", this.coin, true);
|
|
||||||
this.pause = false;
|
this.pause = false;
|
||||||
this.startBoom();
|
|
||||||
const timestamp = Date.now();
|
const timestamp = Date.now();
|
||||||
// console.log("回调函数内:",this.pause);
|
// console.log("回调函数内:",this.pause);
|
||||||
let freezeBtn = this.node.parent.getChildByName("Bottom").getChildByName("timeBtn");
|
let freezeBtn = this.node.parent.getChildByName("Bottom").getChildByName("timeBtn");
|
||||||
|
@ -1747,8 +1756,7 @@ export default class MapConroler extends cc.Component {
|
||||||
cc.fx.StorageMessage.setStorage("prop", propInfo);
|
cc.fx.StorageMessage.setStorage("prop", propInfo);
|
||||||
this.node.parent.parent.parent.getComponent("SceneManager").closePropBuy();
|
this.node.parent.parent.parent.getComponent("SceneManager").closePropBuy();
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.setPropNum();
|
this.iceLabel.string = cc.fx.GameConfig.GM_INFO.freezeAmount.toString();
|
||||||
// this.iceLabel.string = cc.fx.GameConfig.GM_INFO.freezeAmount.toString();
|
|
||||||
MiniGameSdk.API.showToast("购买冻结时间道具成功");
|
MiniGameSdk.API.showToast("购买冻结时间道具成功");
|
||||||
}, 200);
|
}, 200);
|
||||||
|
|
||||||
|
@ -1763,8 +1771,7 @@ export default class MapConroler extends cc.Component {
|
||||||
this.node.parent.parent.parent.getComponent("SceneManager").closePropBuy();
|
this.node.parent.parent.parent.getComponent("SceneManager").closePropBuy();
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
MiniGameSdk.API.showToast("购买锤子道具成功");
|
MiniGameSdk.API.showToast("购买锤子道具成功");
|
||||||
this.setPropNum();
|
this.magicLabel.string = cc.fx.GameConfig.GM_INFO.magicAmount.toString();
|
||||||
// this.magicLabel.string = cc.fx.GameConfig.GM_INFO.magicAmount.toString();
|
|
||||||
}, 200);
|
}, 200);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1776,8 +1783,7 @@ export default class MapConroler extends cc.Component {
|
||||||
cc.fx.StorageMessage.setStorage("prop", propInfo);
|
cc.fx.StorageMessage.setStorage("prop", propInfo);
|
||||||
this.node.parent.parent.parent.getComponent("SceneManager").closePropBuy();
|
this.node.parent.parent.parent.getComponent("SceneManager").closePropBuy();
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.setPropNum();
|
this.hammerLabel.string = cc.fx.GameConfig.GM_INFO.hammerAmount.toString();
|
||||||
// this.hammerLabel.string = cc.fx.GameConfig.GM_INFO.hammerAmount.toString();
|
|
||||||
MiniGameSdk.API.showToast("购买魔法棒道具成功");
|
MiniGameSdk.API.showToast("购买魔法棒道具成功");
|
||||||
}, 200);
|
}, 200);
|
||||||
|
|
||||||
|
@ -1818,8 +1824,7 @@ export default class MapConroler extends cc.Component {
|
||||||
cc.fx.GameConfig.GM_INFO.hammerAmount -= 1;
|
cc.fx.GameConfig.GM_INFO.hammerAmount -= 1;
|
||||||
if (cc.fx.GameConfig.GM_INFO.hammerAmount < 0)
|
if (cc.fx.GameConfig.GM_INFO.hammerAmount < 0)
|
||||||
cc.fx.GameConfig.GM_INFO.hammerAmount = 0;
|
cc.fx.GameConfig.GM_INFO.hammerAmount = 0;
|
||||||
this.setPropNum();
|
this.hammerLabel.string = cc.fx.GameConfig.GM_INFO.hammerAmount.toString();
|
||||||
// this.hammerLabel.string = cc.fx.GameConfig.GM_INFO.hammerAmount.toString();
|
|
||||||
let propInfo = cc.fx.StorageMessage.getStorage("prop");
|
let propInfo = cc.fx.StorageMessage.getStorage("prop");
|
||||||
console.log("锤子道具信息:", propInfo);
|
console.log("锤子道具信息:", propInfo);
|
||||||
propInfo.hammerAmount = cc.fx.GameConfig.GM_INFO.hammerAmount;
|
propInfo.hammerAmount = cc.fx.GameConfig.GM_INFO.hammerAmount;
|
||||||
|
@ -1921,8 +1926,7 @@ export default class MapConroler extends cc.Component {
|
||||||
cc.fx.GameConfig.GM_INFO.magicAmount -= 1;
|
cc.fx.GameConfig.GM_INFO.magicAmount -= 1;
|
||||||
if (cc.fx.GameConfig.GM_INFO.magicAmount < 0)
|
if (cc.fx.GameConfig.GM_INFO.magicAmount < 0)
|
||||||
cc.fx.GameConfig.GM_INFO.magicAmount = 0;
|
cc.fx.GameConfig.GM_INFO.magicAmount = 0;
|
||||||
this.setPropNum();
|
this.magicLabel.string = cc.fx.GameConfig.GM_INFO.magicAmount.toString();
|
||||||
// this.magicLabel.string = cc.fx.GameConfig.GM_INFO.magicAmount.toString();
|
|
||||||
let propInfo = cc.fx.StorageMessage.getStorage("prop");
|
let propInfo = cc.fx.StorageMessage.getStorage("prop");
|
||||||
propInfo.magicAmount = cc.fx.GameConfig.GM_INFO.magicAmount;
|
propInfo.magicAmount = cc.fx.GameConfig.GM_INFO.magicAmount;
|
||||||
propInfo.timestamp = timestamp;
|
propInfo.timestamp = timestamp;
|
||||||
|
@ -2030,11 +2034,9 @@ export default class MapConroler extends cc.Component {
|
||||||
usePause() {
|
usePause() {
|
||||||
if (this.pause) {
|
if (this.pause) {
|
||||||
this.pause = false;
|
this.pause = false;
|
||||||
this.startBoom();
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.pause = true;
|
this.pause = true;
|
||||||
this.stopBoom();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2102,7 +2104,7 @@ export default class MapConroler extends cc.Component {
|
||||||
x = block.x - block.width * 0.33;
|
x = block.x - block.width * 0.33;
|
||||||
}
|
}
|
||||||
else if (block.anchorX == 0.66) {
|
else if (block.anchorX == 0.66) {
|
||||||
x = block.x - block.width * 0.66;
|
x = block.x + block.width * 0.66;
|
||||||
}
|
}
|
||||||
if (jg == 3) {
|
if (jg == 3) {
|
||||||
name = "right_" + height + "_" + width;
|
name = "right_" + height + "_" + width;
|
||||||
|
@ -2146,22 +2148,6 @@ export default class MapConroler extends cc.Component {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
startBoom(){
|
|
||||||
for (let i = 0; i < this.blocks.length; i++) {
|
|
||||||
if (this.blocks[i].getComponent("Block").type == 6) {
|
|
||||||
this.blocks[i].getChildByName("boom").getComponent("Boom").startBoom();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
stopBoom() {
|
|
||||||
for (let i = 0; i < this.blocks.length; i++) {
|
|
||||||
if (this.blocks[i].getComponent("Block").type == 6) {
|
|
||||||
this.blocks[i].getChildByName("boom").getComponent("Boom").stopBoom();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
update(dt) {
|
update(dt) {
|
||||||
|
|
|
@ -264,7 +264,6 @@ export default class SceneManager extends cc.Component {
|
||||||
this.pause.getComponent("btnControl").setTouch(false);
|
this.pause.getComponent("btnControl").setTouch(false);
|
||||||
this.node.getChildByName("Pause").active = true;
|
this.node.getChildByName("Pause").active = true;
|
||||||
MapConroler._instance.pause = true;
|
MapConroler._instance.pause = true;
|
||||||
MapConroler._instance.stopBoom();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -280,13 +279,11 @@ export default class SceneManager extends cc.Component {
|
||||||
this.node.getChildByName("Pause").active = false;
|
this.node.getChildByName("Pause").active = false;
|
||||||
if (MapConroler._instance.node.parent.getChildByName("Ice").active == false) {
|
if (MapConroler._instance.node.parent.getChildByName("Ice").active == false) {
|
||||||
MapConroler._instance.pause = false;
|
MapConroler._instance.pause = false;
|
||||||
MapConroler._instance.startBoom();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
openPropBuy(name) {
|
openPropBuy(name) {
|
||||||
MapConroler._instance.pause = true;
|
MapConroler._instance.pause = true;
|
||||||
MapConroler._instance.stopBoom();
|
|
||||||
this.btnName = name;
|
this.btnName = name;
|
||||||
let propWindow = this.node.getChildByName("Game").getChildByName("propWindow");
|
let propWindow = this.node.getChildByName("Game").getChildByName("propWindow");
|
||||||
propWindow.active = true;
|
propWindow.active = true;
|
||||||
|
@ -331,7 +328,6 @@ export default class SceneManager extends cc.Component {
|
||||||
|
|
||||||
closePropBuy() {
|
closePropBuy() {
|
||||||
MapConroler._instance.pause = false;
|
MapConroler._instance.pause = false;
|
||||||
MapConroler._instance.startBoom();
|
|
||||||
let freezeBtn = MapConroler._instance.node.parent.getChildByName("Bottom").getChildByName("timeBtn");
|
let freezeBtn = MapConroler._instance.node.parent.getChildByName("Bottom").getChildByName("timeBtn");
|
||||||
let hammerBtn = MapConroler._instance.node.parent.getChildByName("Bottom").getChildByName("destroyBtn");
|
let hammerBtn = MapConroler._instance.node.parent.getChildByName("Bottom").getChildByName("destroyBtn");
|
||||||
let magicBtn = MapConroler._instance.node.parent.getChildByName("Bottom").getChildByName("magicBtn");
|
let magicBtn = MapConroler._instance.node.parent.getChildByName("Bottom").getChildByName("magicBtn");
|
||||||
|
|
|
@ -837,7 +837,7 @@ var GameTool = {
|
||||||
price = 12800;
|
price = 12800;
|
||||||
MiniGameSdk.API.showToast("充值成功,获得32000金币");
|
MiniGameSdk.API.showToast("充值成功,获得32000金币");
|
||||||
break;
|
break;
|
||||||
case "gold_5":
|
case "gold_pack_5":
|
||||||
cc.fx.GameTool.changeCoin(100000);
|
cc.fx.GameTool.changeCoin(100000);
|
||||||
coin = 100000;
|
coin = 100000;
|
||||||
price = 32800;
|
price = 32800;
|
||||||
|
|
|
@ -38,17 +38,12 @@ export default class Boom extends cc.Component {
|
||||||
this.schedule(this.updateTime, 1);
|
this.schedule(this.updateTime, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
destroyBoom(){
|
stopBoom(){
|
||||||
this.unschedule(this.updateTime);
|
this.unschedule(this.updateTime);
|
||||||
this.node.parent.getComponent("Block").resetFreeze();
|
this.node.parent.getComponent("Block").resetFreeze();
|
||||||
this.node.destroy();
|
this.node.destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
stopBoom(){
|
|
||||||
this.unschedule(this.updateTime);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
updateTime(){
|
updateTime(){
|
||||||
this.time --;
|
this.time --;
|
||||||
|
@ -56,7 +51,6 @@ export default class Boom extends cc.Component {
|
||||||
if(this.time <= 0){
|
if(this.time <= 0){
|
||||||
this.unschedule(this.updateTime);
|
this.unschedule(this.updateTime);
|
||||||
this.node.getChildByName("zhandan").active = true;
|
this.node.getChildByName("zhandan").active = true;
|
||||||
this.node.getChildByName("bg").active = false;
|
|
||||||
const skeleton = this.node.getChildByName("zhandan").getComponent(sp.Skeleton);
|
const skeleton = this.node.getChildByName("zhandan").getComponent(sp.Skeleton);
|
||||||
skeleton.setAnimation(1,"eff",false);
|
skeleton.setAnimation(1,"eff",false);
|
||||||
// 监听动画完成事件
|
// 监听动画完成事件
|
||||||
|
|
|
@ -21,23 +21,20 @@
|
||||||
"__id__": 2
|
"__id__": 2
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"__id__": 5
|
"__id__": 4
|
||||||
},
|
|
||||||
{
|
|
||||||
"__id__": 7
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"_active": true,
|
"_active": true,
|
||||||
"_components": [
|
"_components": [
|
||||||
{
|
{
|
||||||
"__id__": 10
|
"__id__": 7
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"__id__": 11
|
"__id__": 8
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"_prefab": {
|
"_prefab": {
|
||||||
"__id__": 12
|
"__id__": 9
|
||||||
},
|
},
|
||||||
"_opacity": 255,
|
"_opacity": 255,
|
||||||
"_color": {
|
"_color": {
|
||||||
|
@ -86,115 +83,6 @@
|
||||||
"groupIndex": 0,
|
"groupIndex": 0,
|
||||||
"_id": ""
|
"_id": ""
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"__type__": "cc.Node",
|
|
||||||
"_name": "bg",
|
|
||||||
"_objFlags": 0,
|
|
||||||
"_parent": {
|
|
||||||
"__id__": 1
|
|
||||||
},
|
|
||||||
"_children": [],
|
|
||||||
"_active": true,
|
|
||||||
"_components": [
|
|
||||||
{
|
|
||||||
"__id__": 3
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"_prefab": {
|
|
||||||
"__id__": 4
|
|
||||||
},
|
|
||||||
"_opacity": 255,
|
|
||||||
"_color": {
|
|
||||||
"__type__": "cc.Color",
|
|
||||||
"r": 255,
|
|
||||||
"g": 255,
|
|
||||||
"b": 255,
|
|
||||||
"a": 255
|
|
||||||
},
|
|
||||||
"_contentSize": {
|
|
||||||
"__type__": "cc.Size",
|
|
||||||
"width": 62,
|
|
||||||
"height": 95
|
|
||||||
},
|
|
||||||
"_anchorPoint": {
|
|
||||||
"__type__": "cc.Vec2",
|
|
||||||
"x": 0.5,
|
|
||||||
"y": 0.5
|
|
||||||
},
|
|
||||||
"_trs": {
|
|
||||||
"__type__": "TypedArray",
|
|
||||||
"ctor": "Float64Array",
|
|
||||||
"array": [
|
|
||||||
0.614,
|
|
||||||
15.971,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
1,
|
|
||||||
1,
|
|
||||||
1,
|
|
||||||
1
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"_eulerAngles": {
|
|
||||||
"__type__": "cc.Vec3",
|
|
||||||
"x": 0,
|
|
||||||
"y": 0,
|
|
||||||
"z": 0
|
|
||||||
},
|
|
||||||
"_skewX": 0,
|
|
||||||
"_skewY": 0,
|
|
||||||
"_is3DNode": false,
|
|
||||||
"_groupIndex": 0,
|
|
||||||
"groupIndex": 0,
|
|
||||||
"_id": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.Sprite",
|
|
||||||
"_name": "",
|
|
||||||
"_objFlags": 0,
|
|
||||||
"node": {
|
|
||||||
"__id__": 2
|
|
||||||
},
|
|
||||||
"_enabled": true,
|
|
||||||
"_materials": [
|
|
||||||
{
|
|
||||||
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"_srcBlendFactor": 770,
|
|
||||||
"_dstBlendFactor": 771,
|
|
||||||
"_spriteFrame": {
|
|
||||||
"__uuid__": "e22aadda-4f7e-403a-a1e6-d5374fc2862a"
|
|
||||||
},
|
|
||||||
"_type": 0,
|
|
||||||
"_sizeMode": 1,
|
|
||||||
"_fillType": 0,
|
|
||||||
"_fillCenter": {
|
|
||||||
"__type__": "cc.Vec2",
|
|
||||||
"x": 0,
|
|
||||||
"y": 0
|
|
||||||
},
|
|
||||||
"_fillStart": 0,
|
|
||||||
"_fillRange": 0,
|
|
||||||
"_isTrimmedMode": true,
|
|
||||||
"_atlas": {
|
|
||||||
"__uuid__": "d2adfa00-68ea-4d63-97a0-44fca153a2d7"
|
|
||||||
},
|
|
||||||
"_id": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.PrefabInfo",
|
|
||||||
"root": {
|
|
||||||
"__id__": 1
|
|
||||||
},
|
|
||||||
"asset": {
|
|
||||||
"__id__": 0
|
|
||||||
},
|
|
||||||
"fileId": "4ahWLpW2tD8LfIbT5i2bbo",
|
|
||||||
"sync": false
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"__type__": "cc.Node",
|
"__type__": "cc.Node",
|
||||||
"_name": "time",
|
"_name": "time",
|
||||||
|
@ -206,7 +94,7 @@
|
||||||
"_active": false,
|
"_active": false,
|
||||||
"_components": [],
|
"_components": [],
|
||||||
"_prefab": {
|
"_prefab": {
|
||||||
"__id__": 6
|
"__id__": 3
|
||||||
},
|
},
|
||||||
"_opacity": 255,
|
"_opacity": 255,
|
||||||
"_color": {
|
"_color": {
|
||||||
|
@ -277,11 +165,11 @@
|
||||||
"_active": false,
|
"_active": false,
|
||||||
"_components": [
|
"_components": [
|
||||||
{
|
{
|
||||||
"__id__": 8
|
"__id__": 5
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"_prefab": {
|
"_prefab": {
|
||||||
"__id__": 9
|
"__id__": 6
|
||||||
},
|
},
|
||||||
"_opacity": 255,
|
"_opacity": 255,
|
||||||
"_color": {
|
"_color": {
|
||||||
|
@ -335,7 +223,7 @@
|
||||||
"_name": "",
|
"_name": "",
|
||||||
"_objFlags": 0,
|
"_objFlags": 0,
|
||||||
"node": {
|
"node": {
|
||||||
"__id__": 7
|
"__id__": 4
|
||||||
},
|
},
|
||||||
"_enabled": true,
|
"_enabled": true,
|
||||||
"_materials": [
|
"_materials": [
|
||||||
|
@ -398,7 +286,9 @@
|
||||||
],
|
],
|
||||||
"_srcBlendFactor": 770,
|
"_srcBlendFactor": 770,
|
||||||
"_dstBlendFactor": 771,
|
"_dstBlendFactor": 771,
|
||||||
"_spriteFrame": null,
|
"_spriteFrame": {
|
||||||
|
"__uuid__": "e22aadda-4f7e-403a-a1e6-d5374fc2862a"
|
||||||
|
},
|
||||||
"_type": 0,
|
"_type": 0,
|
||||||
"_sizeMode": 1,
|
"_sizeMode": 1,
|
||||||
"_fillType": 0,
|
"_fillType": 0,
|
||||||
|
@ -410,7 +300,9 @@
|
||||||
"_fillStart": 0,
|
"_fillStart": 0,
|
||||||
"_fillRange": 0,
|
"_fillRange": 0,
|
||||||
"_isTrimmedMode": true,
|
"_isTrimmedMode": true,
|
||||||
"_atlas": null,
|
"_atlas": {
|
||||||
|
"__uuid__": "d2adfa00-68ea-4d63-97a0-44fca153a2d7"
|
||||||
|
},
|
||||||
"_id": ""
|
"_id": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -35,7 +35,7 @@ export default class NewClass extends cc.Component {
|
||||||
{ product_id: "gold_2", name: "金币包2", price: 3600, coin:8000, title: "" },
|
{ product_id: "gold_2", name: "金币包2", price: 3600, coin:8000, title: "" },
|
||||||
{ product_id: "gold_3", name: "金币包3", price: 6800, coin:16000, title: "" },
|
{ product_id: "gold_3", name: "金币包3", price: 6800, coin:16000, title: "" },
|
||||||
{ product_id: "gold_4", name: "金币包4", price: 12800, coin:32000, title: "" },
|
{ product_id: "gold_4", name: "金币包4", price: 12800, coin:32000, title: "" },
|
||||||
{ product_id: "gold_5", name: "金币包5", price: 32800, coin:100000, title: "" },
|
{ product_id: "gold_pack_5", name: "金币包5", price: 32800, coin:100000, title: "" },
|
||||||
{ product_id: "gold_6", name: "金币包6", price: 64800, coin:240000, title: "" },
|
{ product_id: "gold_6", name: "金币包6", price: 64800, coin:240000, title: "" },
|
||||||
];
|
];
|
||||||
for (let i = 1; i <= 6 && i < this.itemList.children.length; i++) {
|
for (let i = 1; i <= 6 && i < this.itemList.children.length; i++) {
|
||||||
|
@ -97,8 +97,8 @@ export default class NewClass extends cc.Component {
|
||||||
case "gold_4":
|
case "gold_4":
|
||||||
price = 12800;
|
price = 12800;
|
||||||
break;
|
break;
|
||||||
case "gold_5":
|
case "gold_pack_5":
|
||||||
price = 32800;
|
price = 100;
|
||||||
break;
|
break;
|
||||||
case "gold_6":
|
case "gold_6":
|
||||||
price = 64800;
|
price = 64800;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user