Commit d4bd92ec authored by zjz1994's avatar zjz1994

Merge branch 'dev' of http://gitlab2.dui88.com/wanghongyuan/xiaoxiaole into dev

parents 8b21158f 9d919a69
......@@ -3,21 +3,21 @@
<w:Config id="169005181d0"/>
<e:Component y="929.78" skinName="ADSmallSkin" x="68" visible="false"/>
<e:Image id="light" source="common_prizelight_png" x="374.19" y="253.76" anchorOffsetX="375.76" anchorOffsetY="327.27" visible="false"/>
<e:Image source="prizePanelbg_png" y="-155.72" scale9Grid="87,543,522,23" x="0"/>
<e:Label id="lvTxt" text="关卡1" y="296" fontFamily="FZY3JW" size="42" textColor="0xffffff" strokeColor="0xff8339" stroke="3" horizontalCenter="0.5"/>
<e:Image id="picb" x="286" y="386.78" source="点亮 副本 2gray_png" scaleX="-1"/>
<e:Image id="pica" x="465.48" y="392.78" source="点亮 副本 2gray_png"/>
<e:Image id="picc" y="368.78" source="点亮gray_png" x="293"/>
<e:Image id="pic1" source="点亮 副本 2_png" x="203.18" y="452.78" anchorOffsetX="81.82" anchorOffsetY="60.61" scaleX="-1"/>
<e:Image id="pic3" source="点亮 副本 2_png" x="536.24" y="458.78" scaleX="1" anchorOffsetX="71.76" anchorOffsetY="66.61"/>
<e:Image id="pic2" source="点亮_png" y="439.78" anchorOffsetX="73.94" anchorOffsetY="74.73" x="366.94"/>
<e:Group id="propGroup" y="551.26" horizontalCenter="0">
<e:Image source="prizePanelbg_png" y="-138.02" scale9Grid="87,543,522,23" x="0"/>
<e:Label id="lvTxt" text="关卡1" y="313.7" fontFamily="FZY3JW" size="42" textColor="0xffffff" strokeColor="0xff8339" stroke="3" horizontalCenter="0.5"/>
<e:Image id="picb" x="286" y="404.48" source="点亮 副本 2gray_png" scaleX="-1"/>
<e:Image id="pica" x="465.48" y="410.48" source="点亮 副本 2gray_png"/>
<e:Image id="picc" y="386.48" source="点亮gray_png" x="293"/>
<e:Image id="pic1" source="点亮 副本 2_png" x="203.18" y="470.48" anchorOffsetX="81.82" anchorOffsetY="60.61" scaleX="-1"/>
<e:Image id="pic3" source="点亮 副本 2_png" x="536.24" y="476.48" scaleX="1" anchorOffsetX="71.76" anchorOffsetY="66.61"/>
<e:Image id="pic2" source="点亮_png" y="457.48" anchorOffsetX="73.94" anchorOffsetY="74.73" x="366.94"/>
<e:Group id="propGroup" y="568.96" horizontalCenter="0">
<e:Image source="物品奖励_png" x="0" y="0"/>
<e:Label id="nums" text="×8" size="48" verticalAlign="middle" textAlign="left" fontFamily="FZY3JW" textColor="0xC17343" bold="true" anchorOffsetX="0" width="205" x="278" y="102.24"/>
<e:Image id="prop" scaleY="0.8" scaleX="0.8" x="173" y="80.24" source="prize_blood_png"/>
</e:Group>
<e:Image id="img" width="480" height="214" source="{data.url}" horizontalCenter="0" y="575.76" visible="false"/>
<e:Button id="closeBtn" label="" x="594.5" y="273.5">
<e:Button id="closeBtn" label="" x="594.5" y="291.2">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="closeCommonBtn_png" source.down="closeCommonBtn_png" source.disabled="closeCommonBtn_png"/>
......@@ -33,7 +33,7 @@
</e:Skin>
</e:skinName>
</e:Button>
<e:Button id="goBtn" label="" y="790.78" horizontalCenter="0">
<e:Button id="goBtn" label="" y="808.48" horizontalCenter="0">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="按钮 副本 4_png" source.down="按钮 副本 4_png" source.disabled="按钮 副本 4_png"/>
......
......@@ -613,6 +613,17 @@ export default class MainScene extends Scene {
curScoreNum.y = 217.5;
this.addChild(curScoreNum);
//初始换道具容器
this.propBtnCon = new PropBtnCon();
this.propBtnCon.y = 269 + Tool.gameAreaHeight// + 55;
this.addChild(this.propBtnCon);
//按钮的事件
this.propBtnCon.boomBtn.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_boomBtn, this)
this.propBtnCon.hammerBtn.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_hammerBtn, this)
this.propBtnCon.stepBtn.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_stepBtn, this)
//初始化道具信息
this.updateScene();
//分数进度条,托管
this.scoreProgress = new ScoreProgress(this.starProgress, curScoreNum, this.chapterData.starScores);
//分数置0
......@@ -652,16 +663,6 @@ export default class MainScene extends Scene {
stopBg();
// setGameBgStatus(false);
}
//初始换道具容器
this.propBtnCon = new PropBtnCon();
this.propBtnCon.y = 230 + Tool.gameAreaHeight + 55;
this.addChild(this.propBtnCon);
//按钮的事件
this.propBtnCon.boomBtn.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_boomBtn, this)
this.propBtnCon.hammerBtn.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_hammerBtn, this)
this.propBtnCon.stepBtn.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_stepBtn, this)
//初始化道具信息
this.updateScene();
//选择框 无需加入场景
var textureChoosed: egret.Texture = RES.getRes("chooseRect_png")
this.choosed = new eui.Image(textureChoosed);
......
......@@ -17,18 +17,20 @@ const gameAreaHeightTwo: number[] = [];
//初始化适配位置,就因为棒棒糖的45偏移
function initClientScale() {
var stageHeight = document.body.clientHeight / document.body.clientWidth * 750;
var middleHeight = 80 * 9;
var smallestHeight = 230 + middleHeight + 180;
var middleHeight = 80 * 9; // 中间的高度
var h1 = 269;
var h2 = 125;
var smallestHeight = h1 + middleHeight + h2;
if (stageHeight < smallestHeight) {
offsetYTwo[0] = 230;
offsetYTwo[1] = 230;
offsetYTwo[0] = h1;
offsetYTwo[1] = h1;
gameAreaHeightTwo[0] = middleHeight;
gameAreaHeightTwo[1] = middleHeight + 45;
} else {
offsetYTwo[0] = 230 + (stageHeight - smallestHeight) / 2;
offsetYTwo[1] = 230 + (stageHeight - smallestHeight - 45) / 2;
gameAreaHeightTwo[0] = stageHeight - 230 - 180;;
gameAreaHeightTwo[1] = stageHeight - 230 - 180;
offsetYTwo[0] = h1 + (stageHeight - smallestHeight) / 2;
offsetYTwo[1] = h1 + (stageHeight - smallestHeight - 45) / 2;
gameAreaHeightTwo[0] = stageHeight - h1 - h2;
gameAreaHeightTwo[1] = stageHeight - h1 - h2;
}
}
......
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