Commit 572856cc authored by wildfirecode's avatar wildfirecode

1

parent 063c86e8
......@@ -45,6 +45,10 @@
<script src="libs/downloadApp.js"></script>
<script src="libs/svga.egret.min.js"></script>
<script>
window['price1']=1;
window['price2']=2;
window['price3']=3;
window['price4']=4;
window['INIT_BALL_NUMS']=1;
window['numsP'] = 0.1;
// window['debugPhysics']=true;
......
......@@ -831,10 +831,10 @@ export class NetManager extends ABNetManager {
};
this.send(net);
}
public hc_exchange(callback: Function, category: number, propType?: number): void {
public hc_exchange(callback: Function, propType?: number): void {
const d: any = {
activityId: DataManager.ins.customCfgData.actId,
category: category
activityId: DataManager.ins.customCfgData.actId
};
if (propType) {
d.propType = propType;
......
egret/resource/assets/common/btn.png

22.1 KB | W: | H:

egret/resource/assets/common/btn.png

16.7 KB | W: | H:

egret/resource/assets/common/btn.png
egret/resource/assets/common/btn.png
egret/resource/assets/common/btn.png
egret/resource/assets/common/btn.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -37,5 +37,5 @@
<e:Label text="使用钻石购买" y="524" textColor="0x821818" size="27" x="228"/>
<e:Label text="向好友索要体力" y="663" textColor="0x821818" size="27" x="232"/>
<e:Label id="invitTxt" text="(已领0/1)" y="699" textColor="0x821818" size="27" x="232"/>
<e:Label text="20" y="565" textColor="0x821818" x="274" size="27"/>
<e:Label id="price1Txt" text="20" y="565" textColor="0x821818" x="274" size="27"/>
</e:Skin>
\ No newline at end of file
......@@ -18,4 +18,5 @@
</e:Skin>
</e:skinName>
</e:Button>
<e:Label id="priceTxt" text="X100" x="344" y="614.52" bold="true" size="44" touchEnabled="false"/>
</e:Skin>
\ No newline at end of file
......@@ -17,4 +17,5 @@
</e:Skin>
</e:skinName>
</e:Button>
<e:Label id="priceTxt" text="X100" x="344" y="614.52" bold="true" size="44" touchEnabled="false"/>
</e:Skin>
\ No newline at end of file
......@@ -18,4 +18,5 @@
</e:Skin>
</e:skinName>
</e:Button>
<e:Label id="priceTxt" text="X100" x="344" y="614.52" bold="true" size="44" touchEnabled="false"/>
</e:Skin>
\ No newline at end of file
......@@ -2,6 +2,9 @@
<e:Skin class="ShopSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<w:Config id="16c953f5068" horizontalCenter="0"/>
<e:Image source="道具商城_png" y="42" horizontalCenter="0"/>
<e:Label id="price1Txt" text="20" y="398.52" x="294.52" size="27" textColor="0xc33700"/>
<e:Label id="price2Txt" text="20" y="541.44" textColor="0xC33700" x="295.4" size="27"/>
<e:Label id="price3Txt" text="20" y="680.64" textColor="0xC33700" x="294.76" size="27"/>
<e:Button id="closeBtn" label="" x="614" y="230">
<e:skinName>
<e:Skin states="up,down,disabled">
......
enum PropType{
BOOM=1,
HAMMER,
CHANCE_NUM
BOOM=2,
HAMMER=3,
CHANCE_NUM=4
}
export default PropType
\ No newline at end of file
......@@ -5,6 +5,7 @@ interface IHomeData {
canReceiveTreasureBoxNum;
wealth;
remainEnargy;
nextRangeStarsNum;
askForEnergy:boolean;
remainProp:{type,num}[]
}
......
......@@ -75,7 +75,7 @@ export default class MapScene extends Scene {
updateBox() {
const homeData = getHomeData();
this['boxiconWrapper'].visible = homeData.canReceiveTreasureBoxNum > 0;
this['totalStarTxt'].text = `${homeData.totalStars}/${homeData.canReceiveTreasureBoxNum}`;
this['totalStarTxt'].text = `${homeData.totalStars}/${homeData.nextRangeStarsNum}`;
this['boxNumsTxt'].text = `${homeData.canReceiveTreasureBoxNum}`;
}
......@@ -87,7 +87,7 @@ export default class MapScene extends Scene {
this['bloodTxt'].text = `${homeData.remainEnargy}/5`;
this['goldTxt'].text = `${homeData.wealth}`;
for (let j = 0; j < 70; j++) {
for (let j = 1; j < 70; j++) {
this.disableIcon(j + 1);
}
for (let i = 0; i < homeData.levels.length; i++) {
......@@ -152,6 +152,7 @@ export default class MapScene extends Scene {
homeData.nextRangeStarsNum = boxdata.nextRangeStarsNum;
homeData.totalStarts = boxdata.totalStarts;
this.updateBox();
PanelCtrl.instance.show('box');
}
})
// }
......
......@@ -10,6 +10,7 @@ export default class BloodPanel extends Panel {
super.start();
this.updateData();
this.showlog();
this['price1Txt'].text = window['price1']
}
showlog(){
......
......@@ -12,6 +12,7 @@ export default class Buy1Panel extends Panel {
this['buyBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.ontap, this);
this.showlog();
this['priceTxt'].text = 'X'+window['price3'];
}
showlog() {
......@@ -30,7 +31,7 @@ export default class Buy1Panel extends Panel {
SceneCtrl.instance.updateScene();
}, window['collectRuleId']);
}
}, 2, PropType.HAMMER);//兑换道具
}, PropType.HAMMER);//兑换道具
}
get skinKey() { return 'Buy1' }
......
......@@ -11,6 +11,7 @@ export default class Buy2Panel extends Panel {
this['buyBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.ontap, this);
this.showlog();
this['priceTxt'].text = 'X'+window['price2'];
}
showlog() {
NetManager.ins.showLog(getlogItem(8));
......@@ -28,7 +29,7 @@ export default class Buy2Panel extends Panel {
SceneCtrl.instance.updateScene();
}, window['collectRuleId']);
}
}, 2, PropType.BOOM);//兑换道具
}, PropType.BOOM);//兑换道具
}
get skinKey() { return 'Buy2' }
}
\ No newline at end of file
......@@ -11,6 +11,7 @@ export default class Buy3Panel extends Panel {
this['buyBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.ontap, this);
this.showlog();
this['priceTxt'].text = 'X'+window['price4'];
}
showlog() {
NetManager.ins.showLog(getlogItem(14));
......@@ -29,6 +30,6 @@ export default class Buy3Panel extends Panel {
SceneCtrl.instance.updateScene();
}, window['collectRuleId']);
}
}, 2, PropType.CHANCE_NUM);//兑换道具
}, PropType.CHANCE_NUM);//兑换道具
}
}
\ No newline at end of file
import Panel from "../../libs/new_wx/components/Panel";
import PanelCtrl from "../../libs/new_wx/ctrls/panelCtrl";
import { NetManager } from "../../libs/tw/manager/NetManager";
import PropType from "../PropType";
import SceneCtrl from "../../libs/new_wx/ctrls/sceneCtrl";
import { getlogItem } from "../Main";
import PanelCtrl from "../../libs/new_wx/ctrls/panelCtrl";
export default class ShopPanel extends Panel {
buyBtn1: eui.Button;
......@@ -15,6 +13,10 @@ export default class ShopPanel extends Panel {
this['buyBtn2'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onBuy2, this);
this['buyBtn3'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onBuy3, this);
this.showLog();
this['price1Txt'].text = window['price2']
this['price2Txt'].text = window['price3']
this['price3Txt'].text = window['price4']
}
showLog() {
......
......@@ -2,15 +2,15 @@
"success": true,
"code": "0000000000",
"desc": "OK",
"timestamp": 1566464290978,
"timestamp": 1566474890397,
"data": {
"wealth": 0,
"totalStars": 0,
"wealth": 13,
"totalStars": 120,
"levels": [],
"remainProp": [],
"remainEnargy": 5,
"remainEnargy": 15,
"askForEnergy": false,
"canReceiveTreasureBoxNum": 0,
"nextRangeStarsNum": 10
"canReceiveTreasureBoxNum": 10,
"nextRangeStarsNum": 20
}
}
\ No newline at end of file
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