Commit 20e8ee56 authored by wildfirecode's avatar wildfirecode

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

parents 9ddcd4eb e6325262
......@@ -156,7 +156,12 @@ export default class MainBase extends eui.UILayer {
for (var i = 0; i <= 9; i++) {
RES.getResAsync("targetNumber" + i + "_png")
}
for (var i = 1; i <= 5; i++) {
RES.getResAsync("guideTxt" + i + "_png")
}
var arr = [
"guideBg",
"guideKnowBtn",
"bonusShoot",
"ele5",
"ele6",
......@@ -220,7 +225,7 @@ export default class MainBase extends eui.UILayer {
SceneCtrl.instance.change(ModuleTypes.START_SCENE, this.svgaList);
}
}
NetManager.ins.hc_home(() => {
count--;
check();
......
......@@ -57,12 +57,12 @@
"name": "startpanel"
},
{
"keys": "yezi1_png,unlightedStar_png,targetBoard_png,stepsBoard_png,stepNumber9_png,stepNumber8_png,stepNumber7_png,stepNumber6_png,stepNumber5_png,stepNumber4_png,stepNumber3_png,stepNumber2_png,stepNumber1_png,stepNumber0_png,stepBtn_png,starProgress_png,setting_png,scoreNumber9_png,scoreNumber8_png,scoreNumber7_png,scoreNumber6_png,scoreNumber5_png,scoreNumber4_png,scoreNumber3_png,scoreNumber2_png,scoreNumber1_png,scoreNumber0_png,rock6_png,rock5_png,rock4_png,rock3_png,rock2_png,rock1_png,rightMark_png,rightArrow_png,rectLat_png,progressDown_png,playSceneBg_png,magicLionBg_png,magicLion_png,lockUp_png,lockDown_png,lineLight_png,lightedStar_png,leftArrow_png,ice6_png,ice5_png,ice4_png,ice3_png,ice2_png,ice1_png,hammerBtn_png,eleDis9_png,eleDis8_png,eleDis7_png,eleDis6_png,eleDis5_png,eleDis4_png,eleDis3_png,eleDis2_png,eleDis12_png,eleDis11_png,eleDis10_png,eleDis1_png,ele5_png,ele42_png,ele41_png,ele40_png,ele4_png,ele32_png,ele31_png,ele30_png,ele3_png,ele22_png,ele21_png,ele20_png,ele2_png,ele12_png,ele11_png,ele10_png,ele1_png,ele02_png,ele01_png,ele00_png,ele0_png,dangqianfenshu_png,chooseRect_png,boomBtn_png,boom9_png,boom8_png,boom7_png,boom6_png,boom5_png,boom4_png,boom3_png,boom2_png,boom18_png,boom17_png,boom16_png,boom15_png,boom14_png,boom13_png,boom12_png,boom11_png,boom10_png,boom1_png,mainSoundBtnOn_png,mainSettingBg_png,mainQuestionBtn_png,mainMusicBtnOn_png,mainQuitBtn_png,mainSoundBtnOff_png,mainMusicBtnOff_png,targetNumber9_png,targetNumber8_png,targetNumber7_png,targetNumber6_png,targetNumber5_png,targetNumber4_png,targetNumber3_png,targetNumber2_png,targetNumber1_png,targetNumber0_png,ele7_png,ele6_png,bonusFra9_png,bonusFra8_png,bonusFra7_png,bonusFra6_png,bonusFra5_png,bonusFra4_png,bonusFra3_png,bonusFra27_png,bonusFra26_png,bonusFra25_png,bonusFra24_png,bonusFra23_png,bonusFra22_png,bonusFra21_png,bonusFra20_png,bonusFra2_png,bonusFra19_png,bonusFra18_png,bonusFra17_png,bonusFra16_png,bonusFra15_png,bonusFra14_png,bonusFra13_png,bonusFra12_png,bonusFra11_png,bonusFra10_png,bonusFra1_png,bonusShoot_png",
"keys": "yezi1_png,unlightedStar_png,targetBoard_png,stepsBoard_png,stepNumber9_png,stepNumber8_png,stepNumber7_png,stepNumber6_png,stepNumber5_png,stepNumber4_png,stepNumber3_png,stepNumber2_png,stepNumber1_png,stepNumber0_png,stepBtn_png,starProgress_png,setting_png,scoreNumber9_png,scoreNumber8_png,scoreNumber7_png,scoreNumber6_png,scoreNumber5_png,scoreNumber4_png,scoreNumber3_png,scoreNumber2_png,scoreNumber1_png,scoreNumber0_png,rock6_png,rock5_png,rock4_png,rock3_png,rock2_png,rock1_png,rightMark_png,rightArrow_png,rectLat_png,progressDown_png,playSceneBg_png,magicLionBg_png,magicLion_png,lockUp_png,lockDown_png,lineLight_png,lightedStar_png,leftArrow_png,ice6_png,ice5_png,ice4_png,ice3_png,ice2_png,ice1_png,hammerBtn_png,eleDis9_png,eleDis8_png,eleDis7_png,eleDis6_png,eleDis5_png,eleDis4_png,eleDis3_png,eleDis2_png,eleDis12_png,eleDis11_png,eleDis10_png,eleDis1_png,ele5_png,ele42_png,ele41_png,ele40_png,ele4_png,ele32_png,ele31_png,ele30_png,ele3_png,ele22_png,ele21_png,ele20_png,ele2_png,ele12_png,ele11_png,ele10_png,ele1_png,ele02_png,ele01_png,ele00_png,ele0_png,dangqianfenshu_png,chooseRect_png,boomBtn_png,boom9_png,boom8_png,boom7_png,boom6_png,boom5_png,boom4_png,boom3_png,boom2_png,boom18_png,boom17_png,boom16_png,boom15_png,boom14_png,boom13_png,boom12_png,boom11_png,boom10_png,boom1_png,mainSoundBtnOn_png,mainSettingBg_png,mainQuestionBtn_png,mainMusicBtnOn_png,mainQuitBtn_png,mainSoundBtnOff_png,mainMusicBtnOff_png,targetNumber9_png,targetNumber8_png,targetNumber7_png,targetNumber6_png,targetNumber5_png,targetNumber4_png,targetNumber3_png,targetNumber2_png,targetNumber1_png,targetNumber0_png,ele7_png,ele6_png,bonusFra9_png,bonusFra8_png,bonusFra7_png,bonusFra6_png,bonusFra5_png,bonusFra4_png,bonusFra3_png,bonusFra27_png,bonusFra26_png,bonusFra25_png,bonusFra24_png,bonusFra23_png,bonusFra22_png,bonusFra21_png,bonusFra20_png,bonusFra2_png,bonusFra19_png,bonusFra18_png,bonusFra17_png,bonusFra16_png,bonusFra15_png,bonusFra14_png,bonusFra13_png,bonusFra12_png,bonusFra11_png,bonusFra10_png,bonusFra1_png,bonusShoot_png,guideTxt5_png,guideTxt4_png,guideTxt3_png,guideTxt2_png,guideTxt1_png,guideKnowBtn_png,guideBg_png",
"name": "mainScene"
},
{
"name": "preload",
"keys": "showoff_jpg,share2_jpg"
"keys": "showoff_jpg,share2_jpg",
"name": "preload"
}
],
"resources": [
......@@ -1312,14 +1312,49 @@
"name": "bonusShoot_png"
},
{
"name": "share2_jpg",
"url": "assets/share2.jpg",
"type": "image",
"url": "assets/share2.jpg"
"name": "share2_jpg"
},
{
"name": "showoff_jpg",
"url": "assets/showoff.jpg",
"type": "image",
"url": "assets/showoff.jpg"
"name": "showoff_jpg"
},
{
"url": "assets/mainScene/guideTxt5.png",
"type": "image",
"name": "guideTxt5_png"
},
{
"url": "assets/mainScene/guideBg.png",
"type": "image",
"name": "guideBg_png"
},
{
"url": "assets/mainScene/guideKnowBtn.png",
"type": "image",
"name": "guideKnowBtn_png"
},
{
"url": "assets/mainScene/guideTxt1.png",
"type": "image",
"name": "guideTxt1_png"
},
{
"url": "assets/mainScene/guideTxt2.png",
"type": "image",
"name": "guideTxt2_png"
},
{
"url": "assets/mainScene/guideTxt3.png",
"type": "image",
"name": "guideTxt3_png"
},
{
"url": "assets/mainScene/guideTxt4.png",
"type": "image",
"name": "guideTxt4_png"
}
]
}
\ No newline at end of file
This diff is collapsed.
......@@ -3,6 +3,7 @@ import { Element } from "./class/Element";
import { Lattice } from "./class/Lattice";
import { ElementType } from "./enum/ElementType";
import { PassType } from "./enum/PassType";
import { EffectType } from "./enum/EffectType";
export class Tool {
public static rowNum = 9;
......@@ -156,10 +157,33 @@ export class Tool {
}
/**
* 判断格子是否可进行匹配
* 判断格子是否可进行匹配,
* 不包括魔力鸟,
* 包括笼子里的
* @param lat
*/
public static judgeMatch(lat: Lattice) {
//上方格子为null,或格子上元素为null
if (!lat || !lat.element) {
return false
}
//上方元素为石头,或为冰淇淋,或为魔力鸟
else if (lat.element.type == ElementType.ROCK ||
lat.element.type == ElementType.LOLLIPOP ||
lat.element.effectType == EffectType.MAGICLION) {
return false
}
//剩下情况
else {
return true
}
}
/**
* 判断能执行消除的元素,
* 包括所有特效和基本元素
* @param lat
*/
public static judgeEliminate(lat: Lattice) {
//上方格子为null,或格子上元素为null
if (!lat || !lat.element) {
return false
......
import getResPath from "../../../libs/new_tc/getResPath";
const moiveClip = {};
const resPath = getResPath()
const parser = new window["SVGA"].Parser();
/**
* 引导
*/
export class GuideMsg extends egret.DisplayObjectContainer {
bg: egret.Bitmap;
knowBtn: egret.Bitmap;
closeBtn: egret.Bitmap;
msgTxt: egret.Bitmap;
moiveClip;
/**
* closeCommonBtn_png
* @param num 1到5的引导
*/
constructor() {
super()
var shape: egret.Shape = new egret.Shape();
shape.graphics.beginFill(0x000000, 0.7);
shape.graphics.drawRect(0, 0, 750, 1624);
shape.graphics.endFill();
this.addChild(shape);
//背景图
this.bg = new egret.Bitmap(RES.getRes("guideBg_png"));
this.bg.x = (750 - 639) / 2;
this.bg.y = 300;
this.addChild(this.bg);
//关闭按钮
this.closeBtn = new egret.Bitmap(RES.getRes("closeCommonBtn_png"));
this.closeBtn.x = 615;
this.closeBtn.y = 300;
this.closeBtn.touchEnabled = true;
this.addChild(this.closeBtn);
this.closeBtn.addEventListener(egret.TouchEvent.TOUCH_TAP, function () {
if (this.parent) this.parent.removeChild(this)
}, this)
//知道了
this.knowBtn = new egret.Bitmap(RES.getRes("guideKnowBtn_png"));
this.knowBtn.x = (750 - 266) / 2;
this.knowBtn.y = 800;
this.knowBtn.touchEnabled = true;
this.addChild(this.knowBtn);
this.knowBtn.addEventListener(egret.TouchEvent.TOUCH_TAP, function () {
if (this.parent) this.parent.removeChild(this)
}, this)
}
/**
*
* @param num
* @param callback 里面是移除转圈,加进场景
*/
init(num: number, callback: Function) {
//移除原先的svga
if (this.moiveClip) this.removeChild(this.moiveClip);
//svga
if (moiveClip["guide" + num]) {
this.addChild(moiveClip["guide" + num]);
callback();
} else {
parser.load(resPath + 'resource/assets/svgas/' + 'guide' + num + '.svga', (videoItem) => {
var mv = new window["SVGA"].EgretMovieClip(videoItem);
mv.x = 3;
mv.y = -263;
this.moiveClip = mv;
this.addChild(mv);
moiveClip["guide" + num] = mv;
callback();
}, function (error) {
// alert(error.message);
})
}
this.initTxt(num)
}
//调位置
private initTxt(num: number) {
if (!this.msgTxt) {
this.msgTxt = new egret.Bitmap();
this.addChild(this.msgTxt);
}
let y: number;
switch (num) {
case 1:
y = 705;
break;
case 2:
y = 685;
break;
case 3:
y = 685;
break;
case 4:
y = 685;
break;
case 5:
y = 705;
break;
}
var texture: egret.Texture = RES.getRes("guideTxt" + num + "_png");
this.msgTxt.texture = texture;
this.msgTxt.x = (750 - texture.textureWidth) / 2;
this.msgTxt.y = y;
}
}
\ No newline at end of file
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