Commit e0f8f5e4 authored by zhangjinzhou's avatar zhangjinzhou

消消乐代码暂存

parent c43bbd2e
...@@ -259,10 +259,14 @@ export default class MainBase extends eui.UILayer { ...@@ -259,10 +259,14 @@ export default class MainBase extends eui.UILayer {
RES.getResAsync("lineLight" + i + "_png") RES.getResAsync("lineLight" + i + "_png")
} }
//三个星星宝箱 //三个星星宝箱
RES.getResAsync("starbox1_png"); for (var i = 1; i < 4; i++) {
RES.getResAsync("starbox2_png"); RES.getResAsync("starbox"+i+"_png");
RES.getResAsync("starbox3_png"); RES.getResAsync("starbox"+i+"open_png");
RES.getResAsync("starbox"+i+"close_png");
}
//天降好礼
RES.getResAsync("ballonimg_png");
var arr = [ var arr = [
"redDoorBg", "blueDoorBg", "yellowDoorBg", "doorOpen", "doorClosed", "redDoorBg", "blueDoorBg", "yellowDoorBg", "doorOpen", "doorClosed",
"rectLatWhite", "rectLatWhite",
......
...@@ -11,8 +11,10 @@ export default class NoPrizePanel extends Panel { ...@@ -11,8 +11,10 @@ export default class NoPrizePanel extends Panel {
_level; _level;
start(data) { start(data) {
super.start(); super.start();
this._level = parseInt(data.level + ''); // this._level = parseInt(data.level + '');
this['lvTxt'].text = `关卡${this._level}` // this['lvTxt'].text = `关卡${this._level}`
const {score} = data;
this["scoretxt"].text = score+"分";
this.showlog(); this.showlog();
NetManager.ins.hc_home(() => { }, window['collectRuleId']); NetManager.ins.hc_home(() => { }, window['collectRuleId']);
......
...@@ -8,48 +8,27 @@ import { NetManager } from "../../tw/manager/NetManager"; ...@@ -8,48 +8,27 @@ import { NetManager } from "../../tw/manager/NetManager";
import Panel from "./Panel"; import Panel from "./Panel";
import Loading from "./Loading"; import Loading from "./Loading";
import { showToast } from "../ctrls/toastCtrl"; import { showToast } from "../ctrls/toastCtrl";
import Utils, { CouponJoinScene } from "../../../src/Utils";
export default class PrizePanel extends Panel { export default class PrizePanel extends Panel {
_level; _level;
updateOption(option: any) { updateOption(option: any) {
const { categoryType, img, num, propType, realValue } = option;// 2次数 3道具 4元宝 5实物 6优惠券 7虚拟商品
this['propnums'].text = 'x1';
this['propnums2'].text = 'x1';
if (num) {
this['propnums'].text = 'x' + num;
this['propnums2'].text = 'x' + num;
} }
switch (categoryType) { //场景展示,1展示宝箱,2展示去下一关
case 2: changeSceneShow(page){
this['blood'].visible = true; let box_v = page==1;
this['numsgroup'].visible = true; this["nextgro"].visible = !box_v;
break; this["boxgro"].visible = box_v;
case 3:
this['numsgroup'].visible = true;
this['img2'].visible = true;
this.data.url2 = `common_prop${propType}_png`;
break;
case 4:
this['numsgroup'].visible = false;
this['propnums2'].visible = true;
this['money'].visible = true;
this['propnums2'].text = realValue;
break;
default:
this['img'].visible = true;
this.data.url = img;
break;
} }
}
start(data) { start(data) {
super.start(); super.start();
this._level = parseInt(data.level + ''); this.changeSceneShow(1);
this['lvTxt'].text = `关卡${this._level}` const {score} = data;
this["scoretxt"].text = score+"分";
this.updateOption(data.option); this.updateOption(data.option);
//下一关
this['goBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, () => { this['goBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
this.hidePanel(); this.hidePanel();
if (this._level + 1 <= window['last_level']) if (this._level + 1 <= window['last_level'])
...@@ -69,34 +48,14 @@ export default class PrizePanel extends Panel { ...@@ -69,34 +48,14 @@ export default class PrizePanel extends Panel {
//曝光 //曝光
NetManager.ins.showLog(getlogItem(5)) NetManager.ins.showLog(getlogItem(5))
//新增看视频双倍 //打开宝箱
this["doubleBtn"].addEventListener(egret.TouchEvent.TOUCH_TAP, () => { this["doubleBtn"].addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
NetManager.ins.clickLog(getlogItem(6)) Utils.couponJoin(CouponJoinScene.Checkpoint,()=>{
NetManager.ins.getTuiaAd(
() => { },()=>{
//居中 this.changeSceneShow(2);
this['goBtn'].horizontalCenter = 0; })
//隐藏 })
this['doubleBtn'].visible = false;
Loading.instace.show()
NetManager.ins.getIncentiveAward(
(s) => {
Loading.instace.hide()
if (s) {
showToast("翻倍成功");
NetManager.ins.hc_home(() => {
}, window['collectRuleId']);
} else {
showToast("加倍失败");
}
},
25
)
},
() => { showToast("广告未成功观看,无法加倍领取"); },
window["slotIdsTuia"][5]
)
}, this)
} }
async setStar(nums: number) { async setStar(nums: number) {
......
{"file":"pingfangxxl.png","frames":{
"0":{"x":47,"y":0,"w":45,"h":69,"offX":0,"offY":0,"sourceW":45,"sourceH":69},
"1":{"x":94,"y":139,"w":39,"h":67,"offX":0,"offY":0,"sourceW":39,"sourceH":67},
"2":{"x":94,"y":0,"w":45,"h":68,"offX":0,"offY":0,"sourceW":45,"sourceH":68},
"3":{"x":0,"y":71,"w":45,"h":69,"offX":0,"offY":0,"sourceW":45,"sourceH":69},
"4":{"x":141,"y":0,"w":45,"h":67,"offX":0,"offY":0,"sourceW":45,"sourceH":67},
"5":{"x":47,"y":142,"w":45,"h":68,"offX":0,"offY":0,"sourceW":45,"sourceH":68},
"6":{"x":0,"y":0,"w":45,"h":69,"offX":0,"offY":0,"sourceW":45,"sourceH":69},
"7":{"x":94,"y":70,"w":45,"h":67,"offX":0,"offY":0,"sourceW":45,"sourceH":67},
"8":{"x":0,"y":142,"w":45,"h":69,"offX":0,"offY":0,"sourceW":45,"sourceH":69},
"9":{"x":47,"y":71,"w":45,"h":69,"offX":0,"offY":0,"sourceW":45,"sourceH":69},
"分":{"x":141,"y":69,"w":45,"h":54,"offX":0,"offY":15,"sourceW":45,"sourceH":69}}}
\ No newline at end of file
This diff is collapsed.
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<e:Skin class="FailSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing"> <e:Skin class="FailSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Component y="772.52" skinName="ADSmallSkin" horizontalCenter="0" visible="false"/> <e:Image y="218" source="failpanelbg_png" horizontalCenter="-5.5"/>
<e:Image source="闯关失败_png" y="218" horizontalCenter="0"/> <e:Group id="havevideo" width="750" height="1206">
<e:Button id="closeBtn" label="" x="629.54" y="243"> <e:Button id="videoBtn" label="" y="812" horizontalCenter="0" x="137" scaleX="1" scaleY="1">
<e:skinName> <e:skinName>
<e:Skin states="up,down,disabled"> <e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="comCloseBtnTuia_png" source.down="comCloseBtnTuia_png" source.disabled="comCloseBtnTuia_png"/> <e:Image width="100%" height="100%" source="failvideostep_png" source.down="failvideostep_png" source.disabled="failvideostep_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/> <e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin> </e:Skin>
</e:skinName> </e:skinName>
</e:Button> </e:Button>
<e:Button id="againBtn" label="" y="736" horizontalCenter="0"> <e:Image id="againBtn1" source="failrestartbtn_png" y="967" scaleX="1" scaleY="1" horizontalCenter="0"/>
<e:Image source="failtit_png" y="456" horizontalCenter="0.5"/>
<e:Image source="failcontxt_png" y="540" horizontalCenter="0"/>
<e:Group id="steptool" width="110" height="117" y="633" x="320">
<e:Image source="failstepshadow_png" y="81" horizontalCenter="0.5"/>
<e:Image source="stepBtn_png" scaleX="1" scaleY="1"/>
<e:Image source="propNumBg_png" x="70" y="70" scaleX="1" scaleY="1"/>
<e:Group width="44" height="45" x="70" y="70">
</e:Group>
</e:Group>
</e:Group>
<e:Group id="novideo" width="750" height="1206">
<e:Button id="againBtn" label="" y="812" horizontalCenter="0.5" x="137" scaleX="1" scaleY="1">
<e:skinName> <e:skinName>
<e:Skin states="up,down,disabled"> <e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="chongxinchuangguan_png" source.down="chongxinchuangguan_png" source.disabled="chongxinchuangguan_png"/> <e:Image width="100%" height="100%" source="failrestartbtn1_png" source.down="failrestartbtn1_png" source.disabled="failrestartbtn1_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/> <e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin> </e:Skin>
</e:skinName> </e:skinName>
</e:Button> </e:Button>
<e:Button id="videoBtn" label="" y="617.5" horizontalCenter="0" visible="false"> <e:Image source="failtit_png" y="504" horizontalCenter="0.5"/>
<e:skinName> <e:Image source="failcontxt_png" y="588" horizontalCenter="0"/>
<e:Skin states="up,down,disabled"> </e:Group>
<e:Image width="100%" height="100%" source="kanshipinjiabushu_png" source.down="kanshipinjiabushu_png" source.disabled="kanshipinjiabushu_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Label text="闯关成功即可获得元宝\n游戏道具等更多好礼哦" y="518.24" anchorOffsetX="0" width="578.54" anchorOffsetY="0" height="81.52" horizontalCenter="0.5" textAlign="center" verticalAlign="middle" size="24" lineSpacing="8" fontFamily="FZY3JW" textColor="0xf54500" bold="true"/>
</e:Skin> </e:Skin>
\ No newline at end of file
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<e:Group id="topcont" width="750" height="150" x="0" top="0"> <e:Group id="topcont" width="750" height="150" x="0" top="0">
<e:Image source="topban_png" horizontalCenter="0" y="0"/> <e:Image source="topban_png" horizontalCenter="0" y="0"/>
<e:BitmapLabel id="bloodTxt" width="164" height="48" x="120" y="32" text="次 5" font="albhtxxl_fnt"/> <e:BitmapLabel id="bloodTxt" width="164" height="48" x="120" y="32" text="次 5" font="albhtxxl_fnt"/>
<e:BitmapLabel id="goldTxt" width="81" height="48" x="376" y="32" text="231" font="albhtxxl_fnt"/> <e:BitmapLabel id="goldTxt" width="81" height="48" x="376" y="32" text="231" font="albhtxxl_fnt"/>
<e:Image id="exchangebtn" source="exchangebtn2_png" x="462" y="17"/> <e:Image id="exchangebtn" source="exchangebtn2_png" x="462" y="17"/>
<e:Group id="soundbtn" width="80" height="80" y="7" x="632"> <e:Group id="soundbtn" width="80" height="80" y="7" x="632">
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<e:Skin class="NoPrizeSkin" width="750" height="1000" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing"> <e:Skin class="NoPrizeSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Component y="917.46" skinName="ADSmallSkin" x="84" visible="false"/>
<e:Image y="40.55" horizontalCenter="1" source="noPrizePanelBg_png"/>
<e:Button id="closeBtn" label="" x="624" y="210">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="comCloseBtnTuia_png" source.down="comCloseBtnTuia_png" source.disabled="comCloseBtnTuia_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button> <w:Config id="1690063a75e"/>
<e:Image scale9Grid="87,543,522,23" source="sucprizepanelbg_png" horizontalCenter="-19.5" y="266"/>
<e:Button id="goBtn" label="" y="739" horizontalCenter="0.5"> <e:Image id="pic1" y="284" anchorOffsetX="56.82" anchorOffsetY="50.61" source="sucstar1_png" horizontalCenter="-125"/>
<e:Image id="pic3" y="294" anchorOffsetX="52" anchorOffsetY="46" source="sucstar2_png" horizontalCenter="125" x="10"/>
<e:Image id="pic2" y="254" anchorOffsetX="54" anchorOffsetY="49.73" source="sucstar3_png" x="375"/>
<e:BitmapLabel id="scoretxt" height="80" font="pingfangxxl_fnt" text="19999分" y="483" horizontalCenter="0"/>
<e:Image source="sucnoprizetit_png" y="562" horizontalCenter="0"/>
<e:Image source="sucnoprizecont_png" y="644" horizontalCenter="0"/>
<e:Button id="goBtn" label="" y="847" x="137" scaleX="1" scaleY="1">
<e:skinName> <e:skinName>
<e:Skin states="up,down,disabled"> <e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="按钮 副本 4_png" source.down="按钮 副本 4_png" source.disabled="按钮 副本 4_png"/> <e:Image width="100%" height="100%" source="sucprizenextbtn_png" source.down="sucprizenextbtn_png" source.disabled="sucprizenextbtn_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/> <e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin> </e:Skin>
</e:skinName> </e:skinName>
</e:Button> </e:Button>
<e:Image id="picb" x="286" y="391.28" source="点亮 副本 2gray_png" scaleX="-1"/>
<e:Image id="pica" x="465.48" y="384.28" source="点亮 副本 2gray_png"/>
<e:Image id="picc" y="367.28" source="点亮gray_png" x="310"/>
<e:Image id="pic1" source="点亮 副本 2_png" x="214.18" y="443.39" anchorOffsetX="81.82" anchorOffsetY="60.61" scaleX="-1"/>
<e:Image id="pic3" source="点亮 副本 2_png" x="528.24" y="446.89" scaleX="1" anchorOffsetX="71.76" anchorOffsetY="66.61"/>
<e:Image id="pic2" source="点亮_png" y="440.01" anchorOffsetX="73.94" anchorOffsetY="74.73" x="375.94"/>
<e:Label id="lvTxt" text="关卡1" y="233" horizontalCenter="0.5" fontFamily="FZY3JW" textColor="0xffffff" size="24" bold="true"/>
<w:Config id="1690063a75e"/>
</e:Skin> </e:Skin>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<e:Skin class="PrizeSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing"> <e:Skin class="PrizeSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<w:Config id="169005181d0"/> <w:Config id="169005181d0"/>
<e:Component y="889.74" skinName="ADSmallSkin" x="84" visible="false"/>
<e:Image source="prizePanelbg_png" y="38.78" scale9Grid="87,543,522,23" height="839" x="59"/> <e:Image scale9Grid="87,543,522,23" source="sucprizepanelbg_png" horizontalCenter="-19.5" y="266"/>
<e:Image id="img" width="508" height="225" source="{data.url}" horizontalCenter="0" y="504.76" visible="false"/>
<e:Image id="img2" horizontalCenter="0.5" y="491.76" source="{data.url2}" scaleX="0.7" scaleY="0.7" visible="false"/>
<e:Image id="money" y="516.2" scaleX="0.6" scaleY="0.6" source="common_money_png" x="150" visible="false"/>
<e:Image id="blood" y="490.8" horizontalCenter="1.5" source="common_blood_png" scaleX="0.7" scaleY="0.7" visible="false"/>
<e:Group id="numsgroup" x="396.38" y="506.4" visible="false">
<e:Image id="numsbg" source="signprize_numsbg_png" x="0" y="0"/>
<e:Label id="propnums" text="X8" size="22" horizontalCenter="0" verticalCenter="0" verticalAlign="middle" textAlign="center"/>
</e:Group>
<e:Label id="propnums2" text="30" textColor="0x885037" bold="true" y="651.08" width="75" textAlign="right" x="287.16" visible="false"/>
<e:Button id="closeBtn" label="" x="628" y="191">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="comCloseBtnTuia_png" source.down="comCloseBtnTuia_png" source.disabled="comCloseBtnTuia_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Button id="goBtn" label="" y="731" horizontalCenter="-144"> <e:Image id="picb" x="286" y="339.28" source="点亮 副本 2gray_png" scaleX="-1" visible="false"/>
<e:Image id="pica" x="465.48" y="332.28" source="点亮 副本 2gray_png" visible="false"/>
<e:Image id="picc" y="315.28" source="点亮gray_png" x="310" visible="false"/>
<e:Image id="pic1" y="284" anchorOffsetX="56.82" anchorOffsetY="50.61" source="sucstar1_png" horizontalCenter="-125"/>
<e:Image id="pic3" y="284" anchorOffsetX="52" anchorOffsetY="46" source="sucstar2_png" horizontalCenter="125"/>
<e:Image id="pic2" y="254" anchorOffsetX="54" anchorOffsetY="49.73" source="sucstar3_png" x="375"/>
<e:BitmapLabel id="scoretxt" height="80" font="pingfangxxl_fnt" text="19999分" y="483" horizontalCenter="0"/>
<e:Image source="sucprizeboxshadow_png" y="770" horizontalCenter="0"/>
<e:Group id="nextgro" width="750" height="818" y="184">
<e:Button id="goBtn" label="" y="663" x="137" scaleX="1" scaleY="1">
<e:skinName> <e:skinName>
<e:Skin states="up,down,disabled"> <e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="按钮 副本 4_png" source.down="按钮 副本 4_png" source.disabled="按钮 副本 4_png"/> <e:Image width="100%" height="100%" source="sucprizenextbtn_png" source.down="sucprizenextbtn_png" source.disabled="sucprizenextbtn_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/> <e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin> </e:Skin>
</e:skinName> </e:skinName>
</e:Button> </e:Button>
<e:Button id="doubleBtn" label="" y="729" horizontalCenter="139"> <e:Image source="nextlevelprizetxt_png" y="380" horizontalCenter="0"/>
<e:Image source="sucprizespimg_png" y="442" horizontalCenter="0.5"/>
</e:Group>
<e:Group id="boxgro" width="750" height="818" y="184">
<e:Button id="doubleBtn" label="" y="663" x="137" scaleX="1" scaleY="1">
<e:skinName> <e:skinName>
<e:Skin states="up,down,disabled"> <e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="kanguanggaolingqu2bei_png" source.down="kanguanggaolingqu2bei_png" source.disabled="kanguanggaolingqu2bei_png"/> <e:Image width="100%" height="100%" source="sucopenboxbtn_png" source.down="sucopenboxbtn_png" source.disabled="sucopenboxbtn_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/> <e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin> </e:Skin>
</e:skinName> </e:skinName>
</e:Button> </e:Button>
<e:Image id="picb" x="286" y="339.28" source="点亮 副本 2gray_png" scaleX="-1"/> <e:Image source="sucprizebox_png" horizontalCenter="0" verticalCenter="124.5"/>
<e:Image id="pica" x="465.48" y="332.28" source="点亮 副本 2gray_png"/> <e:Image source="sucprizeboxinfo_png" x="390" y="452"/>
<e:Image id="picc" y="315.28" source="点亮gray_png" x="310"/> <e:Image source="sucprizeboxtxt_png" y="380" horizontalCenter="0"/>
<e:Image id="pic1" source="点亮 副本 2_png" x="214.18" y="391.39" anchorOffsetX="81.82" anchorOffsetY="60.61" scaleX="-1"/> </e:Group>
<e:Image id="pic3" source="点亮 副本 2_png" x="528.24" y="394.89" scaleX="1" anchorOffsetX="71.76" anchorOffsetY="66.61"/>
<e:Image id="pic2" source="点亮_png" y="388.01" anchorOffsetX="73.94" anchorOffsetY="74.73" x="375.94"/>
<e:Label id="lvTxt" text="关卡1" y="222" horizontalCenter="0.5" fontFamily="FZY3JW" textColor="0xffffff" size="24" bold="true"/>
</e:Skin> </e:Skin>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<e:Skin class="StarSkin" width="67" height="25" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing"> <e:Skin class="StarSkin" width="100" height="100" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Image source="无星星_png" /> <e:Group width="67" height="25">
<e:Image id="star1" source="有星星_png" visible="false"/> <e:Image source="无星星_png" x="0" y="0" scaleX="1" scaleY="1"/>
<e:Image id="star2" source="有星星2_png" visible="false"/> <e:Image id="star1" source="有星星_png" x="0" y="0" scaleX="1" scaleY="1" visible="false"/>
<e:Image id="star3" source="有星星3_png" visible="false"/> <e:Image id="star2" source="有星星2_png" x="0" y="0" scaleX="1" scaleY="1" visible="false"/>
<e:Image id="star3" source="有星星3_png" x="0" y="0" scaleX="1" scaleY="1"/>
<e:Image id="starlbox1" source="starbox1light_png" x="-16" y="-60" scaleX="1" scaleY="1" visible="false"/>
<e:Image id="starlbox2" source="starbox2light_png" x="-16" y="-64" scaleX="1" scaleY="1" visible="false"/>
<e:Image id="starlbox3" source="starbox3light_png" x="-16" y="-70.5" scaleX="1" scaleY="1" visible="false"/>
</e:Group>
</e:Skin> </e:Skin>
\ No newline at end of file
...@@ -219,6 +219,7 @@ export default class MainScene extends Scene { ...@@ -219,6 +219,7 @@ export default class MainScene extends Scene {
*/ */
private _score: number; private _score: number;
get score(): number { get score(): number {
return this._score return this._score
} }
set score(value: number) { set score(value: number) {
...@@ -249,7 +250,7 @@ export default class MainScene extends Scene { ...@@ -249,7 +250,7 @@ export default class MainScene extends Scene {
failStep: false failStep: false
} }
//气球宝箱 //气球宝箱
balloonsp: eui.Image; balloonsp: egret.Bitmap;
//盲盒 //盲盒
alertBlindBox = false; alertBlindBox = false;
...@@ -727,16 +728,7 @@ export default class MainScene extends Scene { ...@@ -727,16 +728,7 @@ export default class MainScene extends Scene {
break; break;
//盲盒 //盲盒
case 21: case 21:
let blindbox: Element = Pool.takeOut(RecoverName.ELEMENT); ele = Tool.getElement(ElementType.BLIND_BOX);
if (!blindbox) {
blindbox = new Element(ElementType.BLIND_BOX)
} else {
blindbox.reset(ElementType.BLIND_BOX)
}
blindbox.x = p[0];
blindbox.y = p[1];
this.elementContainer.addChild(blindbox);
this.lattices[i].element = blindbox;
break; break;
default: default:
//其他标识按空元素记 //其他标识按空元素记
...@@ -2005,6 +1997,7 @@ export default class MainScene extends Scene { ...@@ -2005,6 +1997,7 @@ export default class MainScene extends Scene {
// playSound(SoundType.fail); // playSound(SoundType.fail);
var panelsDatas = this.returnPanels("failed", { var panelsDatas = this.returnPanels("failed", {
level: this.chapter, level: this.chapter,
score:this.score,
showVideo: !this.recordOnce.failStep,//是否显示观看视频加步数 showVideo: !this.recordOnce.failStep,//是否显示观看视频加步数
complete: () => {//观看完成回调,其实只要继续执行下面的逻辑就行 complete: () => {//观看完成回调,其实只要继续执行下面的逻辑就行
let count = 0; let count = 0;
...@@ -2056,7 +2049,7 @@ export default class MainScene extends Scene { ...@@ -2056,7 +2049,7 @@ export default class MainScene extends Scene {
showToast("元素已无法消除") showToast("元素已无法消除")
setTimeout(() => { setTimeout(() => {
// playSound(SoundType.fail); // playSound(SoundType.fail);
var panelsDatas = this.returnPanels("failed", { level: this.chapter }) var panelsDatas = this.returnPanels("failed", { level: this.chapter,score:this.score, })
this.solveDiaPush("fail",panelsDatas); this.solveDiaPush("fail",panelsDatas);
// PanelCtrl.instance.showPanels(panelsDatas[0], panelsDatas[1], () => { }); // PanelCtrl.instance.showPanels(panelsDatas[0], panelsDatas[1], () => { });
// PanelCtrl.instance.show("failed", { level: this.chapter }); // PanelCtrl.instance.show("failed", { level: this.chapter });
...@@ -2748,12 +2741,13 @@ export default class MainScene extends Scene { ...@@ -2748,12 +2741,13 @@ export default class MainScene extends Scene {
const submitData = DataManager.ins.getData('hc_submit').data; const submitData = DataManager.ins.getData('hc_submit').data;
var panelsDatas; var panelsDatas;
if (submitData.option) { if (submitData.option) {
panelsDatas = this.returnPanels(ModuleTypes.PRIZE_PANEL, { level: this.chapter, option: submitData.option }); panelsDatas = this.returnPanels(ModuleTypes.PRIZE_PANEL, { level: this.chapter, option: submitData.option,score:this.score, });
// PanelCtrl.instance.show(ModuleTypes.PRIZE_PANEL, { level: this.chapter, option: submitData.option }); // PanelCtrl.instance.show(ModuleTypes.PRIZE_PANEL, { level: this.chapter, option: submitData.option });
} else { } else {
panelsDatas = this.returnPanels(ModuleTypes.NO_PRIZE_PANEL, { level: this.chapter }) panelsDatas = this.returnPanels(ModuleTypes.NO_PRIZE_PANEL, { level: this.chapter,score:this.score, })
// PanelCtrl.instance.show(ModuleTypes.NO_PRIZE_PANEL, { level: this.chapter }); // PanelCtrl.instance.show(ModuleTypes.NO_PRIZE_PANEL, { level: this.chapter });
} }
panelsDatas = this.returnPanels(ModuleTypes.NO_PRIZE_PANEL, { level: this.chapter,score:this.score, })
//弹出所有的 //弹出所有的
this.solveDiaPush("success",panelsDatas); this.solveDiaPush("success",panelsDatas);
// PanelCtrl.instance.showPanels(panelsDatas[0], panelsDatas[1], () => { }) // PanelCtrl.instance.showPanels(panelsDatas[0], panelsDatas[1], () => { })
...@@ -3044,14 +3038,15 @@ export default class MainScene extends Scene { ...@@ -3044,14 +3038,15 @@ export default class MainScene extends Scene {
//初始化天降宝箱 //初始化天降宝箱
initBallonSp(){ initBallonSp(){
//气球宝箱 //气球宝箱
this.balloonsp = new eui.Image("//yun.duiba.com.cn/aurora/assets/02d6dda42162d49097d4d271b5a367a506377487.jpeg"); this.balloonsp = new egret.Bitmap();
let balloonwid = 100; this.balloonsp.texture = RES.getRes("ballonimg_png");
let balloonhei = 100; let balloonwid = this.balloonsp.width;
this.balloonsp.width = balloonwid; let balloonhei = this.balloonsp.height;
this.balloonsp.height = balloonhei; // this.balloonsp.width = balloonwid;
// this.balloonsp.height = balloonhei;
this.addChild(this.balloonsp); this.addChild(this.balloonsp);
let topboty = 224; let topboty = 180;
let gametopy = 224; let gametopy = topboty;
let lattices = this.chapterData.map.lattices; let lattices = this.chapterData.map.lattices;
for (var m = 0; m < lattices.length; m++) { for (var m = 0; m < lattices.length; m++) {
if (lattices[m]) { if (lattices[m]) {
...@@ -3059,8 +3054,8 @@ export default class MainScene extends Scene { ...@@ -3059,8 +3054,8 @@ export default class MainScene extends Scene {
break; break;
} }
} }
if (gametopy < 224) { if (gametopy < topboty) {
gametopy = 224; gametopy = topboty;
} }
this.balloonsp.y = (gametopy - topboty) / 2 + topboty - balloonhei / 2; this.balloonsp.y = (gametopy - topboty) / 2 + topboty - balloonhei / 2;
let movetime = 5000; let movetime = 5000;
......
...@@ -427,6 +427,8 @@ export default class MapScene extends Scene { ...@@ -427,6 +427,8 @@ export default class MapScene extends Scene {
const star = MapScene.starHash[i + 1]; const star = MapScene.starHash[i + 1];
if (level) { if (level) {
star.setStar(level.stars); star.setStar(level.stars);
star.setBox(level.stars);
this.enableIcon(level.levelNum); this.enableIcon(level.levelNum);
} else { } else {
this.disableIcon(level.levelNum); this.disableIcon(level.levelNum);
...@@ -435,6 +437,8 @@ export default class MapScene extends Scene { ...@@ -435,6 +437,8 @@ export default class MapScene extends Scene {
if (homeData.levels.length == 0) { if (homeData.levels.length == 0) {
const star = MapScene.starHash[1]; const star = MapScene.starHash[1];
star.setStar(0); star.setStar(0);
star.setBox(0);
this.enableIcon(1); this.enableIcon(1);
} else if (homeData.levels.length == window['last_level']) { } else if (homeData.levels.length == window['last_level']) {
......
...@@ -7,6 +7,7 @@ export default class MapStarComp extends ComponentBase { ...@@ -7,6 +7,7 @@ export default class MapStarComp extends ComponentBase {
this.y=-24; this.y=-24;
this.setStar(0); this.setStar(0);
this.setBox(1);
} }
setStar(num:number) setStar(num:number)
...@@ -26,5 +27,20 @@ export default class MapStarComp extends ComponentBase { ...@@ -26,5 +27,20 @@ export default class MapStarComp extends ComponentBase {
this['star3'].visible=true; this['star3'].visible=true;
} }
} }
setBox(idx:number){
this['starlbox1'].visible = false;
this['starlbox2'].visible = false;
this['starlbox3'].visible = false;
if(idx ==0) {
}else if(idx ==1) {
this['starlbox1'].visible=true;
}
else if(idx ==2) {
this['starlbox2'].visible=true;
}else if(idx ==3) {
this['starlbox3'].visible=true;
}
}
get skinKey(): string { return 'Star' } get skinKey(): string { return 'Star' }
} }
\ No newline at end of file
...@@ -7,8 +7,17 @@ import { getlogItem } from "../Main"; ...@@ -7,8 +7,17 @@ import { getlogItem } from "../Main";
export default class FailedPanel extends Panel { export default class FailedPanel extends Panel {
_level; _level;
//场景展示
changeSceneShow(havevideo){
this["havevideo"].visible = havevideo;
this["novideo"].visible = !havevideo;
}
start(data) { start(data) {
super.start(); super.start();
console.error("过关失败===》",data);
const {showVideo} = data;
this.changeSceneShow(showVideo);
if (data) if (data)
this._level = parseInt(data.level + ''); this._level = parseInt(data.level + '');
NetManager.ins.hc_home(() => { }, window['collectRuleId']); NetManager.ins.hc_home(() => { }, window['collectRuleId']);
...@@ -19,7 +28,6 @@ export default class FailedPanel extends Panel { ...@@ -19,7 +28,6 @@ export default class FailedPanel extends Panel {
changeMapScene({ level: this._level }); changeMapScene({ level: this._level });
else else
changeMapScene(); changeMapScene();
}, this); }, this);
addRankFriendList(84, 772.52, this); addRankFriendList(84, 772.52, this);
......
...@@ -325,8 +325,8 @@ export const Chapters10: ChapterData[] = [ ...@@ -325,8 +325,8 @@ export const Chapters10: ChapterData[] = [
{ {
baseElementTypes: [2, 3, 1, 0, 4], baseElementTypes: [2, 3, 1, 0, 4],
bubbleProbability: 0, bubbleProbability: 0,
stepCount: 25, stepCount: 1,
passTarget: { type: 1, elements: [{ type: 0, count: 30 }, { type: 1, count: 36 }] }, passTarget: { type: 1, elements: [{ type: 0, count: 1 }] },
starScores: [5000, 11000, 19000], map: { starScores: [5000, 11000, 19000], map: {
lattices: [1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0], connectedLats: [[31, 67], [45, 63], [46, 64], [47, 65], [51, 69], [52, 70], [53, 71]], elements: lattices: [1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0], connectedLats: [[31, 67], [45, 63], [46, 64], [47, 65], [51, 69], [52, 70], [53, 71]], elements:
[ [
......
...@@ -142,6 +142,7 @@ export class Element extends eui.Component { ...@@ -142,6 +142,7 @@ export class Element extends eui.Component {
this.showImage = new eui.Image(); this.showImage = new eui.Image();
this.changeSource("ele" + this.type + "_png"); this.changeSource("ele" + this.type + "_png");
this.addChild(this.showImage); this.addChild(this.showImage);
//鸡蛋 //鸡蛋
if (type == ElementType.CHICKEN_EGG) { if (type == ElementType.CHICKEN_EGG) {
this.chickenEgg = Pool.takeOut(RecoverName.CHICKEN_EGG) this.chickenEgg = Pool.takeOut(RecoverName.CHICKEN_EGG)
...@@ -173,13 +174,14 @@ export class Element extends eui.Component { ...@@ -173,13 +174,14 @@ export class Element extends eui.Component {
// this.showImage.source = source; // this.showImage.source = source;
var texture: egret.Texture; var texture: egret.Texture;
texture = RES.getRes(source); texture = RES.getRes(source);
if(this.type==ElementType.BLIND_BOX){
console.error('盲盒的',source,texture);
}
this.showImage.texture = texture this.showImage.texture = texture
// if (this.type != ElementType.BLIND_BOX) {
this.showImage.x = -texture.textureWidth / 2; this.showImage.x = -texture.textureWidth / 2;
this.showImage.y = -texture.textureHeight / 2; this.showImage.y = -texture.textureHeight / 2;
// }
//特殊逻辑,因为魔力鸟动效要旋转,所以隐藏原图showImage,还有鸡蛋,还有特殊节日元素大 //特殊逻辑,因为魔力鸟动效要旋转,所以隐藏原图showImage,还有鸡蛋,还有特殊节日元素大
if (source == "magicLion_png" || if (source == "magicLion_png" ||
......
...@@ -185,24 +185,24 @@ export class ScoreProgress { ...@@ -185,24 +185,24 @@ export class ScoreProgress {
let data = this.starboxdata[idx]; let data = this.starboxdata[idx];
let spx = this["sbox" + (idx + 1) + "x"]; let spx = this["sbox" + (idx + 1) + "x"];
let texsrc = "starbox"+(idx+1);
// let texurl = data == 2 ? "//yun.duiba.com.cn/aurora/assets/8312db117356184c07b0d67153ec67ba3ed16f9f.png" : "//yun.duiba.com.cn/aurora/assets/f565872fe14ec885c7a9935bc0cfc40515b81898.png";
sp.texture = RES.getRes("starbox"+(idx+1)+"_png");
// await loadImageByUrl(texurl);
// sp.width = data == 2 ? this.box2wid : this.box1wid;
// sp.height = data == 2 ? this.box2hei : this.box1hei;
sp.anchorOffsetX = sp.width / 2;
sp.anchorOffsetY = sp.height / 2;
sp.x = spx + this.starwid / 2;// - sp.width / 2;
sp.y = this.sboxy;// - sp.height / 2;
if(data==0){ if(data==0){
setGray(sp); texsrc += "close";
}else if(data==1){
texsrc += "";
}else{ }else{
sp.filters = []; texsrc += "open";
} }
sp.texture = RES.getRes(texsrc+"_png");
sp.anchorOffsetX = sp.width / 2;
sp.anchorOffsetY = sp.height / 2;
sp.x = spx + this.starwid / 2;
sp.y = this.sboxy;
// if(data==0){
// setGray(sp);
// }else{
// sp.filters = [];
// }
if (data == 1) { if (data == 1) {
if (!this["s" + (idx + 1) + "havetween"]) { if (!this["s" + (idx + 1) + "havetween"]) {
this["s" + (idx + 1) + "havetween"] = true; this["s" + (idx + 1) + "havetween"] = true;
...@@ -218,7 +218,6 @@ export class ScoreProgress { ...@@ -218,7 +218,6 @@ export class ScoreProgress {
} }
} else { } else {
egret.Tween.removeTweens(sp); egret.Tween.removeTweens(sp);
} }
} }
//星星宝箱点击 //星星宝箱点击
......
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