Commit a122da38 authored by wjf's avatar wjf

l

parent 60f42201
...@@ -167,6 +167,7 @@ export default class MainBase extends eui.UILayer { ...@@ -167,6 +167,7 @@ export default class MainBase extends eui.UILayer {
RES.getResAsync("guideTxt" + i + "_png") RES.getResAsync("guideTxt" + i + "_png")
} }
var arr = [ var arr = [
"bonusTime",
"boomBtn", "boomBtn",
"hammerBtn", "hammerBtn",
"stepBtn", "stepBtn",
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
"name": "startpanel" "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,guideTxt5_png,guideTxt4_png,guideTxt3_png,guideTxt2_png,guideTxt1_png,guideKnowBtn_png,guideBg_png,propNum9_png,propNum8_png,propNum7_png,propNum6_png,propNum5_png,propNum4_png,propNum3_png,propNum2_png,propNum1_png,propNum0_png,propNumBg_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,propNum9_png,propNum8_png,propNum7_png,propNum6_png,propNum5_png,propNum4_png,propNum3_png,propNum2_png,propNum1_png,propNum0_png,propNumBg_png,bonusTime_png",
"name": "main" "name": "main"
}, },
{ {
...@@ -1425,6 +1425,11 @@ ...@@ -1425,6 +1425,11 @@
"url": "assets/map/声音关闭.png", "url": "assets/map/声音关闭.png",
"type": "image", "type": "image",
"name": "声音关闭_png" "name": "声音关闭_png"
},
{
"url": "assets/mainScene/bonusTime.png",
"type": "image",
"name": "bonusTime_png"
} }
] ]
} }
\ No newline at end of file
...@@ -46,6 +46,7 @@ import SceneCtrl from '../../libs/new_wx/ctrls/sceneCtrl'; ...@@ -46,6 +46,7 @@ import SceneCtrl from '../../libs/new_wx/ctrls/sceneCtrl';
import { PropGuide } from '../something/uis/PropGuide'; import { PropGuide } from '../something/uis/PropGuide';
import { createData } from '../startScene/StartScene'; import { createData } from '../startScene/StartScene';
import { Loading2 } from '../something/uis/Loading2'; import { Loading2 } from '../something/uis/Loading2';
import { BonusTime } from '../something/uis/BonusTime';
const aniClass = { const aniClass = {
"BoomAni": BoomAni, "BoomAni": BoomAni,
...@@ -191,6 +192,8 @@ export default class MainScene extends Scene { ...@@ -191,6 +192,8 @@ export default class MainScene extends Scene {
propGuide: PropGuide; propGuide: PropGuide;
//步数道具引导时的圆 //步数道具引导时的圆
stepCircle: egret.Shape; stepCircle: egret.Shape;
//bonus Time 提示
bonusTime: BonusTime;
start(data) { start(data) {
super.start(); super.start();
//初始化索引信息 //初始化索引信息
...@@ -246,12 +249,13 @@ export default class MainScene extends Scene { ...@@ -246,12 +249,13 @@ export default class MainScene extends Scene {
g.init(this.chapter, () => { g.init(this.chapter, () => {
Loading2.instace.hide() Loading2.instace.hide()
this.addChild(g); this.addChild(g);
this.enableMouseEvt(true); // this.enableMouseEvt(true);
}) })
} else { } else {
}
//开启事件,具体不应该放在这里,到时看 //开启事件,具体不应该放在这里,到时看
this.enableMouseEvt(true); this.enableMouseEvt(true);
}
//测试代码 //测试代码
var fail = new eui.Image(RES.getRes("guideKnowBtn_png")); var fail = new eui.Image(RES.getRes("guideKnowBtn_png"));
fail.x = 10; fail.x = 10;
...@@ -363,6 +367,10 @@ export default class MainScene extends Scene { ...@@ -363,6 +367,10 @@ export default class MainScene extends Scene {
this.propGuide = new PropGuide(); this.propGuide = new PropGuide();
this.propGuide.touchEnabled = true; this.propGuide.touchEnabled = true;
// this.addChild(this.propGuide); // this.addChild(this.propGuide);
//bonusTime引导
this.bonusTime = new BonusTime();
this.bonusTime.x = 375;
this.bonusTime.y = 600;
} }
//初始化格子 //初始化格子
initLattices() { initLattices() {
...@@ -1483,6 +1491,7 @@ export default class MainScene extends Scene { ...@@ -1483,6 +1491,7 @@ export default class MainScene extends Scene {
this.scoreAnis.length = 0; this.scoreAnis.length = 0;
this.score += scoreAll; this.score += scoreAll;
this.oneStepScore += scoreAll; this.oneStepScore += scoreAll;
console.log(this.score)
//this.eliminatedElements已为0;对有特效的特殊处理,又会添加进eliminatedElements, //this.eliminatedElements已为0;对有特效的特殊处理,又会添加进eliminatedElements,
//必须在上面得分动效后,因为下面这波重新出现的元素要在下一次出现 //必须在上面得分动效后,因为下面这波重新出现的元素要在下一次出现
...@@ -1522,10 +1531,11 @@ export default class MainScene extends Scene { ...@@ -1522,10 +1531,11 @@ export default class MainScene extends Scene {
//连消基数为1 //连消基数为1
this.commonContinuityTimes = 1; this.commonContinuityTimes = 1;
this.effectContinuityTimes = 1; this.effectContinuityTimes = 1;
showToast("bonus times") this.addChild(this.bonusTime);
setTimeout(() => { this.bonusTime.play(() => {
this.removeChild(this.bonusTime)
this.terminateSteps(); this.terminateSteps();
}, 1300) })
return return
} }
//出累计一步分数的toast; //出累计一步分数的toast;
......
export class BonusTime extends egret.Bitmap{ export class BonusTime extends egret.Bitmap {
constructor(value?:egret.Texture){ constructor() {
super(); super();
new egret.Bitmap() this.texture = RES.getRes("bonusTime_png")
this.anchorOffsetX = this.texture.textureWidth / 2;
this.anchorOffsetY = this.texture.textureHeight / 2;
}
play(callback: Function) {
this.scaleX = 0.1;
this.scaleY = 0.1;
egret.Tween.get(this, undefined, undefined, true)
.to({ scaleX: 1, scaleY: 1 }, 500,egret.Ease.cubicOut)
.wait(500)
.call(() => {
callback();
})
} }
} }
\ No newline at end of file
...@@ -22,6 +22,7 @@ export class GuideMsg extends egret.DisplayObjectContainer { ...@@ -22,6 +22,7 @@ export class GuideMsg extends egret.DisplayObjectContainer {
shape.graphics.beginFill(0x000000, 0.7); shape.graphics.beginFill(0x000000, 0.7);
shape.graphics.drawRect(0, 0, 750, 1624); shape.graphics.drawRect(0, 0, 750, 1624);
shape.graphics.endFill(); shape.graphics.endFill();
shape.touchEnabled = true;
this.addChild(shape); this.addChild(shape);
//背景图 //背景图
this.bg = new egret.Bitmap(RES.getRes("guideBg_png")); this.bg = new egret.Bitmap(RES.getRes("guideBg_png"));
......
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