更新
This commit is contained in:
parent
98e89326dd
commit
9fbe2d6d38
|
@ -431,7 +431,7 @@ export default class Block extends cc.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
//方块落点
|
//方块落点
|
||||||
blockFall(point) {
|
blockFall(point, type) {
|
||||||
if (this.over == true) return;
|
if (this.over == true) return;
|
||||||
// // 假设 MapConroler 有网格信息,这里简单示例
|
// // 假设 MapConroler 有网格信息,这里简单示例
|
||||||
const mapWidth = MapConroler._instance.mapWidth;
|
const mapWidth = MapConroler._instance.mapWidth;
|
||||||
|
@ -481,7 +481,7 @@ export default class Block extends cc.Component {
|
||||||
MapConroler._instance.changeState();
|
MapConroler._instance.changeState();
|
||||||
this.removeBoxCollider();
|
this.removeBoxCollider();
|
||||||
this.removeMapBlock();
|
this.removeMapBlock();
|
||||||
this.removeAction(jg);
|
this.removeAction(jg, type);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
MapConroler._instance.upDoor(this.color);
|
MapConroler._instance.upDoor(this.color);
|
||||||
|
@ -498,7 +498,7 @@ export default class Block extends cc.Component {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
removeAction(diraction) {
|
removeAction(diraction, type) {
|
||||||
this.node.off(cc.Node.EventType.TOUCH_START);
|
this.node.off(cc.Node.EventType.TOUCH_START);
|
||||||
this.node.off(cc.Node.EventType.TOUCH_MOVE);
|
this.node.off(cc.Node.EventType.TOUCH_MOVE);
|
||||||
this.node.off(cc.Node.EventType.TOUCH_CANCEL);
|
this.node.off(cc.Node.EventType.TOUCH_CANCEL);
|
||||||
|
@ -603,7 +603,9 @@ export default class Block extends cc.Component {
|
||||||
MapConroler._instance.nextLevel();
|
MapConroler._instance.nextLevel();
|
||||||
this.node.active = false;
|
this.node.active = false;
|
||||||
this.node.removeFromParent();
|
this.node.removeFromParent();
|
||||||
|
if (type == true && MapConroler._instance.openWall.length > 0) {
|
||||||
|
MapConroler._instance.predict_End();
|
||||||
|
}
|
||||||
// this.node.active = false;
|
// this.node.active = false;
|
||||||
// this.node.removeFromParent();
|
// this.node.removeFromParent();
|
||||||
}, time * 1000);
|
}, time * 1000);
|
||||||
|
@ -694,11 +696,11 @@ export default class Block extends cc.Component {
|
||||||
let local = cc.v2(this.node.x - 50, this.node.y + 50);
|
let local = cc.v2(this.node.x - 50, this.node.y + 50);
|
||||||
if (this.type != 10) {
|
if (this.type != 10) {
|
||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
this.blockFall(local);
|
this.blockFall(local, true);
|
||||||
if (this.type == 9) {
|
if (this.type == 9) {
|
||||||
if (this.block_Info.node) {
|
if (this.block_Info.node) {
|
||||||
let localTemp = cc.v2(this.block_Info.node.x - 50, this.block_Info.node.y + 50);
|
let localTemp = cc.v2(this.block_Info.node.x - 50, this.block_Info.node.y + 50);
|
||||||
this.block_Info.node.getComponent("Block").blockFall(localTemp);
|
this.block_Info.node.getComponent("Block").blockFall(localTemp, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -901,7 +903,7 @@ export default class Block extends cc.Component {
|
||||||
tim = time2
|
tim = time2
|
||||||
}
|
}
|
||||||
if (MapConroler._instance.hammer == true) MapConroler._instance.hammer = false;
|
if (MapConroler._instance.hammer == true) MapConroler._instance.hammer = false;
|
||||||
this.scheduleCallback2= setTimeout(() => {
|
this.scheduleCallback2 = setTimeout(() => {
|
||||||
//如果方块可以消除
|
//如果方块可以消除
|
||||||
MapConroler._instance.blockNum -= 1;
|
MapConroler._instance.blockNum -= 1;
|
||||||
MapConroler._instance.special_Treatment(this.node);
|
MapConroler._instance.special_Treatment(this.node);
|
||||||
|
|
|
@ -2779,6 +2779,11 @@ export default class MapConroler extends cc.Component {
|
||||||
// .start();
|
// .start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//提前判断游戏结束
|
||||||
|
predict_End() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
update(dt) {
|
update(dt) {
|
||||||
|
|
||||||
|
|
|
@ -1167,6 +1167,7 @@ export namespace MiniGameSdk {
|
||||||
if (typeof wx !== 'undefined' && wx !== null) {
|
if (typeof wx !== 'undefined' && wx !== null) {
|
||||||
console.log("设置用户注册属性");
|
console.log("设置用户注册属性");
|
||||||
API._ta.userSet({ register_time: time });
|
API._ta.userSet({ register_time: time });
|
||||||
|
API._ta.userSet({ uid: cc.fx.GameConfig.GM_INFO.uid });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1175,6 +1176,7 @@ export namespace MiniGameSdk {
|
||||||
console.log("上传金币和关卡信息给数数")
|
console.log("上传金币和关卡信息给数数")
|
||||||
API._ta.userSet({ current_level: (cc.fx.GameConfig.GM_INFO.level + 1) });
|
API._ta.userSet({ current_level: (cc.fx.GameConfig.GM_INFO.level + 1) });
|
||||||
API._ta.userSet({ current_coin: cc.fx.GameConfig.GM_INFO.coin });
|
API._ta.userSet({ current_coin: cc.fx.GameConfig.GM_INFO.coin });
|
||||||
|
API._ta.userSet({ uid: cc.fx.GameConfig.GM_INFO.uid });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1190,6 +1192,7 @@ export namespace MiniGameSdk {
|
||||||
current_health: cc.fx.GameConfig.GM_INFO.hp, //当前体力值
|
current_health: cc.fx.GameConfig.GM_INFO.hp, //当前体力值
|
||||||
tmp_coin: cc.fx.GameConfig.GM_INFO.coin,//当前金币
|
tmp_coin: cc.fx.GameConfig.GM_INFO.coin,//当前金币
|
||||||
version: cc.fx.GameConfig.GM_INFO.version.toString(),//当前版本号
|
version: cc.fx.GameConfig.GM_INFO.version.toString(),//当前版本号
|
||||||
|
uid: cc.fx.GameConfig.GM_INFO.uid, //用户id
|
||||||
};
|
};
|
||||||
if (register_time != null) {
|
if (register_time != null) {
|
||||||
console.log("设置用户公共属性注册:————————————", register_time);
|
console.log("设置用户公共属性注册:————————————", register_time);
|
||||||
|
@ -1199,6 +1202,7 @@ export namespace MiniGameSdk {
|
||||||
tmp_coin: cc.fx.GameConfig.GM_INFO.coin,//当前金币
|
tmp_coin: cc.fx.GameConfig.GM_INFO.coin,//当前金币
|
||||||
version: cc.fx.GameConfig.GM_INFO.version.toString(),
|
version: cc.fx.GameConfig.GM_INFO.version.toString(),
|
||||||
register_time: register_time,
|
register_time: register_time,
|
||||||
|
uid: cc.fx.GameConfig.GM_INFO.uid, //用户id
|
||||||
pay_user: pay_user
|
pay_user: pay_user
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1209,6 +1213,7 @@ export namespace MiniGameSdk {
|
||||||
current_health: cc.fx.GameConfig.GM_INFO.hp, //当前体力值
|
current_health: cc.fx.GameConfig.GM_INFO.hp, //当前体力值
|
||||||
tmp_coin: cc.fx.GameConfig.GM_INFO.coin,//当前金币
|
tmp_coin: cc.fx.GameConfig.GM_INFO.coin,//当前金币
|
||||||
version: cc.fx.GameConfig.GM_INFO.version.toString(),
|
version: cc.fx.GameConfig.GM_INFO.version.toString(),
|
||||||
|
uid: cc.fx.GameConfig.GM_INFO.uid, //用户id
|
||||||
pay_user: pay_user
|
pay_user: pay_user
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -167,6 +167,7 @@ export default class NewClass extends cc.Component {
|
||||||
const iosOutTradeNo = cc.fx.GameConfig.GM_INFO.iosOutTradeNo;
|
const iosOutTradeNo = cc.fx.GameConfig.GM_INFO.iosOutTradeNo;
|
||||||
cc.fx.GameConfig.GM_INFO.iosOutTradeNo = "";
|
cc.fx.GameConfig.GM_INFO.iosOutTradeNo = "";
|
||||||
this.openLoad();
|
this.openLoad();
|
||||||
|
this.btn_Touch = true;
|
||||||
Utils.getIosPayInfo(iosOutTradeNo,
|
Utils.getIosPayInfo(iosOutTradeNo,
|
||||||
(data) => {
|
(data) => {
|
||||||
console.log("获得轮训结果:", data);
|
console.log("获得轮训结果:", data);
|
||||||
|
@ -394,6 +395,7 @@ export default class NewClass extends cc.Component {
|
||||||
// MiniGameSdk.API.showToast("IOS系统暂不支持支付");
|
// MiniGameSdk.API.showToast("IOS系统暂不支持支付");
|
||||||
// this.btn_Touch = true;
|
// this.btn_Touch = true;
|
||||||
this.openLoad();
|
this.openLoad();
|
||||||
|
this.btn_Touch = true;
|
||||||
let iosPayInfo = {
|
let iosPayInfo = {
|
||||||
price: price,
|
price: price,
|
||||||
payment_name: productId,
|
payment_name: productId,
|
||||||
|
@ -420,6 +422,7 @@ export default class NewClass extends cc.Component {
|
||||||
// }, 500);
|
// }, 500);
|
||||||
|
|
||||||
this.openLoad();
|
this.openLoad();
|
||||||
|
this.btn_Touch = true;
|
||||||
//console.log("7.14_____________________", "调用充值接口");
|
//console.log("7.14_____________________", "调用充值接口");
|
||||||
Utils.buyProp(id, count, price, systemType, productId, (res) => {
|
Utils.buyProp(id, count, price, systemType, productId, (res) => {
|
||||||
//console.log("获得充值结果", res);
|
//console.log("获得充值结果", res);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user