Commit d8e876cd authored by wangzhujun's avatar wangzhujun

123

parent eb2d8a6a
......@@ -7,7 +7,7 @@
<e:Label id="myteamnum" text="总步数:9999" x="112" y="648" size="30" verticalAlign="middle" textColor="0xfe0f5a" width="212" textAlign="center"/>
<e:Label id="otherteam" text="敌方队伍" x="426" y="738" size="29" textAlign="center" verticalAlign="middle" textColor="0xFCFFFF" width="212"/>
<e:Label id="otherteamnum" text="总步数:9999" x="426" y="772" size="30" verticalAlign="middle" width="212" textAlign="center" textColor="0x93f7fa"/>
<e:Group width="750" height="1206" x="0" y="209">
<e:Group width="750" height="1206" horizontalCenter="0" verticalCenter="0">
<e:Button id="ruleBtn" label="Button" skinName="ui.IconButtonSkin" icon="pkrulebtn_png" scaleX="1" scaleY="1" width="106" height="40" anchorOffsetX="53" anchorOffsetY="20" x="697" y="36"/>
<e:Image width="575" height="265" x="87" y="80" scaleX="1" scaleY="1" source="pkscorebg2_png"/>
<e:Label id="allscore" text="100" x="178" y="166" size="43" textColor="0x4cfcfc" anchorOffsetX="0" width="127" textAlign="center" scaleX="1" scaleY="1"/>
......
......@@ -66,6 +66,9 @@ export default class StartScene extends Scene {
onEnterFrame(){
}
initUI(data) {
this.once(egret.Event.ADDED_TO_STAGE, () => {
this.height = this.stage.stageHeight;
}, this);
this.peolab.text = "总共有"+data.activityJoinNum+"人参与活动";
this.scorelab.text = "我的分数:"+data.currentScore;
if(!GCache.readCache("isGuide")){
......
......@@ -40,6 +40,9 @@ export default class GuidePanel extends Panel{
}
initUI(){
this.once(egret.Event.ADDED_TO_STAGE, () => {
this.height = this.stage.stageHeight;
}, this);
this.guide1.visible = true;
this.guide2.visible = false;
this.guide3.visible = false;
......
......@@ -5,6 +5,7 @@ import { yzwNet } from "../NetConst";
import ToastCtrl from "../ctrls/toastCtrl";
import { DataManager } from "../../libs/tw/manager/DataManager";
import { NetManager } from "../../libs/tw/manager/NetManager";
import GameConst from "../GameConst";
export default class PKScene extends Scene{
protected get skinKey(){return 'PK'}
......@@ -46,6 +47,9 @@ export default class PKScene extends Scene{
}
}
initUI(data){
this.once(egret.Event.ADDED_TO_STAGE, () => {
this.height = this.stage.stageHeight;
}, this);
this.addEventListener(egret.Event.ENTER_FRAME,this.onEnterFrame,this);
this.allscore.text = data.pkTotalScore;
this.myscore.text = data.pkMyScore;
......@@ -68,8 +72,8 @@ export default class PKScene extends Scene{
this.myline.anchorOffsetY = this.myline.height
this.otherline.anchorOffsetY = this.otherline.height
this.myline.y = 1624;
this.otherline.y = 1624;
this.myline.y = GameConst.stage.stageHeight;
this.otherline.y = GameConst.stage.stageHeight;
this.myteam.y = this.myline.y-this.myline.height-70;
this.myteamnum.y = this.myline.y-this.myline.height-35;
this.otherteam.y = this.otherline.y-this.otherline.height-70;
......
......@@ -17,6 +17,9 @@ export default class RecordMapScene extends Scene{
}
initUI(data){
this.once(egret.Event.ADDED_TO_STAGE, () => {
this.height = this.stage.stageHeight;
}, this);
if(data.num == 1){
this.mapBG.source = "maphz_png"
}else if(data.num == 2){
......@@ -35,14 +38,16 @@ export default class RecordMapScene extends Scene{
this.mapBG.source = "mapmg_png"
}
const arr = ["HZ","AM","XG","TB","RB","HG","CX","MG"];
for(let i =0;i<data.data.length;i++){
if(arr[data.num-1] == data.data[i]){
this.sharelab.visible = false;
if(data.data){
for(let i =0;i<data.data.length;i++){
if(arr[data.num-1] == data.data[i]){
this.sharelab.visible = false;
}
}
}
}
initEvents(){
......
......@@ -30,6 +30,9 @@ export default class RecordScene extends Scene{
}
initUI(data){
this.once(egret.Event.ADDED_TO_STAGE, () => {
this.height = this.stage.stageHeight;
}, this);
const arr = ["hz","am","xg","tb","rb","hg","cx","mg"]
for(let i = data;i<8;i++){
this[arr[i]].visible = false;
......
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