Commit fefdbd91 authored by wjf's avatar wjf

l

parent d3971b8e
......@@ -13,7 +13,7 @@ export default class PanelCtrl {
/**
* 半透明黑色背景
*/
private _bg: FYGE.Graphics; //FYGE.Shape;
private _bg: FYGE.Shape;//FYGE.Graphics;
/**
* 所有的弹框
*/
......@@ -26,8 +26,8 @@ export default class PanelCtrl {
init(parent: FYGE.Container) {
this._parent = parent;
let bg = new FYGE.Graphics()//Shape();
bg.beginFill(0, 1);
let bg = new FYGE.Shape();//Graphics()//Shape();
bg.beginFill(0);
bg.drawRect(//引用适配
layers.stageOffsetX - parent.x,
layers.stageOffsetY - parent.y,
......@@ -35,6 +35,7 @@ export default class PanelCtrl {
layers.stageHeight
);
bg.endFill();
bg.hitTestByPixel = false;
bg.visible = false;
this._parent.addChild(bg);
this._bg = bg;
......
......@@ -20,7 +20,7 @@ export default class SceneCtrl {
change(cls: any, data?: any) {
//如果是同一个场景,考虑是替换还是return
if (this._currentScene && this._currentScene instanceof cls) return;
// if (this._currentScene && this._currentScene instanceof cls) return;//new一个得了,playScene维护太蛋疼,到时看性能吧
let scene: Scene = new cls(data);
scene.visible = false;
showWaiting();
......@@ -32,7 +32,7 @@ export default class SceneCtrl {
})
scene.visible = true;
//start里可能处理资源信息,所以在onLoaded后执行
scene.start();
scene.start(data);
}
//加载失败,继续用之前的场景,移除scene
scene.onLoadError = () => {
......
......@@ -8,7 +8,7 @@ export class Item extends FYGE.Container implements FYGE.IScrollListItem {
constructor(data?) {
super();
if (this.skinName) RES.initSkinDisplay(this, this.skinName, this);
setTimeout(() => { this.initUi(data); })//考虑是否可以不加延时,加了会有问题,自行调用的updateData会先执行
setTimeout(() => { this.initUi(data); })//考虑是否可以不加延时,加了会有问题,自行调用的updateData会先执行,不加的话继承类里initUi里的属性。。。
}
/**
* 自定义的初始布局方法
......
......@@ -111,7 +111,7 @@ export class Module extends FYGE.Container {
protected btnDelay(target, delay = 2000) {
target.mouseEnable = false;
target.mouseChildren = false;
setTimeout(()=>{
setTimeout(() => {
target.mouseEnable = true;
target.mouseChildren = true;
}, delay);
......@@ -122,7 +122,7 @@ export class Module extends FYGE.Container {
//以防有些地方用了showAni
removeTweens(this);
this.data = null;//看情况吧,有时候hidePanel后用了data,注意
// this.data = null;//看情况吧,有时候hidePanel后用了data,注意,还是先去掉吧
//移除事件
this.removeEvents();
//派发销毁事件,主要用于场景及弹框控制
......
resource/common/ele10.png

7.43 KB | W: | H:

resource/common/ele10.png

9.8 KB | W: | H:

resource/common/ele10.png
resource/common/ele10.png
resource/common/ele10.png
resource/common/ele10.png
  • 2-up
  • Swipe
  • Onion skin
resource/common/ele11.png

7.31 KB | W: | H:

resource/common/ele11.png

9.43 KB | W: | H:

resource/common/ele11.png
resource/common/ele11.png
resource/common/ele11.png
resource/common/ele11.png
  • 2-up
  • Swipe
  • Onion skin
resource/common/ele12.png

7.31 KB | W: | H:

resource/common/ele12.png

9.43 KB | W: | H:

resource/common/ele12.png
resource/common/ele12.png
resource/common/ele12.png
resource/common/ele12.png
  • 2-up
  • Swipe
  • Onion skin
resource/playScene/brownBallFace.png

6.15 KB | W: | H:

resource/playScene/brownBallFace.png

8.05 KB | W: | H:

resource/playScene/brownBallFace.png
resource/playScene/brownBallFace.png
resource/playScene/brownBallFace.png
resource/playScene/brownBallFace.png
  • 2-up
  • Swipe
  • Onion skin
resource/playScene/eggPiece1.png

1.08 KB | W: | H:

resource/playScene/eggPiece1.png

1.33 KB | W: | H:

resource/playScene/eggPiece1.png
resource/playScene/eggPiece1.png
resource/playScene/eggPiece1.png
resource/playScene/eggPiece1.png
  • 2-up
  • Swipe
  • Onion skin
resource/playScene/eggPiece2.png

1.08 KB | W: | H:

resource/playScene/eggPiece2.png

1.39 KB | W: | H:

resource/playScene/eggPiece2.png
resource/playScene/eggPiece2.png
resource/playScene/eggPiece2.png
resource/playScene/eggPiece2.png
  • 2-up
  • Swipe
  • Onion skin
resource/playScene/eggPiece3.png

1.67 KB | W: | H:

resource/playScene/eggPiece3.png

2.52 KB | W: | H:

resource/playScene/eggPiece3.png
resource/playScene/eggPiece3.png
resource/playScene/eggPiece3.png
resource/playScene/eggPiece3.png
  • 2-up
  • Swipe
  • Onion skin
resource/playScene/eggPiece4.png

1.1 KB | W: | H:

resource/playScene/eggPiece4.png

1.41 KB | W: | H:

resource/playScene/eggPiece4.png
resource/playScene/eggPiece4.png
resource/playScene/eggPiece4.png
resource/playScene/eggPiece4.png
  • 2-up
  • Swipe
  • Onion skin
resource/playScene/eggPiece5.png

1.4 KB | W: | H:

resource/playScene/eggPiece5.png

1.9 KB | W: | H:

resource/playScene/eggPiece5.png
resource/playScene/eggPiece5.png
resource/playScene/eggPiece5.png
resource/playScene/eggPiece5.png
  • 2-up
  • Swipe
  • Onion skin
resource/playScene/eyeDownLeft.png

1.08 KB | W: | H:

resource/playScene/eyeDownLeft.png

1.72 KB | W: | H:

resource/playScene/eyeDownLeft.png
resource/playScene/eyeDownLeft.png
resource/playScene/eyeDownLeft.png
resource/playScene/eyeDownLeft.png
  • 2-up
  • Swipe
  • Onion skin
resource/playScene/eyeDownRight.png

1.11 KB | W: | H:

resource/playScene/eyeDownRight.png

1.75 KB | W: | H:

resource/playScene/eyeDownRight.png
resource/playScene/eyeDownRight.png
resource/playScene/eyeDownRight.png
resource/playScene/eyeDownRight.png
  • 2-up
  • Swipe
  • Onion skin
resource/playScene/eyeSingle.png

790 Bytes | W: | H:

resource/playScene/eyeSingle.png

1.31 KB | W: | H:

resource/playScene/eyeSingle.png
resource/playScene/eyeSingle.png
resource/playScene/eyeSingle.png
resource/playScene/eyeSingle.png
  • 2-up
  • Swipe
  • Onion skin
resource/playScene/greenCircleDown.png

7.46 KB | W: | H:

resource/playScene/greenCircleDown.png

5.29 KB | W: | H:

resource/playScene/greenCircleDown.png
resource/playScene/greenCircleDown.png
resource/playScene/greenCircleDown.png
resource/playScene/greenCircleDown.png
  • 2-up
  • Swipe
  • Onion skin
resource/playScene/greenCircleUp.png

8.14 KB | W: | H:

resource/playScene/greenCircleUp.png

5.95 KB | W: | H:

resource/playScene/greenCircleUp.png
resource/playScene/greenCircleUp.png
resource/playScene/greenCircleUp.png
resource/playScene/greenCircleUp.png
  • 2-up
  • Swipe
  • Onion skin
resource/playScene/greyBallFace.png

6.25 KB | W: | H:

resource/playScene/greyBallFace.png

8.7 KB | W: | H:

resource/playScene/greyBallFace.png
resource/playScene/greyBallFace.png
resource/playScene/greyBallFace.png
resource/playScene/greyBallFace.png
  • 2-up
  • Swipe
  • Onion skin
resource/playScene/hairballDisBg.png

1.13 KB | W: | H:

resource/playScene/hairballDisBg.png

2.34 KB | W: | H:

resource/playScene/hairballDisBg.png
resource/playScene/hairballDisBg.png
resource/playScene/hairballDisBg.png
resource/playScene/hairballDisBg.png
  • 2-up
  • Swipe
  • Onion skin
resource/playScene/hairballPiece1.png

708 Bytes | W: | H:

resource/playScene/hairballPiece1.png

1.8 KB | W: | H:

resource/playScene/hairballPiece1.png
resource/playScene/hairballPiece1.png
resource/playScene/hairballPiece1.png
resource/playScene/hairballPiece1.png
  • 2-up
  • Swipe
  • Onion skin
resource/playScene/hairballPiece2.png

837 Bytes | W: | H:

resource/playScene/hairballPiece2.png

1.94 KB | W: | H:

resource/playScene/hairballPiece2.png
resource/playScene/hairballPiece2.png
resource/playScene/hairballPiece2.png
resource/playScene/hairballPiece2.png
  • 2-up
  • Swipe
  • Onion skin
resource/playScene/hairballPiece3.png

943 Bytes | W: | H:

resource/playScene/hairballPiece3.png

1.69 KB | W: | H:

resource/playScene/hairballPiece3.png
resource/playScene/hairballPiece3.png
resource/playScene/hairballPiece3.png
resource/playScene/hairballPiece3.png
  • 2-up
  • Swipe
  • Onion skin
resource/playScene/hairballPiece4.png

1.01 KB | W: | H:

resource/playScene/hairballPiece4.png

1.69 KB | W: | H:

resource/playScene/hairballPiece4.png
resource/playScene/hairballPiece4.png
resource/playScene/hairballPiece4.png
resource/playScene/hairballPiece4.png
  • 2-up
  • Swipe
  • Onion skin
resource/playScene/hairballPiece5.png

1.2 KB | W: | H:

resource/playScene/hairballPiece5.png

1.08 KB | W: | H:

resource/playScene/hairballPiece5.png
resource/playScene/hairballPiece5.png
resource/playScene/hairballPiece5.png
resource/playScene/hairballPiece5.png
  • 2-up
  • Swipe
  • Onion skin
resource/playScene/hairballPiece6.png

1.1 KB | W: | H:

resource/playScene/hairballPiece6.png

1.76 KB | W: | H:

resource/playScene/hairballPiece6.png
resource/playScene/hairballPiece6.png
resource/playScene/hairballPiece6.png
resource/playScene/hairballPiece6.png
  • 2-up
  • Swipe
  • Onion skin
resource/playScene/hairballPiece7.png

1.38 KB | W: | H:

resource/playScene/hairballPiece7.png

1.61 KB | W: | H:

resource/playScene/hairballPiece7.png
resource/playScene/hairballPiece7.png
resource/playScene/hairballPiece7.png
resource/playScene/hairballPiece7.png
  • 2-up
  • Swipe
  • Onion skin
resource/playScene/hairballPiece8.png

1.14 KB | W: | H:

resource/playScene/hairballPiece8.png

2.14 KB | W: | H:

resource/playScene/hairballPiece8.png
resource/playScene/hairballPiece8.png
resource/playScene/hairballPiece8.png
resource/playScene/hairballPiece8.png
  • 2-up
  • Swipe
  • Onion skin
resource/playScene/hairballPiece9.png

922 Bytes | W: | H:

resource/playScene/hairballPiece9.png

2 KB | W: | H:

resource/playScene/hairballPiece9.png
resource/playScene/hairballPiece9.png
resource/playScene/hairballPiece9.png
resource/playScene/hairballPiece9.png
  • 2-up
  • Swipe
  • Onion skin
resource/playScene/jellyArrow.png

2.46 KB | W: | H:

resource/playScene/jellyArrow.png

1.86 KB | W: | H:

resource/playScene/jellyArrow.png
resource/playScene/jellyArrow.png
resource/playScene/jellyArrow.png
resource/playScene/jellyArrow.png
  • 2-up
  • Swipe
  • Onion skin
resource/playScene/main_mapbottom.png

2.8 KB | W: | H:

resource/playScene/main_mapbottom.png

2.51 KB | W: | H:

resource/playScene/main_mapbottom.png
resource/playScene/main_mapbottom.png
resource/playScene/main_mapbottom.png
resource/playScene/main_mapbottom.png
  • 2-up
  • Swipe
  • Onion skin
resource/playScene/table.png

147 KB | W: | H:

resource/playScene/table.png

57.8 KB | W: | H:

resource/playScene/table.png
resource/playScene/table.png
resource/playScene/table.png
resource/playScene/table.png
  • 2-up
  • Swipe
  • Onion skin
resource/playScene/yellowCircleDown.png

5.93 KB | W: | H:

resource/playScene/yellowCircleDown.png

5.37 KB | W: | H:

resource/playScene/yellowCircleDown.png
resource/playScene/yellowCircleDown.png
resource/playScene/yellowCircleDown.png
resource/playScene/yellowCircleDown.png
  • 2-up
  • Swipe
  • Onion skin
resource/playScene/yellowCircleUp.png

6.62 KB | W: | H:

resource/playScene/yellowCircleUp.png

7.12 KB | W: | H:

resource/playScene/yellowCircleUp.png
resource/playScene/yellowCircleUp.png
resource/playScene/yellowCircleUp.png
resource/playScene/yellowCircleUp.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -9,7 +9,7 @@
"name": "BuyPowerPanel"
},
{
"keys": "comCloseBtn.png,star.png,toastBg.png,waitingBg.png,waitingRot.png,关闭按钮.png,再想想.png,动物.png,开始闯关要能量.png,确定.png,继续闯关大.png,继续闯关小.png",
"keys": "comCloseBtn.png,ele0.png,ele1.png,ele10.png,ele11.png,ele12.png,ele13.png,ele14.png,ele2.png,ele3.png,ele4.png,ele5.png,ele6.png,ele7.png,ele8.png,ele9.png,star.png,toastBg.png,waitingBg.png,waitingRot.png,关闭按钮.png,再想想.png,动物.png,开始闯关要能量.png,确定.png,继续闯关大.png,继续闯关小.png",
"name": "common"
},
{
......@@ -49,7 +49,7 @@
"name": "NoStepBtn"
},
{
"keys": "blueDoorBg.png,bonusFra0.png,bonusFra1.png,bonusFra10.png,bonusFra11.png,bonusFra2.png,bonusFra3.png,bonusFra4.png,bonusFra5.png,bonusFra6.png,bonusFra7.png,bonusFra8.png,bonusFra9.png,bonusShoot.png,boom0.png,boom1.png,boom10.png,boom11.png,boom12.png,boom13.png,boom14.png,boom15.png,boom16.png,boom17.png,boom18.png,boom19.png,boom2.png,boom20.png,boom3.png,boom4.png,boom5.png,boom6.png,boom7.png,boom8.png,boom9.png,boomBtn.png,brownBallFace.png,bubbleStar1.png,bubbleStar10.png,bubbleStar11.png,bubbleStar12.png,bubbleStar13.png,bubbleStar14.png,bubbleStar15.png,bubbleStar16.png,bubbleStar17.png,bubbleStar18.png,bubbleStar19.png,bubbleStar2.png,bubbleStar3.png,bubbleStar4.png,bubbleStar5.png,bubbleStar6.png,bubbleStar7.png,bubbleStar8.png,bubbleStar9.png,chooseRect.png,doorClosed.png,doorOpen.png,eggPiece1.png,eggPiece2.png,eggPiece3.png,eggPiece4.png,eggPiece5.png,eggStatus0.png,eggStatus1.png,eggStatus2.png,ele0.png,ele0Exp.png,ele1.png,ele10.png,ele11.png,ele12.png,ele13.png,ele14.png,ele1Exp.png,ele2.png,ele2Exp.png,ele3.png,ele3Exp.png,ele4.png,ele4Exp.png,ele5.png,ele6.png,ele7.png,ele8.png,ele9.png,exLighting0.png,exLighting10.png,exLighting13.png,exLighting15.png,exLighting17.png,exLighting18.png,exLighting2.png,exLighting20.png,exLighting22.png,exLighting24.png,exLighting26.png,exLighting28.png,exLighting31.png,exLighting33.png,exLighting4.png,exLighting6.png,exLighting8.png,eyeDownLeft.png,eyeDownRight.png,eyeSingle.png,greenCircleDown.png,greenCircleUp.png,greyBallFace.png,guidePropBoom.png,guidePropCow.png,guidePropHammer.png,guidePropHand.png,guidePropMsgPanel.png,guidePropShoe.png,hairballDisBg.png,hairballPiece1.png,hairballPiece10.png,hairballPiece11.png,hairballPiece2.png,hairballPiece3.png,hairballPiece4.png,hairballPiece5.png,hairballPiece6.png,hairballPiece7.png,hairballPiece8.png,hairballPiece9.png,hammerBtn.png,ice2.png,ice3.png,ice4.png,ice5.png,ice6.png,jellyArrow.png,leftArrow.png,lightedStar.png,lineLight.png,lockVine.png,magicLion.png,magicLionBg.png,main_mapbottom.png,playBg.jpg,propNum0.png,propNum1.png,propNum2.png,propNum3.png,propNum4.png,propNum5.png,propNum6.png,propNum7.png,propNum8.png,propNum9.png,rectLat.png,rectLatWhite.png,redDoorBg.png,redNum0.png,redNum1.png,redNum2.png,redNum3.png,redNum4.png,redNum5.png,redNum6.png,redNum7.png,redNum8.png,redNum9.png,redNum关.png,redNum冒号.png,redNum分.png,redNum数.png,redNum第.png,redNum通.png,rightArrow.png,rightMark.png,rock2.png,rock3.png,rock4.png,rock5.png,rock6.png,starProgress.png,stepAni1.png,stepAni10.png,stepAni11.png,stepAni2.png,stepAni3.png,stepAni4.png,stepAni5.png,stepAni6.png,stepAni7.png,stepAni8.png,stepAni9.png,stepBtn.png,table.png,topBg.png,unlightedStar.png,yellowCircleDown.png,yellowCircleUp.png,yellowDoorBg.png",
"keys": "blueDoorBg.png,bonusFra0.png,bonusFra1.png,bonusFra10.png,bonusFra11.png,bonusFra2.png,bonusFra3.png,bonusFra4.png,bonusFra5.png,bonusFra6.png,bonusFra7.png,bonusFra8.png,bonusFra9.png,bonusShoot.png,boom0.png,boom1.png,boom10.png,boom11.png,boom12.png,boom13.png,boom14.png,boom15.png,boom16.png,boom17.png,boom18.png,boom19.png,boom2.png,boom20.png,boom3.png,boom4.png,boom5.png,boom6.png,boom7.png,boom8.png,boom9.png,boomBtn.png,brownBallFace.png,bubbleStar1.png,bubbleStar10.png,bubbleStar11.png,bubbleStar12.png,bubbleStar13.png,bubbleStar14.png,bubbleStar15.png,bubbleStar16.png,bubbleStar17.png,bubbleStar18.png,bubbleStar19.png,bubbleStar2.png,bubbleStar3.png,bubbleStar4.png,bubbleStar5.png,bubbleStar6.png,bubbleStar7.png,bubbleStar8.png,bubbleStar9.png,bubleEle0.png,bubleEle1.png,bubleEle2.png,bubleEle3.png,bubleEle4.png,chapterNum0.png,chapterNum1.png,chapterNum2.png,chapterNum3.png,chapterNum4.png,chapterNum5.png,chapterNum6.png,chapterNum7.png,chapterNum8.png,chapterNum9.png,chapterNum关.png,chapterNum第.png,chooseRect.png,doorClosed.png,doorOpen.png,eggPiece1.png,eggPiece2.png,eggPiece3.png,eggPiece4.png,eggPiece5.png,eggStatus0.png,eggStatus1.png,eggStatus2.png,ele0Exp.png,ele1Exp.png,ele2Exp.png,ele3Exp.png,ele4Exp.png,exLighting0.png,exLighting10.png,exLighting13.png,exLighting15.png,exLighting17.png,exLighting18.png,exLighting2.png,exLighting20.png,exLighting22.png,exLighting24.png,exLighting26.png,exLighting28.png,exLighting31.png,exLighting33.png,exLighting4.png,exLighting6.png,exLighting8.png,eyeDownLeft.png,eyeDownRight.png,eyeSingle.png,greenCircleDown.png,greenCircleUp.png,greyBallFace.png,guidePropBoom.png,guidePropCow.png,guidePropHammer.png,guidePropHand.png,guidePropMsgPanel.png,guidePropShoe.png,hairballDisBg.png,hairballPiece1.png,hairballPiece2.png,hairballPiece3.png,hairballPiece4.png,hairballPiece5.png,hairballPiece6.png,hairballPiece7.png,hairballPiece8.png,hairballPiece9.png,hammerBtn.png,ice2.png,ice3.png,ice4.png,ice5.png,ice6.png,jellyArrow.png,leftArrow.png,lightedStar.png,lineLight.png,lockVine.png,magicLion.png,magicLionBg.png,main_mapbottom.png,musicOff.png,musicOn.png,playBg.jpg,propNum0.png,propNum1.png,propNum2.png,propNum3.png,propNum4.png,propNum5.png,propNum6.png,propNum7.png,propNum8.png,propNum9.png,rectLat.png,rectLatWhite.png,redDoorBg.png,rightArrow.png,rightMark.png,rock2.png,rock3.png,rock4.png,rock5.png,rock6.png,scoreNum0.png,scoreNum1.png,scoreNum2.png,scoreNum3.png,scoreNum4.png,scoreNum5.png,scoreNum6.png,scoreNum7.png,scoreNum8.png,scoreNum9.png,scoreNum关.png,scoreNum冒号.png,scoreNum分.png,scoreNum数.png,scoreNum通.png,settingBtn.png,starProgress.png,stepAni1.png,stepAni10.png,stepAni11.png,stepAni2.png,stepAni3.png,stepAni4.png,stepAni5.png,stepAni6.png,stepAni7.png,stepAni8.png,stepAni9.png,stepBtn.png,stepNum0.png,stepNum1.png,stepNum2.png,stepNum3.png,stepNum4.png,stepNum5.png,stepNum6.png,stepNum7.png,stepNum8.png,stepNum9.png,table.png,topBg.png,unlightedStar.png,yellowCircleDown.png,yellowCircleUp.png,yellowDoorBg.png",
"name": "playScene"
},
{
......
......@@ -78,8 +78,8 @@ export class Main {
//隐藏加载中
// if (document.getElementById("__loading__")) document.getElementById("__loading__").style.display = "none";
//打开开始场景
// changeScene(MapScene);
changeScene(PlayScene);
changeScene(MapScene);
// changeScene(PlayScene);
// changeScene(SStartScene);
// changeScene(StoryScene);
// changeScene(AdoptScene);
......
......@@ -9,7 +9,7 @@ export const ResJson = {
"name": "BuyPowerPanel"
},
{
"keys": "comCloseBtn.png,star.png,toastBg.png,waitingBg.png,waitingRot.png,关闭按钮.png,再想想.png,动物.png,开始闯关要能量.png,确定.png,继续闯关大.png,继续闯关小.png",
"keys": "comCloseBtn.png,ele0.png,ele1.png,ele10.png,ele11.png,ele12.png,ele13.png,ele14.png,ele2.png,ele3.png,ele4.png,ele5.png,ele6.png,ele7.png,ele8.png,ele9.png,star.png,toastBg.png,waitingBg.png,waitingRot.png,关闭按钮.png,再想想.png,动物.png,开始闯关要能量.png,确定.png,继续闯关大.png,继续闯关小.png",
"name": "common"
},
{
......@@ -49,7 +49,7 @@ export const ResJson = {
"name": "NoStepBtn"
},
{
"keys": "blueDoorBg.png,bonusFra0.png,bonusFra1.png,bonusFra10.png,bonusFra11.png,bonusFra2.png,bonusFra3.png,bonusFra4.png,bonusFra5.png,bonusFra6.png,bonusFra7.png,bonusFra8.png,bonusFra9.png,bonusShoot.png,boom0.png,boom1.png,boom10.png,boom11.png,boom12.png,boom13.png,boom14.png,boom15.png,boom16.png,boom17.png,boom18.png,boom19.png,boom2.png,boom20.png,boom3.png,boom4.png,boom5.png,boom6.png,boom7.png,boom8.png,boom9.png,boomBtn.png,brownBallFace.png,bubbleStar1.png,bubbleStar10.png,bubbleStar11.png,bubbleStar12.png,bubbleStar13.png,bubbleStar14.png,bubbleStar15.png,bubbleStar16.png,bubbleStar17.png,bubbleStar18.png,bubbleStar19.png,bubbleStar2.png,bubbleStar3.png,bubbleStar4.png,bubbleStar5.png,bubbleStar6.png,bubbleStar7.png,bubbleStar8.png,bubbleStar9.png,chooseRect.png,doorClosed.png,doorOpen.png,eggPiece1.png,eggPiece2.png,eggPiece3.png,eggPiece4.png,eggPiece5.png,eggStatus0.png,eggStatus1.png,eggStatus2.png,ele0.png,ele0Exp.png,ele1.png,ele10.png,ele11.png,ele12.png,ele13.png,ele14.png,ele1Exp.png,ele2.png,ele2Exp.png,ele3.png,ele3Exp.png,ele4.png,ele4Exp.png,ele5.png,ele6.png,ele7.png,ele8.png,ele9.png,exLighting0.png,exLighting10.png,exLighting13.png,exLighting15.png,exLighting17.png,exLighting18.png,exLighting2.png,exLighting20.png,exLighting22.png,exLighting24.png,exLighting26.png,exLighting28.png,exLighting31.png,exLighting33.png,exLighting4.png,exLighting6.png,exLighting8.png,eyeDownLeft.png,eyeDownRight.png,eyeSingle.png,greenCircleDown.png,greenCircleUp.png,greyBallFace.png,guidePropBoom.png,guidePropCow.png,guidePropHammer.png,guidePropHand.png,guidePropMsgPanel.png,guidePropShoe.png,hairballDisBg.png,hairballPiece1.png,hairballPiece10.png,hairballPiece11.png,hairballPiece2.png,hairballPiece3.png,hairballPiece4.png,hairballPiece5.png,hairballPiece6.png,hairballPiece7.png,hairballPiece8.png,hairballPiece9.png,hammerBtn.png,ice2.png,ice3.png,ice4.png,ice5.png,ice6.png,jellyArrow.png,leftArrow.png,lightedStar.png,lineLight.png,lockVine.png,magicLion.png,magicLionBg.png,main_mapbottom.png,playBg.jpg,propNum0.png,propNum1.png,propNum2.png,propNum3.png,propNum4.png,propNum5.png,propNum6.png,propNum7.png,propNum8.png,propNum9.png,rectLat.png,rectLatWhite.png,redDoorBg.png,redNum0.png,redNum1.png,redNum2.png,redNum3.png,redNum4.png,redNum5.png,redNum6.png,redNum7.png,redNum8.png,redNum9.png,redNum关.png,redNum冒号.png,redNum分.png,redNum数.png,redNum第.png,redNum通.png,rightArrow.png,rightMark.png,rock2.png,rock3.png,rock4.png,rock5.png,rock6.png,starProgress.png,stepAni1.png,stepAni10.png,stepAni11.png,stepAni2.png,stepAni3.png,stepAni4.png,stepAni5.png,stepAni6.png,stepAni7.png,stepAni8.png,stepAni9.png,stepBtn.png,table.png,topBg.png,unlightedStar.png,yellowCircleDown.png,yellowCircleUp.png,yellowDoorBg.png",
"keys": "blueDoorBg.png,bonusFra0.png,bonusFra1.png,bonusFra10.png,bonusFra11.png,bonusFra2.png,bonusFra3.png,bonusFra4.png,bonusFra5.png,bonusFra6.png,bonusFra7.png,bonusFra8.png,bonusFra9.png,bonusShoot.png,boom0.png,boom1.png,boom10.png,boom11.png,boom12.png,boom13.png,boom14.png,boom15.png,boom16.png,boom17.png,boom18.png,boom19.png,boom2.png,boom20.png,boom3.png,boom4.png,boom5.png,boom6.png,boom7.png,boom8.png,boom9.png,boomBtn.png,brownBallFace.png,bubbleStar1.png,bubbleStar10.png,bubbleStar11.png,bubbleStar12.png,bubbleStar13.png,bubbleStar14.png,bubbleStar15.png,bubbleStar16.png,bubbleStar17.png,bubbleStar18.png,bubbleStar19.png,bubbleStar2.png,bubbleStar3.png,bubbleStar4.png,bubbleStar5.png,bubbleStar6.png,bubbleStar7.png,bubbleStar8.png,bubbleStar9.png,bubleEle0.png,bubleEle1.png,bubleEle2.png,bubleEle3.png,bubleEle4.png,chapterNum0.png,chapterNum1.png,chapterNum2.png,chapterNum3.png,chapterNum4.png,chapterNum5.png,chapterNum6.png,chapterNum7.png,chapterNum8.png,chapterNum9.png,chapterNum关.png,chapterNum第.png,chooseRect.png,doorClosed.png,doorOpen.png,eggPiece1.png,eggPiece2.png,eggPiece3.png,eggPiece4.png,eggPiece5.png,eggStatus0.png,eggStatus1.png,eggStatus2.png,ele0Exp.png,ele1Exp.png,ele2Exp.png,ele3Exp.png,ele4Exp.png,exLighting0.png,exLighting10.png,exLighting13.png,exLighting15.png,exLighting17.png,exLighting18.png,exLighting2.png,exLighting20.png,exLighting22.png,exLighting24.png,exLighting26.png,exLighting28.png,exLighting31.png,exLighting33.png,exLighting4.png,exLighting6.png,exLighting8.png,eyeDownLeft.png,eyeDownRight.png,eyeSingle.png,greenCircleDown.png,greenCircleUp.png,greyBallFace.png,guidePropBoom.png,guidePropCow.png,guidePropHammer.png,guidePropHand.png,guidePropMsgPanel.png,guidePropShoe.png,hairballDisBg.png,hairballPiece1.png,hairballPiece2.png,hairballPiece3.png,hairballPiece4.png,hairballPiece5.png,hairballPiece6.png,hairballPiece7.png,hairballPiece8.png,hairballPiece9.png,hammerBtn.png,ice2.png,ice3.png,ice4.png,ice5.png,ice6.png,jellyArrow.png,leftArrow.png,lightedStar.png,lineLight.png,lockVine.png,magicLion.png,magicLionBg.png,main_mapbottom.png,musicOff.png,musicOn.png,playBg.jpg,propNum0.png,propNum1.png,propNum2.png,propNum3.png,propNum4.png,propNum5.png,propNum6.png,propNum7.png,propNum8.png,propNum9.png,rectLat.png,rectLatWhite.png,redDoorBg.png,rightArrow.png,rightMark.png,rock2.png,rock3.png,rock4.png,rock5.png,rock6.png,scoreNum0.png,scoreNum1.png,scoreNum2.png,scoreNum3.png,scoreNum4.png,scoreNum5.png,scoreNum6.png,scoreNum7.png,scoreNum8.png,scoreNum9.png,scoreNum关.png,scoreNum冒号.png,scoreNum分.png,scoreNum数.png,scoreNum通.png,settingBtn.png,starProgress.png,stepAni1.png,stepAni10.png,stepAni11.png,stepAni2.png,stepAni3.png,stepAni4.png,stepAni5.png,stepAni6.png,stepAni7.png,stepAni8.png,stepAni9.png,stepBtn.png,stepNum0.png,stepNum1.png,stepNum2.png,stepNum3.png,stepNum4.png,stepNum5.png,stepNum6.png,stepNum7.png,stepNum8.png,stepNum9.png,table.png,topBg.png,unlightedStar.png,yellowCircleDown.png,yellowCircleUp.png,yellowDoorBg.png",
"name": "playScene"
},
{
......
......@@ -220,4 +220,14 @@ export class Tools {
target.mouseChildren = true;
}, delay);
}
/**
* 根据名字获取0到9的贴图
* @param name
*/
public static getNumTextures(name: string): { [key: number]: FYGE.Texture } {
var arr = {}
for (var i = 0; i <= 9; i++)arr[i] = RES.getRes(name + i + ".png")
return arr
}
}
......@@ -219,7 +219,7 @@ export class PlayScene extends Scene {
//道具使用引导
propGuide: PropGuide;
//步数道具引导时的圆
stepCircle: FYGE.Shape;
stepCircle: FYGE.Graphics//Shape;
//bonus Time 提示
bonusTime: BonusTime;
//游戏操作引导
......@@ -243,18 +243,18 @@ export class PlayScene extends Scene {
this.addChild(FYGE.Sprite.fromFrame("topBg.png")).position.set(0, 10);
var commonTextArr = {};
for (var i = 0; i < 10; i++)commonTextArr[i] = RES.getRes("redNum" + i + ".png");
["第", "关", "分", "数"].forEach((e) => { commonTextArr[e] = RES.getRes("redNum" + e + ".png"); })
commonTextArr[":"] = RES.getRes("redNum冒号.png");
for (var i = 0; i < 10; i++)commonTextArr[i] = RES.getRes("scoreNum" + i + ".png");
["通", "关", "分", "数"].forEach((e) => { commonTextArr[e] = RES.getRes("scoreNum" + e + ".png"); })
commonTextArr[":"] = RES.getRes("scoreNum冒号.png");
//通关目标分数
this.targetScoreTxt = this.addChild(new FYGE.BitmapText(commonTextArr));
this.targetScoreTxt.position.set(375, 188);
this.targetScoreTxt.scale.set(0.8, 0.8);
// this.targetScoreTxt.text = "通关分数:1000"
// console.log(this.targetScoreTxt)
this.targetScoreTxt.position.set(375, 193);
//设置,待定
this.addChild(FYGE.Sprite.fromFrame("settingBtn.png")).position.set(618, 16)
}
start(data: { chapter: number }) {
super.start();
data = { chapter: 1 }
//第几关
this.chapter = (data && data.chapter) ? data.chapter : 1;
// this.chapter = 24;
......@@ -265,23 +265,6 @@ export class PlayScene extends Scene {
//初始化索引信息,包括10*10的,
Tool.init(Tool.getColOddEven(this.chapterData.map.lattices), !!(this.passElements && this.passElements[ElementType.LOLLIPOP]));
this.initScene();
//修改道具数量,
// if (data.boom) {
// NetManager.ins.hc_useProp(() => { }, PropType.BOOMS, data.boom);
// this.propBtnCon.boomBtn.propNumShow.count += data.boom
// }
// this.propBtnCon.boomBtn.propNumShow.count += data.videoProp[0];
// if (data.hammer) {
// setTimeout(() => { NetManager.ins.hc_useProp(() => { }, PropType.HAMMERS, data.hammer) }, 500);
// this.propBtnCon.hammerBtn.propNumShow.count += data.hammer
// }
// this.propBtnCon.hammerBtn.propNumShow.count += data.videoProp[1];
// if (data.step) {
// setTimeout(() => { NetManager.ins.hc_useProp(() => { }, PropType.STEPS, data.step) }, 1000);
// this.propBtnCon.stepBtn.propNumShow.count += data.step
// }
// this.propBtnCon.stepBtn.propNumShow.count += data.videoProp[2];
//先禁掉事件
this.enableMouseEvt(false);
......@@ -356,16 +339,14 @@ export class PlayScene extends Scene {
initScene() {
//第几关
var chapterTxt = new FYGE.BitmapText({});//TODO文本
chapterTxt.text = "" + (this.chapter >> 0);
chapterTxt.x = 122;
chapterTxt.y = 148
this.addChild(chapterTxt)
var chapterTex = Tools.getNumTextures("chapterNum");
["第", "关"].forEach((e) => { chapterTex[e] = RES.getRes("chapterNum" + e + ".png") })
var chapterTxt = this.addChild(new FYGE.BitmapText(chapterTex));
chapterTxt.text = "第" + (this.chapter >> 0) + "关";
chapterTxt.position.set(535, 58);
//步数
this.stepNumber = new FYGE.BitmapText({});//TODO文本
this.stepNumber.x = 123;
this.stepNumber.y = 85;
this.addChild(this.stepNumber);
this.stepNumber = this.addChild(new FYGE.BitmapText(Tools.getNumTextures("stepNum")));
this.stepNumber.position.set(375, 20);
//步数初始化
this.steps = this.chapterData.stepCount;
//分数进度条,托管
......@@ -393,7 +374,6 @@ export class PlayScene extends Scene {
//初始换道具容器
this.propBtnCon = new PropBtnCon();
this.propBtnCon.y = 238 + Tool.gameAreaHeight + 10;
this.addChild(this.propBtnCon);
//按钮的事件
this.propBtnCon.boomBtn.addEventListener(FYGE.MouseEvent.CLICK, this.onTap_boomBtn, this)
......@@ -406,12 +386,12 @@ export class PlayScene extends Scene {
this.choosed = new FYGE.Sprite(textureChoosed);
this.choosed.anchorTexture.set(0.5, 0.5)
//道具使用时蒙层 无需加入场景,带入propBtnCo的位置数据
this.propGuide = new PropGuide(this.propBtnCon.y);
this.propGuide = new PropGuide(this.propBtnCon.y - 10);
// this.addChild(this.propGuide);
//bonusTime引导,备用的,无需加入场景
this.bonusTime = new BonusTime();
this.bonusTime.x = 375
this.bonusTime.y = 1624 / 2-layers.stageOffsetY;
this.bonusTime.y = 1624 / 2 - layers.stageOffsetY;
}
initTarget() {
//通关目标,如果通关目标是元素时,赋值this.passElements,否则
......@@ -982,13 +962,14 @@ export class PlayScene extends Scene {
}, this);
} else {
if (!this.stepCircle) {
this.stepCircle = new FYGE.Shape();
this.stepCircle.beginFill(0xff0000, 0.5);
this.stepCircle.drawCircle(123, 98, 72);
this.stepCircle.endFill();
this.stepCircle.addEventListener(FYGE.MouseEvent.CLICK, () => {
this.stepCircle = new FYGE.Graphics()
.beginFill(0xff0000)
.drawCircle(stepPosition[0], stepPosition[1], 55)
.endFill()
.addEventListener(FYGE.MouseEvent.CLICK, () => {
this.sendPropUse(PropType.STEPS)
}, this)
this.stepCircle.alpha = 0;
}
this.addChild(this.stepCircle)
//如果点击引导取消使用
......@@ -1054,7 +1035,7 @@ export class PlayScene extends Scene {
this.isMouseAction = true;
break;
case PropType.STEPS:
this.playAni(RecoverName.STEP_ANI, [50, 100]);
this.playAni(RecoverName.STEP_ANI, [stepPosition[0] - 40, stepPosition[1] + 20]);
setTimeout(() => {
this.steps += 5;
}, 333)
......@@ -2453,9 +2434,7 @@ export class PlayScene extends Scene {
//分数
this.score += 1000;
this.addChild(bonusShootAni);
//算角度
var r = Tool.getForwardRotation(stepPosition, [ele.x, ele.y])
bonusShootAni.play(r * 180 / Math.PI, [ele.x, ele.y], () => {
bonusShootAni.play([ele.x, ele.y], () => {
ele.effectType = Math.random() > 0.5 ? EffectType.HORIZONTAL : EffectType.VERTICAL;
//去掉所有状态
ele.removeAllState();
......@@ -2741,9 +2720,10 @@ export class PlayScene extends Scene {
if (this.passElements[type] != undefined) {
if (this.passElements[type] != 0) {
this.passElements[type]--;
// console.log(this.elementTargets.targets[type])
//@ts-ignore
var p = this.elementTargets.targets[type].localToGlobal({ x: 40 * 0.8, y: 40 * 0.8 })
this.addChild(FlyTargetAni(type, fromP, [p.x, p.y], () => {
this.addChild(FlyTargetAni(type, fromP, [p.x, p.y - layers.stageOffsetY], () => {
this.elementTargets.targets[type].count--;
}))
}
......
......@@ -2,9 +2,10 @@
import { Pool } from "../Pool";
import { RecoverName } from "../enum/RecoverName";
import { RES } from "../../../module/RES";
import { Tool } from "../Tool";
export const stepPosition: number[] = [125, 115];
export const stepPosition: number[] = [375, 60];
/**
* 需要回调的
* 手动修改this.shoot.rotation=
......@@ -34,9 +35,9 @@ export class BonusShootAni extends FYGE.Container {
this.y = stepPosition[1];
}
play(rotation: number, p: number[], callback: Function) {
play(p: number[], callback: Function) {
this.reset()
this.shoot.rotation = rotation;
this.shoot.rotation = Tool.getForwardRotation(stepPosition, p) * 180 / Math.PI;
FYGE.Tween.get(this)
.to({ x: p[0], y: p[1] }, 300)
.call(() => {
......@@ -44,7 +45,7 @@ export class BonusShootAni extends FYGE.Container {
// playSound(SoundType.bonusShoot)
this.shoot.visible = false;
this.imageAni.visible = true;
this.imageAni.play(1,() => {
this.imageAni.play(1, () => {
if (this.parent) {
this.parent.removeChild(this)
};
......
......@@ -6,8 +6,8 @@ import { ElementType } from "../enum/ElementType";
import { RES } from "../../../module/RES";
//位置信息暂时都统一,因为现在所有基础5种元素的长宽都是90,如果以后基础元素图修改
const baseEleWidth = 90;
const baseEleHeight = 90;
const baseEleWidth = 80//90;
const baseEleHeight = 80//90;
//动画时间
const time = 300;
......
......@@ -23,7 +23,7 @@ export function FlyTargetAni(
eleC.x = fromP[0];
eleC.y = fromP[1];
FYGE.Tween.get(eleC)
.to({ x: targetP[0], y: targetP[1], scaleX: 0.3, scaleY: 0.3 }, 500 + (Math.random() * 100) >> 0)
.to({ x: targetP[0], y: targetP[1], scaleX: 0.7, scaleY: 0.7 }, 500 + (Math.random() * 100) >> 0)
.call(() => {
//回收
if (eleC.parent) {
......
......@@ -4,8 +4,8 @@ import { Tool } from "../Tool";
import { RES } from "../../../module/RES";
const offsetX = 71 / 2;
const offsetY = 62 / 2;
const offsetX = 80 / 2;
const offsetY = 80 / 2;
/**
* 分裂的动画,待写
......@@ -38,8 +38,8 @@ export class HairballBrownDivideAni extends FYGE.Container {
}
play(startP: number[], endP: number[], callback: Function) {
this.reset();
var oriEyeX = 10.99;
var oriEyeY = 24.66;
var oriEyeX = 23;
var oriEyeY = 33;
//判断上下左右,
var obj = { x: -offsetX, y: -offsetY };//整体的位置跳动
var eyeObj = { x: oriEyeX, y: oriEyeY };//眼睛的移动
......@@ -142,13 +142,14 @@ class Hairball extends FYGE.Container {
this.greyFace = new FYGE.Sprite(RES.getRes("greyBallFace.png"));
this.addChild(this.greyFace);
this.eyesDown = new EyesDown();
this.eyesDown.x = 10;
this.eyesDown.y = 32.66;
this.eyesDown.x = 16;
this.eyesDown.y = 29 + 29 / 2;
this.addChild(this.eyesDown);
this.eyes = new Eyes();
this.eyes.x = 10.99;
this.eyes.y = 24.66;
this.eyes.x = 23;
this.eyes.y = 33;
this.addChild(this.eyes);
}
}
......@@ -164,7 +165,7 @@ class Eyes extends FYGE.Container {
this.left = new FYGE.Sprite(texture);
this.addChild(this.left);
this.right = new FYGE.Sprite(texture);
this.right.x = 27.85;
this.right.x = 23;
this.addChild(this.right)
}
}
......@@ -178,11 +179,11 @@ class EyesDown extends FYGE.Container {
constructor() {
super();
this.left = new FYGE.Sprite(RES.getRes("eyeDownLeft.png"));
this.left.y = -10;
this.left.y = -29 / 2;
this.addChild(this.left);
this.right = new FYGE.Sprite(RES.getRes("eyeDownRight.png"));
this.right.x = 27.51;
this.right.y = -10;
this.right.x = 45 - 16;
this.right.y = -29 / 2;
this.addChild(this.right)
}
}
......
import { Ani } from "../class/Ani";
import { RES } from "../../../module/RES";
import { RecoverName } from "../enum/RecoverName";
const offsetX = 71 / 2;
const offsetY = 62 / 2;
/**
* 碎片位置参数
*/
const config = [
{
"name": "hairballPiece1",
"x": 5,
"y": 46,
"width": 33,
"height": 15
},
{
"name": "hairballPiece2",
"x": 32,
"y": 41,
"width": 36,
"height": 21
},
{
"name": "hairballPiece3",
"x": 0,
"y": 37,
"width": 36,
"height": 21
},
{
"name": "hairballPiece4",
"x": 30,
"y": 26,
"width": 41,
"height": 31
},
{
"name": "hairballPiece5",
"x": 1,
"y": 32,
"width": 42,
"height": 17
},
{
"name": "hairballPiece6",
"x": 33,
"y": 30,
"width": 34,
"height": 17
},
{
"name": "hairballPiece7",
"x": 1,
"y": 23,
"width": 47,
"height": 15
},
{
"name": "hairballPiece8",
"x": 33,
"y": 20,
"width": 38,
"height": 14
},
{
"name": "hairballPiece9",
"x": 2,
"y": 16,
"width": 41,
"height": 11
},
{
"name": "hairballPiece10",
"x": 31,
"y": 13,
"width": 39,
"height": 10
},
{
"name": "hairballPiece11",
"x": 5,
"y": 0,
"width": 65,
"height": 23
}
]
/**
* 毛球消失动效
*/
export class HairballGreyDisAni extends Ani {
pieces: FYGE.Sprite[];
upBg: FYGE.Sprite;
constructor() {
super();
this.aniName = RecoverName.HAIRBALLGREYDIS_ANI// "HairballGreyDisAni";
this.pieces = []
for (var i = 0; i < config.length; i++) {
var bitmap = new FYGE.Sprite(RES.getRes(config[i].name + ".png"))
this.addChild(bitmap)
this.pieces.push(bitmap);
}
this.upBg = new FYGE.Sprite(RES.getRes("hairballDisBg.png"));
// this.upBg.anchorOffsetX = offsetX;
// this.upBg.anchorOffsetY = offsetY;
this.upBg.anchorTexture.set(offsetX / this.upBg.texture.width, offsetY / this.upBg.texture.height)
this.addChild(this.upBg);
this.reset();
}
private reset() {
for (var i = 0; i < config.length; i++) {
this.pieces[i].x = config[i].x - offsetX;
this.pieces[i].y = config[i].y - offsetY;
this.pieces[i].alpha = 1;
}
this.upBg.scaleX = this.upBg.scaleY = 1;
this.upBg.alpha = 1;
}
play() {
//重置
this.reset();
//动画,完了要调this.recover()
FYGE.Tween.get(this.upBg)
.to({ scaleX: 1.5, scaleY: 1.5 }, 150)
FYGE.Tween.get(this.upBg)
.wait(50)
.to({ alpha: 0 }, 100)
.call(() => {
//碎片掉落
for (let i = 0; i < config.length; i++) {
let p = this.pieces[i];
let y = config[i].y;
FYGE.Tween.get(p)
.wait(i * 30)
.to({ y: y + 6 }, 200);
FYGE.Tween.get(p)
.wait(i * 30 + 150)
.to({ alpha: 0 }, 50)
.call(() => {
if (i == config.length - 1) {
this.recover();
}
})
}
})
}
}
......@@ -3,8 +3,8 @@ import { Ani } from "../class/Ani";
import { RES } from "../../../module/RES";
import { RecoverName } from "../enum/RecoverName";
const offsetX = 71 / 2;
const offsetY = 62 / 2;
const offsetX = 120 / 2;
const offsetY = 120 / 2;
/**
......@@ -13,83 +13,50 @@ const offsetY = 62 / 2;
const config = [
{
"name": "hairballPiece1",
"x": 5,
"y": 46,
"width": 33,
"height": 15
"x": 57,
"y": 70,
},
{
"name": "hairballPiece2",
"x": 32,
"y": 41,
"width": 36,
"height": 21
"x": 23,
"y": 71,
},
{
"name": "hairballPiece3",
"x": 0,
"y": 37,
"width": 36,
"height": 21
"x": 61,
"y": 63,
},
{
"name": "hairballPiece4",
"x": 30,
"y": 26,
"width": 41,
"height": 31
"x": 22,
"y": 64,
},
{
"name": "hairballPiece5",
"x": 1,
"y": 32,
"width": 42,
"height": 17
"x": 71,
"y": 49,
},
{
"name": "hairballPiece6",
"x": 33,
"y": 30,
"width": 34,
"height": 17
"x": 42,
"y": 55,
},
{
"name": "hairballPiece7",
"x": 1,
"y": 23,
"width": 47,
"height": 15
"x": 23,
"y": 44,
},
{
"name": "hairballPiece8",
"x": 33,
"y": 20,
"width": 38,
"height": 14
"x": 59,
"y": 26,
},
{
"name": "hairballPiece9",
"x": 2,
"y": 16,
"width": 41,
"height": 11
},
{
"name": "hairballPiece10",
"x": 31,
"y": 13,
"width": 39,
"height": 10
"x": 23,
"y": 26,
},
{
"name": "hairballPiece11",
"x": 5,
"y": 0,
"width": 65,
"height": 23
}
]
/**
* 毛球消失动效
*/
......@@ -102,19 +69,11 @@ export class HairballGreyDisAni extends Ani {
this.pieces = []
for (var i = 0; i < config.length; i++) {
var bitmap = new FYGE.Sprite(RES.getRes(config[i].name + ".png"))
this.addChild(bitmap)
var bitmap = this.addChild(new FYGE.Sprite(RES.getRes(config[i].name + ".png")))
this.pieces.push(bitmap);
}
this.upBg = new FYGE.Sprite(RES.getRes("hairballDisBg.png"));
// this.upBg.anchorOffsetX = offsetX;
// this.upBg.anchorOffsetY = offsetY;
this.upBg.anchorTexture.set(offsetX / this.upBg.texture.width, offsetY / this.upBg.texture.height)
this.addChild(this.upBg);
this.upBg = this.addChild(new FYGE.Sprite(RES.getRes("hairballDisBg.png")))
this.upBg.anchorTexture.set(0.5, 0.5)
this.reset();
}
......@@ -134,20 +93,18 @@ export class HairballGreyDisAni extends Ani {
this.reset();
//动画,完了要调this.recover()
FYGE.Tween.get(this.upBg)
.to({ scaleX: 1.5, scaleY: 1.5 }, 150)
FYGE.Tween.get(this.upBg)
.wait(50)
.to({ alpha: 0 }, 100)
.call(() => {
.to({ scaleX: 1.4, scaleY: 1.4 }, 170)
.to({ scaleX: 1, scaleY: 1, alpha: 0 }, 160)
.call(()=>{
//碎片掉落
for (let i = 0; i < config.length; i++) {
let p = this.pieces[i];
let y = config[i].y;
FYGE.Tween.get(p)
.wait(i * 30)
.to({ y: y + 6 }, 200);
.to({ y: y + 6 }, 170);
FYGE.Tween.get(p)
.wait(i * 30 + 150)
.wait(i * 30 + 100)
.to({ alpha: 0 }, 50)
.call(() => {
if (i == config.length - 1) {
......@@ -156,7 +113,5 @@ export class HairballGreyDisAni extends Ani {
})
}
})
}
}
......@@ -7,8 +7,6 @@ import { Tool } from "../Tool";
import { ElementType } from "../enum/ElementType";
import { RES } from "../../../module/RES";
export const stepPosition: number[] = [125, 115];
/**
* 需要回调的
* 手动修改this.shoot.rotation=
......
......@@ -738,7 +738,7 @@ export const Chapters1: ChapterData[] = [
10, 10, 20, 20, 50, 30, 30, 40, 40,
10, 10, 20, 20, 50, 30, 30, 40, 40,
40, 40, 30, 30, 40, 10, 10, 50, 50,
40, 40, 30, 30, 30, 10, 10, 50, 50,
40, 40, 30, 20, 30, 10, 10, 50, 50,//第四个原先30改成20了
0, 0, 0, 0, 30, 0, 0, 0, 0,
0, 0, 10, 20, 10, 20, 10, 0, 0,
],
......
......@@ -45,12 +45,11 @@ export function drawBg(paths: PathData[], lattices?: number[]) {
.position.set(x, y)
return c
}
export function drawShape(paths: PathData[], dontFill: boolean = false): FYGE.Shape {
export function drawShape(paths: PathData[]): FYGE.Shape {
var shape = new FYGE.Shape();
shape.beginFill(0x5e2635, 1);//指令中有beginPath,会中断之前绘制得路径,会导致clip只有最后一段poly有效
for (var i = 0; i < paths.length; i++) {
var path = paths[i];
//画路径
!dontFill && shape.beginFill(0x5e2635, 1);
drawPoly(shape, path)
//画洞了
for (var j = 0; j < path.holes.length; j++) {
......@@ -58,7 +57,7 @@ export function drawShape(paths: PathData[], dontFill: boolean = false): FYGE.Sh
drawPoly(shape, hole)
}
//最终绘制
!dontFill && shape.endFill()
shape.endFill()
}
return shape
}
......
......@@ -2,6 +2,7 @@
import { Tool } from "../Tool";
import { RES } from "../../../module/RES";
import { PropType } from "../enum/PropType";
import { stepPosition } from "../anis/BonusShootAni";
/**
* 道具使用引导,初始化一次,然后用init初始化
......@@ -20,16 +21,16 @@ export class PropGuide extends FYGE.Container {
this.bg = new FYGE.Shape();
this.addChild(this.bg);
this.boomBtn = new FYGE.Sprite(RES.getRes("boomBtn.png"));
this.boomBtn.x = 375 - 110 - 50 - 55; //110图片宽度,50按钮间隔,55一半的图片宽度
this.boomBtn.y = offsetY - 55;
this.boomBtn.x = 311;
this.boomBtn.y = offsetY;
this.addChild(this.boomBtn);
this.hammerBtn = new FYGE.Sprite(RES.getRes("hammerBtn.png"));
this.hammerBtn.x = 375 - 55;
this.hammerBtn.y = offsetY - 55;
this.hammerBtn.x = 488;
this.hammerBtn.y = offsetY;
this.addChild(this.hammerBtn);
this.stepBtn = new FYGE.Sprite(RES.getRes("stepBtn.png"));
this.stepBtn.x = 375 + 110 + 50 - 55;
this.stepBtn.y = offsetY - 55;
this.stepBtn.x = 100;
this.stepBtn.y = offsetY;
this.addChild(this.stepBtn);
//再调
var text: FYGE.TextField = new FYGE.TextField();
......@@ -71,7 +72,7 @@ export class PropGuide extends FYGE.Container {
this.bg.lineTo(750, 1624);
this.bg.lineTo(0, 1624);
this.bg.lineTo(0, 0);
this.bg.arc(123, 98, 72, 0, Math.PI * 2, true)
this.bg.arc(stepPosition[0], stepPosition[1], 55, 0, Math.PI * 2, true)
this.bg.endFill();
this.msgTxt.text = "点击左上方步数,可为闯关时增加额外5次步数";
// this.msgTxt.x = 320;
......
import { RES } from "../../../module/RES";
import { Tools } from "../../Tools";
/**
* 分数条的托管类,不需要继承
......@@ -98,7 +99,8 @@ export class ScoreProgress extends FYGE.Container {
constructor(starScores: number[]) {
super()
this.starProgress = this.addChild(FYGE.Sprite.fromFrame("starProgress.png"));
this.scoreTxt = this.addChild(new FYGE.BitmapText({}));//待写
this.scoreTxt = this.addChild(new FYGE.BitmapText(Tools.getNumTextures("scoreNum")));
this.scoreTxt.position.set(39,-32)
this.starScores = starScores;
this.allScore = this.diss[3] / this.diss[2] * this.starScores[2];
......
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