增加一点更改,增加金币获得提示,更改点击方块高亮精确位置
This commit is contained in:
parent
0fe42d5322
commit
919f133538
|
@ -248,10 +248,10 @@ export default class Block extends cc.Component {
|
|||
let name = "xz_"+this.block_Info.block;
|
||||
this.hit.getComponent(cc.Sprite).spriteFrame = this.ice_SpriteFrame._spriteFrames[name];
|
||||
this.hit.setAnchorPoint(this.node.anchorX,this.node.anchorY);
|
||||
this.hit.setPosition(13,-11);
|
||||
if(this.hit.anchorX == 0.5) this.hit.setPosition(0,-11);
|
||||
else if(this.hit.anchorX == 0.33) this.hit.setPosition(-13,-11);
|
||||
else if(this.hit.anchorX == 0.66) this.hit.setPosition(2,-9);
|
||||
this.setHitPosition();
|
||||
// if(this.hit.anchorX == 0.5) this.hit.setPosition(0,-11);
|
||||
// else if(this.hit.anchorX == 0.33) this.hit.setPosition(-13,-11);
|
||||
// else if(this.hit.anchorX == 0.66) this.hit.setPosition(2,-9);
|
||||
// this.hit.opacity = 0;
|
||||
this.hit.active = false;
|
||||
break;
|
||||
|
@ -877,10 +877,10 @@ export default class Block extends cc.Component {
|
|||
let name = "xz_"+this.block_Info.block;
|
||||
this.hit.getComponent(cc.Sprite).spriteFrame = this.ice_SpriteFrame._spriteFrames[name];
|
||||
this.hit.setAnchorPoint(this.node.anchorX,this.node.anchorY);
|
||||
this.hit.setPosition(13,-11);
|
||||
if(this.hit.anchorX == 0.5) this.hit.setPosition(0,-11);
|
||||
else if(this.hit.anchorX == 0.33) this.hit.setPosition(-13,-11);
|
||||
else if(this.hit.anchorX == 0.66) this.hit.setPosition(2,-9);
|
||||
this.setHitPosition();
|
||||
// if(this.hit.anchorX == 0.5) this.hit.setPosition(0,-11);
|
||||
// else if(this.hit.anchorX == 0.33) this.hit.setPosition(-13,-11);
|
||||
// else if(this.hit.anchorX == 0.66) this.hit.setPosition(2,-9);
|
||||
this.hit.active = false;
|
||||
}
|
||||
|
||||
|
@ -1288,7 +1288,73 @@ export default class Block extends cc.Component {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//精细更改 点击高亮位置
|
||||
setHitPosition(){
|
||||
this.hit.setPosition(13,-16);
|
||||
switch(this.block_Info.block){
|
||||
case 0:
|
||||
this.hit.setPosition(15,-20);
|
||||
break;
|
||||
case 1:
|
||||
this.hit.setPosition(13,-17.5);
|
||||
break;
|
||||
case 2:
|
||||
this.hit.setPosition(15,-16);
|
||||
break;
|
||||
case 4:
|
||||
this.hit.setPosition(12,-18);
|
||||
break;
|
||||
case 6:
|
||||
this.hit.setPosition(15,-14);
|
||||
break;
|
||||
case 7:
|
||||
this.hit.setPosition(17,-9);
|
||||
break;
|
||||
case 8:
|
||||
this.hit.setPosition(15,-14);
|
||||
break;
|
||||
case 9:
|
||||
this.hit.setPosition(13,-13);
|
||||
break;
|
||||
case 10:
|
||||
this.hit.setPosition(-5.5,-14);
|
||||
break;
|
||||
case 11:
|
||||
this.hit.setPosition(-6,-15);
|
||||
break;
|
||||
case 12:
|
||||
this.hit.setPosition(15,-15);
|
||||
break;
|
||||
case 13:
|
||||
this.hit.setPosition(15,-13);
|
||||
break;
|
||||
case 13:
|
||||
this.hit.setPosition(15,-14);
|
||||
break;
|
||||
case 14:
|
||||
this.hit.setPosition(2,-7);
|
||||
break;
|
||||
case 15:
|
||||
this.hit.setPosition(15,-16);
|
||||
break;
|
||||
case 16:
|
||||
this.hit.setPosition(1,-15.5);
|
||||
break;
|
||||
case 17:
|
||||
this.hit.setPosition(15,-14);
|
||||
break;
|
||||
case 18:
|
||||
this.hit.setPosition(5,-13);
|
||||
break;
|
||||
case 21:
|
||||
this.hit.setPosition(-2,-14);
|
||||
break;
|
||||
case 22:
|
||||
this.hit.setPosition(14,-14);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -372,7 +372,14 @@ var GameTool = {
|
|||
return;
|
||||
}
|
||||
cc.fx.GameConfig.GM_INFO.coin += coin;
|
||||
|
||||
if(coin > 0){
|
||||
let data = "获得" + (coin) + "金币";
|
||||
MiniGameSdk.API.showToast(data);
|
||||
}
|
||||
else{
|
||||
let data = "消耗" + (-coin) + "金币";
|
||||
MiniGameSdk.API.showToast(data);
|
||||
}
|
||||
if (cc.fx.GameConfig.GM_INFO.coin < 0) {
|
||||
cc.fx.GameConfig.GM_INFO.coin = 0;
|
||||
}
|
||||
|
@ -887,6 +894,11 @@ var GameTool = {
|
|||
shushu_Track: function(name,data){
|
||||
let eventData = {}
|
||||
switch(name){
|
||||
case "login":
|
||||
eventData = {
|
||||
register_time: data.register_time,
|
||||
}
|
||||
break;
|
||||
case "register":
|
||||
eventData = {
|
||||
register_time: data.register_time,
|
||||
|
|
Loading…
Reference in New Issue
Block a user