Commit 0cf0e2a4 authored by zjz1994's avatar zjz1994

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

# Conflicts:
#	egret/src/something/chapters/Chapter31.ts
修改关卡
parents b6fecd81 c6feb6f1
...@@ -543,7 +543,7 @@ export default class MainBase extends eui.UILayer { ...@@ -543,7 +543,7 @@ export default class MainBase extends eui.UILayer {
return new Promise((r) => { return new Promise((r) => {
NetManager.ins.hc_advert(() => { NetManager.ins.hc_advert(() => {
r(); r();
}) },3)
}); });
} }
...@@ -639,7 +639,7 @@ export default class MainBase extends eui.UILayer { ...@@ -639,7 +639,7 @@ export default class MainBase extends eui.UILayer {
//获取分享加体力的shareCode,不影响初始化场景,不进await //获取分享加体力的shareCode,不影响初始化场景,不进await
NetManager.ins.getUserShareCode(() => { }) NetManager.ins.getUserShareCode(() => { })
MapScene.adData = DataManager.ins.getData('hc_advert'); MapScene.adData = DataManager.ins.getData('hc_advert_3');
Buried.init(); Buried.init();
/////////// ///////////
......
...@@ -179,7 +179,7 @@ export class DataManager extends ABDataManager { ...@@ -179,7 +179,7 @@ export class DataManager extends ABDataManager {
* @returns {any} * @returns {any}
*/ */
// tslint:disable-next-line:cyclomatic-complexity // tslint:disable-next-line:cyclomatic-complexity
public updateData(name: number, result: any, param?: any): Data { public updateData(name: any, result: any, param?: any): Data {
let data: Data; let data: Data;
switch (name) { switch (name) {
case NetName.GET_ROLE: case NetName.GET_ROLE:
...@@ -617,8 +617,13 @@ export class DataManager extends ABDataManager { ...@@ -617,8 +617,13 @@ export class DataManager extends ABDataManager {
this._getRecordData.update(result); this._getRecordData.update(result);
data = this._getRecordData; data = this._getRecordData;
default: default:
if(name=="hc_advert"){
this[this.getKey(name+"_"+param.type)] = result;
console.log("新广告,分展示位单个区别获取",name,result,param);
}else{
this[this.getKey(name)] = result; this[this.getKey(name)] = result;
} }
}
this.dispatchEvent(new egret.Event('dataUpdate', false, false, name)); this.dispatchEvent(new egret.Event('dataUpdate', false, false, name));
return data || result; return data || result;
} }
......
...@@ -1461,7 +1461,7 @@ export class NetManager extends ABNetManager { ...@@ -1461,7 +1461,7 @@ export class NetManager extends ABNetManager {
this.send(net); this.send(net);
} }
public hc_advert(callback: Function): void { public hc_advert(callback: Function,type): void {
var deviceId:string = ''; var deviceId:string = '';
var cityCode:string = ''; var cityCode:string = '';
const net: INetData = { const net: INetData = {
...@@ -1472,7 +1472,8 @@ export class NetManager extends ABNetManager { ...@@ -1472,7 +1472,8 @@ export class NetManager extends ABNetManager {
param: { param: {
activityId: DataManager.ins.customCfgData.actId, activityId: DataManager.ins.customCfgData.actId,
deviceId:deviceId, deviceId:deviceId,
cityCode:cityCode cityCode:cityCode,
type:type
}, },
hideMsg: true, hideMsg: true,
callback: callback callback: callback
......
...@@ -3452,7 +3452,8 @@ export default class MainScene extends Scene { ...@@ -3452,7 +3452,8 @@ export default class MainScene extends Scene {
} }
//如果只有步数转化的,不能再进结算, //如果只有步数转化的,不能再进结算,
else { else {
// /** //一次大消除结束
/**
var effectElements = [], elements = []; var effectElements = [], elements = [];
for(var i = Tool.colNum * Tool.rowNum - 1; i >= 0; i--) { for(var i = Tool.colNum * Tool.rowNum - 1; i >= 0; i--) {
var lat = this.lattices[i]; var lat = this.lattices[i];
...@@ -3469,7 +3470,7 @@ export default class MainScene extends Scene { ...@@ -3469,7 +3470,7 @@ export default class MainScene extends Scene {
this.eliminate(); this.eliminate();
return; return;
} }
// */ */
// else{ // else{
// console.log("可以结束"); // console.log("可以结束");
// } // }
......
...@@ -5,6 +5,7 @@ import { Tool } from "../something/Tool"; ...@@ -5,6 +5,7 @@ import { Tool } from "../something/Tool";
import { Lattice } from "../something/class/Lattice"; import { Lattice } from "../something/class/Lattice";
import { RecoverName } from "../something/enum/RecoverName"; import { RecoverName } from "../something/enum/RecoverName";
import { StateType } from "../something/enum/StateType"; import { StateType } from "../something/enum/StateType";
import Block from "../something/block/Block";
/** /**
* fish爆炸 * fish爆炸
*/ */
...@@ -15,11 +16,14 @@ export default async (thisObj: MainScene) => { ...@@ -15,11 +16,14 @@ export default async (thisObj: MainScene) => {
for (var i = 0; i < thisObj.lattices.length; i++) { for (var i = 0; i < thisObj.lattices.length; i++) {
const lattice = thisObj.lattices[i] const lattice = thisObj.lattices[i]
if (lattice && lattice.element && lattice.element.type == ElementType.FISH && lattice.element.isNeb) { if (lattice && lattice.element && lattice.element.type == ElementType.FISH && lattice.element.isNeb) {
// console.log("遗漏河豚---",lattice.element.hasState(StateType.BLOCK_LOCK));
if(!lattice.element.hasState(StateType.BLOCK_LOCK)){
lattice.element.fishCanEliFlag = true; lattice.element.fishCanEliFlag = true;
indexs.push(lattice.index); indexs.push(lattice.index);
thisObj.eliminatedElements.push(lattice.index); thisObj.eliminatedElements.push(lattice.index);
} }
} }
}
for (const index of indexs) { for (const index of indexs) {
const lat: Lattice = thisObj.lattices[index]; const lat: Lattice = thisObj.lattices[index];
......
...@@ -17,7 +17,7 @@ export default class AdSmallComp extends ComponentBase { ...@@ -17,7 +17,7 @@ export default class AdSmallComp extends ComponentBase {
this['img'].mask = this['adsmask']; this['img'].mask = this['adsmask'];
} }
NetManager.ins.hc_advert(() => { NetManager.ins.hc_advert(() => {
const { data } = DataManager.ins.getData('hc_advert'); const { data } = DataManager.ins.getData('hc_advert_2');
let { popupAdvert } = data; let { popupAdvert } = data;
if (popupAdvert == null) if (popupAdvert == null)
popupAdvert = { enable: false, advertList: [] } popupAdvert = { enable: false, advertList: [] }
...@@ -34,7 +34,7 @@ export default class AdSmallComp extends ComponentBase { ...@@ -34,7 +34,7 @@ export default class AdSmallComp extends ComponentBase {
snpmAdStatic.snpmAdReport("show","bottom",result); snpmAdStatic.snpmAdReport("show","bottom",result);
this.data.img = result.img; this.data.img = result.img;
} }
}); },2);
this['img'].addEventListener(egret.TouchEvent.TOUCH_TAP, () => { this['img'].addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
if(result.url.length>2){ if(result.url.length>2){
......
...@@ -171,7 +171,7 @@ export default class MapScene extends Scene { ...@@ -171,7 +171,7 @@ export default class MapScene extends Scene {
this.updateAdData(); this.updateAdData();
this['avatar'].mask = this['avatarMask']; this['avatar'].mask = this['avatarMask'];
NetManager.ins.getSignInfo(() => { NetManager.ins.getSignInfo(async() => {
const parmas = []; const parmas = [];
const panels = []; const panels = [];
const result = this.sendInvite(panels, parmas); const result = this.sendInvite(panels, parmas);
...@@ -187,21 +187,35 @@ export default class MapScene extends Scene { ...@@ -187,21 +187,35 @@ export default class MapScene extends Scene {
const nowTimerStr2 = date.getTime() + ''; const nowTimerStr2 = date.getTime() + '';
const oldTimerStr2 = localStorage.getItem('nowTimer2Str' + window['CFG'].consumerId); const oldTimerStr2 = localStorage.getItem('nowTimer2Str' + window['CFG'].consumerId);
if(nowTimerStr2 != oldTimerStr2){
const hc_advert = DataManager.ins.getData('hc_advert').data || {}; console.log("时间上需要弹出广告");
var adpro = new Promise(res=>{
NetManager.ins.hc_advert(()=>{
const hc_advert = DataManager.ins.getData('hc_advert_1').data || {};
console.log("1广告数据",hc_advert);
let { noticeAdvert } = hc_advert; let { noticeAdvert } = hc_advert;
if (noticeAdvert == null) { if (noticeAdvert == null) {
noticeAdvert = { enable: false } noticeAdvert = { enable: false }
} }
noticeAdvert = DataManager.ins.solveAdvertData(noticeAdvert); noticeAdvert = DataManager.ins.solveAdvertData(noticeAdvert);
if (noticeAdvert && noticeAdvert.enable){
if (noticeAdvert && noticeAdvert.enable && nowTimerStr2 != oldTimerStr2) {
// if (!adTag) {
panels.push('ad'); panels.push('ad');
// adTag = true;
// }
localStorage.setItem('nowTimer2Str' + window['CFG'].consumerId, nowTimerStr2); localStorage.setItem('nowTimer2Str' + window['CFG'].consumerId, nowTimerStr2);
} }
res();
},1);
});
await adpro;
console.log("时间弹出广告结束");
}
// if (noticeAdvert && noticeAdvert.enable && nowTimerStr2 != oldTimerStr2) {
// // if (!adTag) {
// panels.push('ad');
// // adTag = true;
// // }
// localStorage.setItem('nowTimer2Str' + window['CFG'].consumerId, nowTimerStr2);
// }
const backData = DataManager.ins.getData('hc_hasBackReward'); const backData = DataManager.ins.getData('hc_hasBackReward');
if (backData.success) { if (backData.success) {
...@@ -1035,7 +1049,7 @@ export default class MapScene extends Scene { ...@@ -1035,7 +1049,7 @@ export default class MapScene extends Scene {
// 更新广告数据 // 更新广告数据
updateAdData() { updateAdData() {
const hc_advert = DataManager.ins.getData('hc_advert').data || {}; const hc_advert = DataManager.ins.getData('hc_advert_3').data || {};
let { mapAdvert } = hc_advert; let { mapAdvert } = hc_advert;
if (mapAdvert == null) if (mapAdvert == null)
mapAdvert = { enable: false, advertList: [] } mapAdvert = { enable: false, advertList: [] }
...@@ -1439,7 +1453,7 @@ export default class MapScene extends Scene { ...@@ -1439,7 +1453,7 @@ export default class MapScene extends Scene {
* 查询邀请信息 * 查询邀请信息
*/ */
getInviteInfo() { getInviteInfo() {
const hc_advert = DataManager.ins.getData('hc_advert').data || {}; const hc_advert = DataManager.ins.getData('hc_advert_3').data || {};
let { mapAdvert } = hc_advert; let { mapAdvert } = hc_advert;
mapAdvert = DataManager.ins.solveAdvertData(mapAdvert); mapAdvert = DataManager.ins.solveAdvertData(mapAdvert);
// tslint:disable-next-line: cyclomatic-complexity // tslint:disable-next-line: cyclomatic-complexity
......
...@@ -2,7 +2,7 @@ import { DataManager } from "../../libs/tw/manager/DataManager"; ...@@ -2,7 +2,7 @@ import { DataManager } from "../../libs/tw/manager/DataManager";
export default () => { export default () => {
const hc_advert:any = DataManager.ins.getData('hc_advert').data || {}; const hc_advert:any = DataManager.ins.getData('hc_advert_3').data || {};
let { mapAdvert } = hc_advert; let { mapAdvert } = hc_advert;
if (mapAdvert == null) if (mapAdvert == null)
mapAdvert = { enable: false, advertList: [] } mapAdvert = { enable: false, advertList: [] }
......
...@@ -11,7 +11,7 @@ export default class ADPanel extends Panel { ...@@ -11,7 +11,7 @@ export default class ADPanel extends Panel {
this.showlog(); this.showlog();
let result; let result;
const hc_advert = DataManager.ins.getData('hc_advert').data; const hc_advert = DataManager.ins.getData('hc_advert_1').data;
let { noticeAdvert } = hc_advert; let { noticeAdvert } = hc_advert;
noticeAdvert = DataManager.ins.solveAdvertData(noticeAdvert); noticeAdvert = DataManager.ins.solveAdvertData(noticeAdvert);
this.visible = noticeAdvert.enable; this.visible = noticeAdvert.enable;
......
This diff is collapsed.
...@@ -72,9 +72,10 @@ export class Element extends eui.Component { ...@@ -72,9 +72,10 @@ export class Element extends eui.Component {
} }
} }
async nextFishState() { async nextFishState() {
// console.log("河豚充能"); // console.log("河豚充能",this.hasState(StateType.BLOCK_LOCK),this.index);
await wait(1000); await wait(1000);
this._fishState++; this._fishState++;
// console.log(this._fishState,this.index);
if (this._fishState == 1) { if (this._fishState == 1) {
this['fish'].toActive(); this['fish'].toActive();
} }
......
...@@ -60,7 +60,7 @@ export default class Food extends eui.Component{ ...@@ -60,7 +60,7 @@ export default class Food extends eui.Component{
var icol:number = [this.usecol,this.userow][inidx]; var icol:number = [this.usecol,this.userow][inidx];
//row和col反了 //row和col反了
console.log(this.type+'食物占位'+inidx+'row:'+irow+';col:'+icol); // console.log(this.type+'食物占位'+inidx+'row:'+irow+';col:'+icol);
this.lockidxs = new Array(); this.lockidxs = new Array();
this.freeidxs = new Array(); this.freeidxs = new Array();
for(var i=0;i<icol;i++){ for(var i=0;i<icol;i++){
...@@ -70,7 +70,7 @@ export default class Food extends eui.Component{ ...@@ -70,7 +70,7 @@ export default class Food extends eui.Component{
this.lockidxs.push(latidx); this.lockidxs.push(latidx);
} }
} }
console.log('解锁idxs',this.lockidxs); // console.log('解锁idxs',this.lockidxs);
this.showImage.rotation = roa; this.showImage.rotation = roa;
......
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