This commit is contained in:
YZ\249929363 2025-07-08 18:24:45 +08:00
parent c4a03c4554
commit 03ed530e92
3 changed files with 2377 additions and 3066 deletions

File diff suppressed because it is too large Load Diff

View File

@ -296,6 +296,14 @@ export default class SceneManager extends cc.Component {
propWindow.getChildByName("magic").active = false; propWindow.getChildByName("magic").active = false;
propWindow.getChildByName("buy_Btn").getComponent("btnControl").setTouch(true); propWindow.getChildByName("buy_Btn").getComponent("btnControl").setTouch(true);
propWindow.getChildByName(name).active = true; propWindow.getChildByName(name).active = true;
if(name == "hammer"){
propWindow.getChildByName("buy_Btn").getChildByName("hammer").active = true;
propWindow.getChildByName("buy_Btn").getChildByName("nomal").active = false;
}
else{
propWindow.getChildByName("buy_Btn").getChildByName("hammer").active = false;
propWindow.getChildByName("buy_Btn").getChildByName("nomal").active = true;
}
} }
clickBtn() { clickBtn() {

View File

@ -637,15 +637,13 @@ var GameTool = {
buyProp(propid,callback: Function) { buyProp(propid,callback: Function) {
//@ts-ignore //@ts-ignore
if (typeof wx!== 'undefined' && wx!== null) { if (typeof wx!== 'undefined' && wx!== null) {
let num = 3; let num = 3;
let cost = 1500;
if(propid == 2002){ if(propid == 2002){
cc.fx.GameTool.changeCoin(-1000); cost = 1000;
num = 1; num = 1;
} }
else{ cc.fx.GameTool.changeCoin(-cost);
cc.fx.GameTool.changeCoin(-1500);
}
cc.fx.GameTool.setUserProp(propid,num,(data)=>{ cc.fx.GameTool.setUserProp(propid,num,(data)=>{
}) })
const data = { const data = {
@ -661,7 +659,7 @@ var GameTool = {
const buyData = { const buyData = {
item_id:_id, item_id:_id,
item_num:3, item_num:3,
item_price:1500, item_price:cost,
cost_type:"gold" cost_type:"gold"
} }
console.log("____________即将上传Shop_buy",buyData); console.log("____________即将上传Shop_buy",buyData);