Commit 8e2aa3ca authored by zjz1994's avatar zjz1994

Merge branch '0511红包炸弹' of http://gitlab2.dui88.com/wanghongyuan/xiaoxiaole into dev

# Conflicts:
#	egret/resource/default.res.json
#	mock/happyclear/home.json
合并红包炸弹
parents 5fff9631 0113667d
......@@ -122,7 +122,8 @@
}
</script>
<script>
window['fresp'] = 10;
// window['fresp'] = 10;
window['fresp'] = 0.4;
window['signconfigs'] = [
{ nums: '10元宝', type: 'money' },
{ nums: '*1', type: 'hammer' },
......
egret/resource/assets/redrainbg.jpg

262 KB | W: | H:

egret/resource/assets/redrainbg.jpg

248 KB | W: | H:

egret/resource/assets/redrainbg.jpg
egret/resource/assets/redrainbg.jpg
egret/resource/assets/redrainbg.jpg
egret/resource/assets/redrainbg.jpg
  • 2-up
  • Swipe
  • Onion skin
......@@ -241,7 +241,7 @@
"name": "helpGroup"
},
{
"keys": "virprizebg_png,lightdi_png,wormhole_png,startscenebg_jpg,adsmask_png,nsad2_png,nsad1_png",
"keys": "virprizebg_png,lightdi_png,wormhole_png,startscenebg_jpg,adsmask_png,nsad2_png,nsad1_png,hbchuanguan2_png,redAlert_btn1_png,loadingbgfes_png,titimg1_png,titimg2_png,titimg3_png,titimg4_png",
"name": "preload"
}
],
......@@ -5421,6 +5421,41 @@
"url": "assets/mainScene/ele41.png",
"type": "image",
"name": "ele41_png"
},
{
"name": "hbchuanguan2_png",
"type": "image",
"url": "assets/redbombalert/hbchuanguan2.png"
},
{
"name": "redAlert_btn1_png",
"type": "image",
"url": "assets/redbombalert/redAlert_btn1.png"
},
{
"name": "loadingbgfes_png",
"type": "image",
"url": "assets/startScene/loadingbgfes.png"
},
{
"name": "titimg1_png",
"type": "image",
"url": "assets/redbombalert/titimg1.png"
},
{
"name": "titimg2_png",
"type": "image",
"url": "assets/redbombalert/titimg2.png"
},
{
"name": "titimg3_png",
"type": "image",
"url": "assets/redbombalert/titimg3.png"
},
{
"name": "titimg4_png",
"type": "image",
"url": "assets/redbombalert/titimg4.png"
}
]
}
\ No newline at end of file
......@@ -31,12 +31,12 @@
</e:Group>
<e:Image id="settingBtn" y="1" source="setting_png" horizontalCenter="0"/>
</e:Group>
<e:Group id="redrainbg" width="750" height="1624" visible="false">
<e:Group id="redrainbg" width="750" height="1624">
<e:Image source="redrainbg_jpg"/>
<e:Label id="tips" text="正在加载中,请稍后" y="826.33" textColor="0x244B00" horizontalCenter="0" size="24" visible="false"/>
<e:Label id="percentTxt" text="63%" y="943.33" textColor="0x244B00" horizontalCenter="0.5"/>
<e:Group x="140" y="857.27">
<e:Image source="loadingbg_png" y="0" x="0"/>
<e:Image y="3.99" x="5.33" source="loadingbgfes_png"/>
<e:Group id="maskwrapper" x="14.56" y="7.14">
<e:Group id="container4" x="0" y="0">
<e:Group id="container3" x="0" y="0"/>
......
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="RedBombAlertSkin" width="750" height="1624" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Group id="group" y="470" horizontalCenter="0">
<e:Image source="redbombalert文案_png" y="0" horizontalCenter="0"/>
<e:Label id="tips" text="今日还有2个红包在其他关卡等你哦~" y="79" textColor="0xffe9c0" x="0"/>
<e:Image id="titimg1" y="0" horizontalCenter="0" source="titimg1_png" visible="false"/>
<e:Image id="titimg2" y="0" horizontalCenter="0" source="titimg2_png" visible="false"/>
<e:Image id="titimg3" y="0" horizontalCenter="0" source="titimg3_png" visible="false"/>
<e:Image id="titimg4" y="0" horizontalCenter="0" source="titimg4_png" visible="false"/>
<e:Label id="tips" text="今日还有2个红包在其他关卡等你哦~" y="79" textColor="0xffe9c0" horizontalCenter="0"/>
</e:Group>
<e:Group id="btn" y="985" horizontalCenter="0" visible="false">
<e:Image source="redAlert_btn_png" y="0" x="0"/>
<e:Label id="btnLabel" text="愉快收下" y="30" size="38" stroke="2" strokeColor="0x2f7df9" fontFamily="FZY3JW" x="103" bold="true"/>
<e:Group id="btn" y="985" horizontalCenter="0">
<e:Image id="btn1" y="0" source="redAlert_btn1_png" horizontalCenter="0" visible="false"/>
<e:Image id="btn2" source="hbchuanguan2_png" horizontalCenter="0" visible="false"/>
<e:Label id="btnLabel" text="愉快收下" y="30" size="38" stroke="2" strokeColor="0x2f7df9" fontFamily="FZY3JW" x="103" bold="true" visible="false"/>
</e:Group>
<e:Group id="numsgroup" x="410" y="350" scaleX="1.5" scaleY="1.5" visible="false">
<e:Image id="numsbg" source="signprize_numsbg_png" x="0" y="0" scaleX="1" scaleY="1"/>
......
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="RedBombRuleSkin" width="750" height="1624" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Rect left="0" top="0" bottom="0" right="0" fillAlpha="0.65"/>
<e:Image id="ruleBg" horizontalCenter="0" y="213.7" source="hbRule_bg_png"/>
<e:Scroller id="scroller" width="545" x="103.76" height="507" y="337.2">
<e:Rect id="rectbg" left="0" right="0" fillAlpha="0.65" height="1624" y="0"/>
<e:Image id="ruleBg" horizontalCenter="0" y="305.7" source="hbRule_bg_png"/>
<e:Scroller id="scroller" width="545" x="103.76" height="547" y="401.2" anchorOffsetY="0">
<e:Group id="group" width="100%">
<e:Label id="labContent" width="100%" text="" lineSpacing="10" size="30" multiline="true" textColor="0xa54615"/>
<e:layout>
......@@ -10,7 +10,7 @@
</e:layout>
</e:Group>
</e:Scroller>
<e:Button id="closeBtn" label="" x="599" y="213.7">
<e:Button id="closeBtn" label="" x="599" y="337.7">
<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"/>
......
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="RedBombTipsSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Group id="con1"/>
<e:Image id="rulebtn" source="redbagtips活动规则_png" y="1004" horizontalCenter="0"/>
<e:Image id="rulebtn" source="redbagtips活动规则_png" y="1028" horizontalCenter="0.5"/>
<e:Image source="redbagtips_elexx_png" x="210" y="50" visible="false"/>
<e:Group id="btn" y="883.31" horizontalCenter="0">
<e:Image source="redbagtips按钮_png" y="0" x="0"/>
<e:Label text="开启作战" verticalCenter="-3.5" horizontalCenter="0" size="38" strokeColor="0x0389ff" stroke="2" fontFamily="FZY3JW"/>
<e:Label text="开启作战" verticalCenter="-3.5" horizontalCenter="0" size="38" strokeColor="0x0389ff" stroke="2" fontFamily="FZY3JW" visible="false"/>
</e:Group>
</e:Skin>
\ No newline at end of file
......@@ -7,9 +7,9 @@
<e:Image id="ele3" source="redbagtips_ele1_png" x="160" y="56"/>
<e:Image id="ele4" source="redbagtips_ele_png" x="134" y="490"/>
<e:Image id="redbag" source="redbagtips_ele7_png" y="432" x="376" anchorOffsetX="192" anchorOffsetY="108"/>
<e:Image id="rulebtn" source="redbagtips活动规则_png" y="814" horizontalCenter="0.5"/>
<e:Image id="rulebtn" source="redbagtips活动规则_png" y="839.32" horizontalCenter="0.5"/>
<e:Group id="btn" y="693.31" horizontalCenter="0">
<e:Image source="redbagtips按钮_png" y="0" x="0"/>
<e:Label text="找红包" verticalCenter="-10" horizontalCenter="0" size="38" strokeColor="0x0389FF" stroke="2" fontFamily="FZY3JW"/>
<e:Label text="找红包" verticalCenter="-10" horizontalCenter="0" size="38" strokeColor="0x0389FF" stroke="2" fontFamily="FZY3JW" visible="false"/>
</e:Group>
</e:Skin>
\ No newline at end of file
......@@ -295,7 +295,7 @@ export default class MainScene extends Scene {
//节日元素目标
festivalTarget: FestivalTarget;
//节日小元素需要个数
festivalTargetNum: number = fesELeSmallNum;
festivalTargetNum: number = 4;//fesELeSmallNum;
//所有元素的消耗数量,需要传给后端
hasEliminatedElements: number[];
//得分的动画,首先特效组合的单独算分,然后把所有符合的放入,在波及的特效触发时不算分
......@@ -478,6 +478,7 @@ export default class MainScene extends Scene {
}
resetMainScene(){
this.festivalTargetNum =4;
this.emptys = new Array();
this.warningCop = new Array();
this.eliminatedElements = new Array();
......@@ -527,7 +528,7 @@ export default class MainScene extends Scene {
// window['gm'] = this.gm;
//第几关
this.chapter = (data && data.chapter) ? data.chapter : 1;
// this.chapter = 24;
// this.chapter = 1;
//关卡数据
this.chapterData = getChapterData(this.chapter);
//初始化目标信息
......@@ -1601,6 +1602,10 @@ export default class MainScene extends Scene {
//初始化节日元素
async initFestivalEle() {
//添加节日元素,条件可能会变
var guidelevels = [1, 2, 3, 5, 8, 9, 10, 12, 17, 25, 41, 61, 101, 121, 226, 301,331, 377, 406, 426, 453, 501, 556, 601,661];
if(guidelevels.indexOf(this.chapter)!=-1&&!readCache(getCacheKey() + this.chapter)){
return false;
}
if(
fesChapterData.indexOf(this.chapter >> 0) > -1 &&
getRedBombTimes() &&
......@@ -1608,6 +1613,7 @@ export default class MainScene extends Scene {
this.lattices[festivalIndex] && //格子必须有
(Tool.judgeSetFesEle(this.lattices[festivalIndex]) || !this.lattices[festivalIndex].element) //没有元素也行
) {
console.log("节日元素loading");
this['redrainbg'].visible = true;
await this.startPlayLoadingAni();
this['redrainbg'].visible = false;
......@@ -1616,7 +1622,7 @@ export default class MainScene extends Scene {
//添加节日红包目标,todo,记得测试红包
this.festivalTarget = new FestivalTarget(this.festivalTargetNum);
this.festivalTarget.x = 580;
this.festivalTarget.y = 115;
this.festivalTarget.y = 207.5;
this.festivalContainer.removeChildren();
this.festivalContainer.addChild(this.festivalTarget);
......
......@@ -57,7 +57,13 @@ export default class BombTips2Panel extends Panel {
const rule = new RedBombRule();
rule.loadSkin();
rule.start();
rule.y = this.stage.stageHeight/2 - rule.height/2;
// rule.y = -this.y;
// console.log('位置调整',this.y,rule.y,rule['rectbg'].y);
// console.log("rule位置",this.stage.stageHeight,this.height,this.y,this.anchorOffsetY,rule.y,rule.anchorOffsetY);
this.addChild(rule);
rule['rectbg'].y = (-rule.y-this.y);
}
onTapInvite() {
......
......@@ -44,6 +44,9 @@ export default class BombTipsPanel extends Panel {
const rule = new RedBombRule();
rule.loadSkin();
rule.start();
// rule.anchorOffsetY = rule.height/2;
rule.y = - this.y;
console.log("rule位置",this.stage.height,this.height,this.y,this.anchorOffsetY,rule.y,rule.anchorOffsetY);
this.addChild(rule);
}
......
......@@ -17,14 +17,33 @@ export default class RedBombAlertPanel extends Panel {
private alertHeight = 100; // TODO 高度修改
showimgtype:number = 1;
async start(data) {
super.start();
//1.作战成功,2.恭喜找到隐藏红包,3.恭喜找到今日所有隐藏红包,4.哎呀~红包溜走了
const date = new Date();
date.setHours(0, 0, 0, 0);
const nowTimerStr = date.getTime() + '';
const oldTimerStr = localStorage.getItem('nowTimerStr' + window['CFG'].consumerId);
const nowTimerStr4 = date.getTime() + '';
const oldTimerStr4 = localStorage.getItem('nowTimer4Str' + window['CFG'].consumerId);
if(nowTimerStr4!=oldTimerStr4){
this.showimgtype = 1;
localStorage.setItem('nowTimer4Str' + window['CFG'].consumerId, nowTimerStr4);
}else{
this.showimgtype = 2;
}
const times = getRedBombTimes() - 1;
this['tips'].text = `今日还有${times}个红包在其他关卡等你哦~`;
if(times <= 0) {
this['tips'].text = `当日红包任务达成,明日再来~`;
this.showimgtype = 3;
this['tips'].text = `明天还有更多红包等你哦~`;
}
this.changeShowTitImg(this.showimgtype);
this['group'].alpha = 0;
egret.Tween.get(this['group']).wait(1500).to({alpha: 1}, 300);
......@@ -44,6 +63,13 @@ export default class RedBombAlertPanel extends Panel {
}, this);
});
}
changeShowTitImg(type:number){
this['titimg1'].visible = false;
this['titimg2'].visible = false;
this['titimg3'].visible = false;
this['titimg4'].visible = false;
this['titimg'+type].visible = true;
}
playNoPrizeAni() {
loadSvga(getResPath() + 'resource/assets/svgas/redbomb_noprize.svga').then(async (mv: any) => {
......@@ -52,8 +78,18 @@ export default class RedBombAlertPanel extends Panel {
egret.Tween.get(this['group']).to({alpha: 0}, 300);
this.addChild(mv);
setTimeout(() => {
if(this.showimgtype==1||this.showimgtype==2){
this.showimgtype = 4;
this.changeShowTitImg(this.showimgtype);
this['group'].alpha = 1;
this['tips'].text = `快去另一个关卡找找吧`;
}
this.btn.visible = true;
this.btnLabel.text = '继续闯关';
this['btn2'].visible = true;
this['btn1'].visible = false;
// this.btnLabel.text = '继续闯关';
NetManager.ins.showLog(getlogItem(76));
this.btn.addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
NetManager.ins.clickLog(getlogItem(76));
......@@ -77,7 +113,9 @@ export default class RedBombAlertPanel extends Panel {
this.addChildAt(mv, 1);
setTimeout(() => {
this.btn.visible = true;
this.btnLabel.text = '开心收下';
// this.btnLabel.text = '开心收下';
this['btn1'].visible = true;
this['btn2'].visible = false;
NetManager.ins.showLog(getlogItem(75));
this.btn.addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
NetManager.ins.clickLog(getlogItem(75));
......
......@@ -28,7 +28,7 @@ const chickenNum: number = 4;
//节日大红包的小红包数量
export const fesELeSmallNum: number = 4;
export let fesELeSmallNum: number = 4;
export class AiControl {
private static _ins: AiControl
......@@ -129,6 +129,7 @@ export class AiControl {
//打乱索引
redIndexs.sort(function () { return (0.5 - Math.random()); });
let six: any[] = redIndexs.splice(0, fesELeSmallNum);
console.log("发红包",six,fesELeSmallNum);
//如果不足6个,就修改thisObj里的
if (six.length < fesELeSmallNum) {
thisObj.festivalTargetNum = fesELeSmallNum;
......
......@@ -37,13 +37,13 @@ export class FestivalTarget extends egret.DisplayObjectContainer {
this.addChild(showImage);
var texture: egret.Texture = RES.getRes("rightMark_png");
this.zeroMark = new egret.Bitmap(texture);
this.zeroMark.x = 23;
this.zeroMark.y = 50;
this.zeroMark.x = 30;
this.zeroMark.y = 47;
this.zeroMark.visible = false;
this.addChild(this.zeroMark);
this.countNum = new TargetNumber();
this.countNum.x = 40;
this.countNum.y = 60;
this.countNum.y = 55;
this.addChild(this.countNum);
this.count = count;
......
......@@ -4,7 +4,6 @@
"desc": "OK",
"timestamp": 1579512019430,
"data": {
"option": {"img":"//yun.duiba.com.cn/images/201607/73htz55ih9.jpg"},
"orderNum": null,
"remainAwardTimes": 0
}
......
{
"code":"0000000000",
"data":{
"remain": 7,
"remain": 1,
"redBombSwitchTime": "77798963487234"
},
"desc":"OK",
"success":false,
"success":true,
"timestamp":1572923489898
}
\ No newline at end of file
......@@ -3503,141 +3503,6 @@
"levelNum": 698,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 699,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 700,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 701,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 702,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 703,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 704,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 705,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 706,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 707,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 708,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 709,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 710,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 711,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 712,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 713,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 714,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 715,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 716,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 717,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 718,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 719,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 720,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 721,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 722,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 723,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 724,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 725,
"maxScore": 47440,
"stars": 1
}
],
"remainProp": [
......
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