Commit 2afccfc2 authored by 邱旭's avatar 邱旭

1

parent b2e95b2d
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
</state>
</component>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
{
"version": 5,
"files": [
"./turntable/turntable_rulebtn.png",
"./turntable/turnable_icon2.png",
"./turntable/turnable_icon3.png",
"./turntable/turnable_icon1.png",
"./turntable/turntable_bg.png",
"./turntable/turntable_startbtn.png",
"./turntable/turntable_panel.png"
],
"projectName": "turntable",
"options": {
"layoutMath": "3",
"sizeMode": "free",
"useExtension": 0,
"layoutGap": 1,
"extend": 0
}
}
\ No newline at end of file
......@@ -76,6 +76,7 @@ import TaskCenterNoPrize from "../../src/panels/TaskCenter/TaskCenterNoPrize";
import { GDispatcher } from "../tc/util/GDispatcher";
import ShopTipPanel from "../../src/panels/ShopTipPanel";
import RechargePanel from "../../src/panels/RechargePanel";
import BombTips2Panel from "../../src/panels/BombTips2Panel";
export default class MainBase extends eui.UILayer {
constructor() {
......@@ -155,6 +156,7 @@ export default class MainBase extends eui.UILayer {
['friend', { cls: FriendPanel }],
['ad', { cls: ADPanel }],
['BombTipsPanel', { cls: BombTipsPanel }],
['BombTips2Panel', { cls: BombTips2Panel }],
['RedBombAlert', { cls: RedBombAlertPanel }],
['RedBombRule', { cls: RedBombRule }],
['task', { cls: TaskCenter }],
......@@ -248,6 +250,7 @@ export default class MainBase extends eui.UILayer {
}
else {
RES.getResAsync('mapredbagicom_png');
RES.getResAsync('mapredbagicom2_png');
RES.getResAsync('maplight2_png');
RES.getResAsync('main_mapbottom_png');
RES.getResAsync('lightani_png');
......@@ -326,7 +329,7 @@ export default class MainBase extends eui.UILayer {
}
var arr = [
"rectLatWhite",
"fesRedBigLight", "fesRedBombSta1", "fesRedCap", "fesRedDown", "fesRedSmallLight", "fesRedUp", "xingxingbi",
"fesRedBigLight", "fesRedBombSta1", "fesRedBombSta2", "fesRedCap", "fesRedDown", "fesRedSmallLight", "fesRedUp", "xingxingbi",
"tinyRedLeft", "tinyRedMid", "tinyRedRight",
"festivalTargetBg",
"hairballDisBg",
......@@ -489,7 +492,7 @@ export default class MainBase extends eui.UILayer {
this.hcHome(),
this.hc_userInfo(),
// this.getBackReward(),
// this.hcRedBoobBaseInfo(),
this.hcRedBoobBaseInfo(),
]);
MapScene.adData = DataManager.ins.getData('hc_advert');
......
......@@ -463,7 +463,7 @@ export class NetManager extends ABNetManager {
* @param gameData json带分数和通关元素
* @param submitToken token,来自getNgameStartStatus,,DataManager.ins.getData("getNgameStartStatus").data.submitToken
*/
hc_submit(callback: Function, orderId: number, score: number, gameData: string, submitToken: string): void {
hc_submit(callback: Function, orderId: number, score: number, gameData: string, submitToken: string, relatedTaskType): void {
const sign = this.createSgin(orderId, score, gameData, submitToken);
var data = {
activityId: DataManager.ins.customCfgData.actId,
......@@ -473,7 +473,10 @@ export class NetManager extends ABNetManager {
dynamicData: JSON.stringify([]),
detect: window['detect'],
deviceSessionId: window['_device_session_id'],
score: score,
score: score
};
if(relatedTaskType) {
data['relatedTaskType'] = relatedTaskType;
}
var sgin = this.encrypt(JSON.stringify(data));
const net: INetData = {
......
egret/resource/assets/map/icon.png

9.52 KB | W: | H:

egret/resource/assets/map/icon.png

8.34 KB | W: | H:

egret/resource/assets/map/icon.png
egret/resource/assets/map/icon.png
egret/resource/assets/map/icon.png
egret/resource/assets/map/icon.png
  • 2-up
  • Swipe
  • Onion skin
egret/resource/assets/map/icongray.png

6.53 KB | W: | H:

egret/resource/assets/map/icongray.png

6.24 KB | W: | H:

egret/resource/assets/map/icongray.png
egret/resource/assets/map/icongray.png
egret/resource/assets/map/icongray.png
egret/resource/assets/map/icongray.png
  • 2-up
  • Swipe
  • Onion skin
egret/resource/assets/map/map1.jpg

173 KB | W: | H:

egret/resource/assets/map/map1.jpg

454 KB | W: | H:

egret/resource/assets/map/map1.jpg
egret/resource/assets/map/map1.jpg
egret/resource/assets/map/map1.jpg
egret/resource/assets/map/map1.jpg
  • 2-up
  • Swipe
  • Onion skin
egret/resource/assets/map/map2.jpg

202 KB | W: | H:

egret/resource/assets/map/map2.jpg

520 KB | W: | H:

egret/resource/assets/map/map2.jpg
egret/resource/assets/map/map2.jpg
egret/resource/assets/map/map2.jpg
egret/resource/assets/map/map2.jpg
  • 2-up
  • Swipe
  • Onion skin
egret/resource/assets/map/map3.jpg

186 KB | W: | H:

egret/resource/assets/map/map3.jpg

446 KB | W: | H:

egret/resource/assets/map/map3.jpg
egret/resource/assets/map/map3.jpg
egret/resource/assets/map/map3.jpg
egret/resource/assets/map/map3.jpg
  • 2-up
  • Swipe
  • Onion skin
egret/resource/assets/share2.jpg

682 KB | W: | H:

egret/resource/assets/share2.jpg

618 KB | W: | H:

egret/resource/assets/share2.jpg
egret/resource/assets/share2.jpg
egret/resource/assets/share2.jpg
egret/resource/assets/share2.jpg
  • 2-up
  • Swipe
  • Onion skin
egret/resource/assets/share3.jpg

432 KB | W: | H:

egret/resource/assets/share3.jpg

400 KB | W: | H:

egret/resource/assets/share3.jpg
egret/resource/assets/share3.jpg
egret/resource/assets/share3.jpg
egret/resource/assets/share3.jpg
  • 2-up
  • Swipe
  • Onion skin
......@@ -21,7 +21,7 @@
"name": "buy3"
},
{
"keys": "宝箱_png,宝箱1_png,宝箱2_png,宝箱3_png,宝箱bg_png,宝箱btn_png,道具_png,关闭 拷贝_png,光 副本 4_png,设置_png,设置bg_png,声音_png,声音关闭_png,狮子_png,退出_png,问题_png,无星星_png,星星_png,星星bg_png,音乐_png,音乐关闭_png,有星星_png,有星星2_png,有星星3_png,元宝bg_png,ad_icon_png,animal1_png,avatar_png,friend_avatar_png,guideBox_png,guideLevel_png,guideLove_png,guideMoney_png,guideOver_png,icon_png,iconbg_png,icongray_png,invite_icon_png,invite_txtbg_png,lionMsgBg_png,map_signicon_png,map1_jpg,map2_jpg,map2+_png,map2+bg_png,map2红包大作战_png,map2热门引导_png,map2周一红包雨_png,map3_jpg,map大转盘_png,map刮现金红包_png,map今日可领_png,map明日可领_png,maphot_png,msgTri_png,namebg_png,progress1_png,progress2_png,recordbtn_png,taskicon_png,map2+bg2_png,mapredbagicom_png,maplight2_png,taskBtn_png,txtbg_blue_png,txtbg_orange_png,txtbg_purple_png",
"keys": "宝箱_png,宝箱1_png,宝箱2_png,宝箱3_png,宝箱bg_png,宝箱btn_png,道具_png,关闭 拷贝_png,光 副本 4_png,设置_png,设置bg_png,声音_png,声音关闭_png,狮子_png,退出_png,问题_png,无星星_png,星星_png,星星bg_png,音乐_png,音乐关闭_png,有星星_png,有星星2_png,有星星3_png,元宝bg_png,ad_icon_png,animal1_png,avatar_png,friend_avatar_png,guideBox_png,guideLevel_png,guideLove_png,guideMoney_png,guideOver_png,icon_png,iconbg_png,icongray_png,invite_icon_png,invite_txtbg_png,lionMsgBg_png,map_signicon_png,map1_jpg,map2_jpg,map2+_png,map2+bg_png,map2红包大作战_png,map2热门引导_png,map2周一红包雨_png,map3_jpg,map大转盘_png,map刮现金红包_png,map今日可领_png,map明日可领_png,maphot_png,msgTri_png,namebg_png,progress1_png,progress2_png,recordbtn_png,taskicon_png,map2+bg2_png,mapredbagicom_png,maplight2_png,taskBtn_png,txtbg_blue_png,txtbg_orange_png,txtbg_purple_png,mapredbagicom2_png",
"name": "map"
},
{
......@@ -97,7 +97,7 @@
"name": "h5"
},
{
"keys": "bonusFra1_png,bonusFra10_png,bonusFra11_png,bonusFra12_png,bonusFra13_png,bonusFra14_png,bonusFra15_png,bonusFra16_png,bonusFra17_png,bonusFra18_png,bonusFra19_png,bonusFra2_png,bonusFra20_png,bonusFra21_png,bonusFra22_png,bonusFra23_png,bonusFra24_png,bonusFra25_png,bonusFra26_png,bonusFra27_png,bonusFra3_png,bonusFra4_png,bonusFra5_png,bonusFra6_png,bonusFra7_png,bonusFra8_png,bonusFra9_png,bonusShoot_png,bonusTime_png,boom1_png,boom10_png,boom11_png,boom12_png,boom13_png,boom14_png,boom15_png,boom16_png,boom17_png,boom18_png,boom2_png,boom3_png,boom4_png,boom5_png,boom6_png,boom7_png,boom8_png,boom9_png,boomBtn_png,chooseRect_png,dangqianfenshu_png,eggPiece1_png,eggPiece2_png,eggPiece3_png,eggPiece4_png,eggPiece5_png,eggStatus0_png,eggStatus1_png,eggStatus2_png,ele0_png,ele0Exp_png,ele0Line_png,ele1_png,ele1Exp_png,ele1Line_png,ele2_png,ele2Exp_png,ele2Line_png,ele3_png,ele3Exp_png,ele3Line_png,ele4_png,ele4Exp_png,ele4Line_png,ele5_png,ele6_png,ele7_png,ele8_png,ele9_png,eleDis1_png,eleDis10_png,eleDis11_png,eleDis12_png,eleDis13_png,eleDis14_png,eleDis15_png,eleDis16_png,eleDis17_png,eleDis18_png,eleDis19_png,eleDis2_png,eleDis3_png,eleDis4_png,eleDis5_png,eleDis6_png,eleDis7_png,eleDis8_png,eleDis9_png,exLighting1_png,exLighting11_png,exLighting14_png,exLighting16_png,exLighting18_png,exLighting19_png,exLighting21_png,exLighting23_png,exLighting25_png,exLighting27_png,exLighting29_png,exLighting3_png,exLighting32_png,exLighting34_png,exLighting5_png,exLighting7_png,exLighting9_png,greenCircleDown_png,greenCircleUp_png,guidePropBoom_png,guidePropCow_png,guidePropHammer_png,guidePropHand_png,guidePropMsgPanel_png,guidePropShoe_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,mainMusicBtnOff_png,mainMusicBtnOn_png,mainQuestionBtn_png,mainQuitBtn_png,mainSettingBg_png,mainSoundBtnOff_png,mainSoundBtnOn_png,main_mapbottom_png,playSceneBg_jpg,progressDown_png,propNum0_png,propNum1_png,propNum2_png,propNum3_png,propNum4_png,propNum5_png,propNum6_png,propNum7_png,propNum8_png,propNum9_png,propNumBg_png,rectLat_png,rightArrow_png,rightMark_png,rock2_png,rock3_png,rock4_png,rock5_png,rock6_png,scoreNumber0_png,scoreNumber1_png,scoreNumber2_png,scoreNumber3_png,scoreNumber4_png,scoreNumber5_png,scoreNumber6_png,scoreNumber7_png,scoreNumber8_png,scoreNumber9_png,setting_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,stepNumber0_png,stepNumber1_png,stepNumber2_png,stepNumber3_png,stepNumber4_png,stepNumber5_png,stepNumber6_png,stepNumber7_png,stepNumber8_png,stepNumber9_png,stepsBoard_png,targetBoard_png,targetNumber0_png,targetNumber1_png,targetNumber2_png,targetNumber3_png,targetNumber4_png,targetNumber5_png,targetNumber6_png,targetNumber7_png,targetNumber8_png,targetNumber9_png,unlightedStar_png,yellowCircleDown_png,yellowCircleUp_png,yezi1_png,bubbleStar19_png,bubleEle0_png,bubleEle1_png,bubleEle2_png,bubleEle3_png,bubleEle4_png,bubbleStar1_png,bubbleStar2_png,bubbleStar3_png,bubbleStar4_png,bubbleStar5_png,bubbleStar6_png,bubbleStar7_png,bubbleStar8_png,bubbleStar9_png,bubbleStar10_png,bubbleStar11_png,bubbleStar12_png,bubbleStar13_png,bubbleStar14_png,bubbleStar15_png,bubbleStar16_png,bubbleStar17_png,bubbleStar18_png,ele11_png,ele10_png,brownBallFace_png,eyeDownLeft_png,eyeSingle_png,greyBallFace_png,eyeDownRight_png,hairballPiece9_png,hairballPiece8_png,hairballPiece7_png,hairballPiece6_png,hairballPiece5_png,hairballPiece4_png,hairballPiece3_png,hairballPiece2_png,hairballPiece11_png,hairballPiece10_png,hairballPiece1_png,hairballDisBg_png,curScoreNum9_png,curScoreNum8_png,curScoreNum7_png,curScoreNum6_png,curScoreNum5_png,curScoreNum4_png,curScoreNum3_png,curScoreNum2_png,curScoreNum1_png,curScoreNum0_png,festivalTargetBg_png,lineLight9_png,lineLight8_png,lineLight7_png,lineLight6_png,lineLight5_png,lineLight4_png,lineLight3_png,lineLight2_png,lineLight13_png,lineLight12_png,lineLight11_png,lineLight10_png,lineLight1_png,fesRedUp_png,fesRedSmallLight_png,fesRedDown_png,fesRedCap_png,fesRedBombSta1_png,fesRedBigLight_png,fesEleSmallDis9_png,fesEleSmallDis8_png,fesEleSmallDis7_png,fesEleSmallDis6_png,fesEleSmallDis5_png,fesEleSmallDis4_png,fesEleSmallDis3_png,fesEleSmallDis2_png,fesEleSmallDis10_png,fesEleSmallDis1_png,ele14_png,ele12_png,ele13_png,xingxingbi_png,tinyRedMid_png,tinyRedLeft_png,tinyRedRight_png,rectLatWhite_png",
"keys": "bonusFra1_png,bonusFra10_png,bonusFra11_png,bonusFra12_png,bonusFra13_png,bonusFra14_png,bonusFra15_png,bonusFra16_png,bonusFra17_png,bonusFra18_png,bonusFra19_png,bonusFra2_png,bonusFra20_png,bonusFra21_png,bonusFra22_png,bonusFra23_png,bonusFra24_png,bonusFra25_png,bonusFra26_png,bonusFra27_png,bonusFra3_png,bonusFra4_png,bonusFra5_png,bonusFra6_png,bonusFra7_png,bonusFra8_png,bonusFra9_png,bonusShoot_png,bonusTime_png,boom1_png,boom10_png,boom11_png,boom12_png,boom13_png,boom14_png,boom15_png,boom16_png,boom17_png,boom18_png,boom2_png,boom3_png,boom4_png,boom5_png,boom6_png,boom7_png,boom8_png,boom9_png,boomBtn_png,chooseRect_png,dangqianfenshu_png,eggPiece1_png,eggPiece2_png,eggPiece3_png,eggPiece4_png,eggPiece5_png,eggStatus0_png,eggStatus1_png,eggStatus2_png,ele0_png,ele0Exp_png,ele0Line_png,ele1_png,ele1Exp_png,ele1Line_png,ele2_png,ele2Exp_png,ele2Line_png,ele3_png,ele3Exp_png,ele3Line_png,ele4_png,ele4Exp_png,ele4Line_png,ele5_png,ele6_png,ele7_png,ele8_png,ele9_png,eleDis1_png,eleDis10_png,eleDis11_png,eleDis12_png,eleDis13_png,eleDis14_png,eleDis15_png,eleDis16_png,eleDis17_png,eleDis18_png,eleDis19_png,eleDis2_png,eleDis3_png,eleDis4_png,eleDis5_png,eleDis6_png,eleDis7_png,eleDis8_png,eleDis9_png,exLighting1_png,exLighting11_png,exLighting14_png,exLighting16_png,exLighting18_png,exLighting19_png,exLighting21_png,exLighting23_png,exLighting25_png,exLighting27_png,exLighting29_png,exLighting3_png,exLighting32_png,exLighting34_png,exLighting5_png,exLighting7_png,exLighting9_png,greenCircleDown_png,greenCircleUp_png,guidePropBoom_png,guidePropCow_png,guidePropHammer_png,guidePropHand_png,guidePropMsgPanel_png,guidePropShoe_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,mainMusicBtnOff_png,mainMusicBtnOn_png,mainQuestionBtn_png,mainQuitBtn_png,mainSettingBg_png,mainSoundBtnOff_png,mainSoundBtnOn_png,main_mapbottom_png,playSceneBg_jpg,progressDown_png,propNum0_png,propNum1_png,propNum2_png,propNum3_png,propNum4_png,propNum5_png,propNum6_png,propNum7_png,propNum8_png,propNum9_png,propNumBg_png,rectLat_png,rightArrow_png,rightMark_png,rock2_png,rock3_png,rock4_png,rock5_png,rock6_png,scoreNumber0_png,scoreNumber1_png,scoreNumber2_png,scoreNumber3_png,scoreNumber4_png,scoreNumber5_png,scoreNumber6_png,scoreNumber7_png,scoreNumber8_png,scoreNumber9_png,setting_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,stepNumber0_png,stepNumber1_png,stepNumber2_png,stepNumber3_png,stepNumber4_png,stepNumber5_png,stepNumber6_png,stepNumber7_png,stepNumber8_png,stepNumber9_png,stepsBoard_png,targetBoard_png,targetNumber0_png,targetNumber1_png,targetNumber2_png,targetNumber3_png,targetNumber4_png,targetNumber5_png,targetNumber6_png,targetNumber7_png,targetNumber8_png,targetNumber9_png,unlightedStar_png,yellowCircleDown_png,yellowCircleUp_png,yezi1_png,bubbleStar19_png,bubleEle0_png,bubleEle1_png,bubleEle2_png,bubleEle3_png,bubleEle4_png,bubbleStar1_png,bubbleStar2_png,bubbleStar3_png,bubbleStar4_png,bubbleStar5_png,bubbleStar6_png,bubbleStar7_png,bubbleStar8_png,bubbleStar9_png,bubbleStar10_png,bubbleStar11_png,bubbleStar12_png,bubbleStar13_png,bubbleStar14_png,bubbleStar15_png,bubbleStar16_png,bubbleStar17_png,bubbleStar18_png,ele11_png,ele10_png,brownBallFace_png,eyeDownLeft_png,eyeSingle_png,greyBallFace_png,eyeDownRight_png,hairballPiece9_png,hairballPiece8_png,hairballPiece7_png,hairballPiece6_png,hairballPiece5_png,hairballPiece4_png,hairballPiece3_png,hairballPiece2_png,hairballPiece11_png,hairballPiece10_png,hairballPiece1_png,hairballDisBg_png,curScoreNum9_png,curScoreNum8_png,curScoreNum7_png,curScoreNum6_png,curScoreNum5_png,curScoreNum4_png,curScoreNum3_png,curScoreNum2_png,curScoreNum1_png,curScoreNum0_png,festivalTargetBg_png,lineLight9_png,lineLight8_png,lineLight7_png,lineLight6_png,lineLight5_png,lineLight4_png,lineLight3_png,lineLight2_png,lineLight13_png,lineLight12_png,lineLight11_png,lineLight10_png,lineLight1_png,fesRedUp_png,fesRedSmallLight_png,fesRedDown_png,fesRedCap_png,fesRedBombSta1_png,fesRedBigLight_png,fesEleSmallDis9_png,fesEleSmallDis8_png,fesEleSmallDis7_png,fesEleSmallDis6_png,fesEleSmallDis5_png,fesEleSmallDis4_png,fesEleSmallDis3_png,fesEleSmallDis2_png,fesEleSmallDis10_png,fesEleSmallDis1_png,ele12_png,ele13_png,xingxingbi_png,tinyRedMid_png,tinyRedLeft_png,tinyRedRight_png,rectLatWhite_png,fesRedBombSta2_png,ele14_png",
"name": "main2"
},
{
......@@ -200,6 +200,10 @@
"keys": "redbagtips_ele_png,redbagtips_ele1_png,redbagtips_ele2_png,redbagtips_ele3_png,redbagtips_light_png,redbagtips按钮_png,redbagtips活动规则_png,redbagtipsbg_png,redbagtips_ele7_png",
"name": "redbombtips"
},
{
"keys": "redbagtips_ele_png,redbagtips_ele1_png,redbagtips_ele2_png,redbagtips_ele3_png,redbagtips_light_png,redbagtips按钮_png,redbagtips活动规则_png,redbagtipsbg_png,redbagtips_ele7_png",
"name": "redbombtips2"
},
{
"keys": "TaskCenter_getPrizeBtn_png,TaskCenter_goTaskBtn_png,TaskCenter_bg_png,TaskCenter_taskBg_png,TaskCenter_doneBtn_png,TaskCenter_btn_png",
"name": "taskcenter"
......@@ -617,11 +621,6 @@
"type": "sound",
"name": "boom_mp3"
},
{
"url": "assets/share2.jpg",
"type": "image",
"name": "share2_jpg"
},
{
"url": "assets/showoff.jpg",
"type": "image",
......@@ -662,11 +661,6 @@
"type": "image",
"name": "声音关闭_png"
},
{
"url": "assets/share3.jpg",
"type": "image",
"name": "share3_jpg"
},
{
"url": "assets/box2/box2_bg.png",
"type": "image",
......@@ -3317,11 +3311,6 @@
"type": "image",
"name": "ele13_png"
},
{
"url": "assets/mainScene/ele14.png",
"type": "image",
"name": "ele14_png"
},
{
"url": "assets/mainScene/fesEleSmallDis1.png",
"type": "image",
......@@ -3833,6 +3822,31 @@
"url": "assets/recharge/recharge_50_en.png",
"type": "image",
"name": "recharge_50_en_png"
},
{
"url": "assets/share3.jpg",
"type": "image",
"name": "share3_jpg"
},
{
"url": "assets/share2.jpg",
"type": "image",
"name": "share2_jpg"
},
{
"url": "assets/mainScene/fesRedBombSta2.png",
"type": "image",
"name": "fesRedBombSta2_png"
},
{
"url": "assets/map/mapredbagicom2.png",
"type": "image",
"name": "mapredbagicom2_png"
},
{
"url": "assets/mainScene/ele14.png",
"type": "image",
"name": "ele14_png"
}
]
}
\ No newline at end of file
......@@ -58,6 +58,7 @@
"resource/skins/RedBagAlertSkin.exml",
"resource/skins/RedBombAlertSkin.exml",
"resource/skins/RedBombRuleSkin.exml",
"resource/skins/RedBombTips2Skin.exml",
"resource/skins/RedBombTipsSkin.exml",
"resource/skins/ReliveSkin.exml",
"resource/skins/RuleSkin.exml",
......
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="MapBottomSkin" width="750" height="1530" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Skin class="MapBottomSkin" width="750" height="1363" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Image source="map3_jpg" x="0" y="0"/>
<e:Group x="389" y="44" id="icon0">
<e:Group x="276.88" y="44" id="icon0">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt0" width="76" x="12" y="18.69" text="60" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group id="icon1" x="541.97" y="148.44">
<e:Group id="icon1" x="145.7" y="148.44">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt1" width="76" x="12" y="18.69" text="61" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="524" y="331" id="icon2">
<e:Group x="130" y="288" id="icon2">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt2" width="76" x="12" y="18.69" text="62" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="329.94" y="403" id="icon3">
<e:Group x="206.94" y="403" id="icon3">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt3" width="76" x="12" y="18.69" text="63" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="83" y="513" id="icon4">
<e:Group x="314" y="479" id="icon4">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt4" width="76" x="12" y="18.69" text="64" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="304" y="660" id="icon5">
<e:Group x="471" y="589" id="icon5">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt5" width="76" x="12" y="18.69" text="65" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="297.01" y="829.69" id="icon6">
<e:Group x="561.01" y="718.69" id="icon6">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt6" width="76" x="12" y="18.69" text="66" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="149.01" y="949.69" id="icon7">
<e:Group x="453.01" y="892.69" id="icon7">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt7" width="76" x="12" y="18.69" text="67" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="317.01" y="1052.69" id="icon8">
<e:Group x="309.01" y="1052.69" id="icon8">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt8" width="76" x="12" y="18.69" text="68" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="507.01" y="1148.69" id="icon9">
<e:Group x="95.01" y="1145.69" id="icon9">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt9" width="76" x="12" y="18.69" text="69" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="377.01" y="1209.69" id="icon10">
<e:Group x="202.01" y="1255.69" id="icon10">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt10" width="76" x="12" y="18.69" text="70" font="nums_fnt" textAlign="center"/>
</e:Group>
......
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="MapRepeatPartSkin" width="750" height="1477" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Skin class="MapRepeatPartSkin" width="750" height="1634" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Image source="map2_jpg"/>
<e:Group x="351" y="26" id="icon0">
<e:Group x="359" y="136.01" id="icon0">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt0" width="76" x="12" y="18.69" text="1" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="196" y="158" id="icon1">
<e:Group x="235" y="282" id="icon1">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt1" width="76" x="12" y="18.69" text="2" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="143" y="302" id="icon2">
<e:Group x="307" y="423" id="icon2">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt2" width="76" x="12" y="18.69" text="3" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="235" y="435" id="icon3">
<e:Group x="458" y="523" id="icon3">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt3" width="76" x="12" y="18.69" text="4" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="348" y="547" id="icon4">
<e:Group x="573" y="624" id="icon4">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt4" width="76" x="12" y="18.69" text="5" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="499" y="674" id="icon5">
<e:Group x="515" y="740" id="icon5">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt5" width="76" x="12" y="18.69" text="6" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="390" y="821" id="icon6">
<e:Group x="427" y="832" id="icon6">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt6" width="76" x="12" y="18.69" text="7" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="218" y="897" id="icon7">
<e:Group x="287" y="889" id="icon7">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt7" width="76" x="12" y="18.69" text="8" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="28" y="969" id="icon8">
<e:Group x="227" y="1035" id="icon8">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt8" width="76" x="12" y="18.69" text="9" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="237" y="1072" id="icon9">
<e:Group x="319" y="1140" id="icon9">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt9" width="76" x="12" y="18.69" text="10" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="377" y="1137" id="icon10">
<e:Group x="426" y="1249.12" id="icon10">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel width="76" x="12" y="18.69" text="11" font="nums_fnt" textAlign="center" id="txt10"/>
</e:Group>
<e:Group x="508" y="1254" id="icon11">
<e:Group x="346" y="1379.76" id="icon11">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel width="76" x="12" y="18.69" text="12" font="nums_fnt" textAlign="center" id="txt11"/>
</e:Group>
<e:Group x="359" y="1367" id="icon12">
<e:Image source="icon_png" x="0" y="0"/>
<e:Group x="324" y="1527.61" id="icon12">
<e:Image source="icon_png" x="-1" y="0"/>
<e:BitmapLabel width="76" x="12" y="18.69" text="13" font="nums_fnt" textAlign="center" id="txt12"/>
</e:Group>
<e:Image id="animal1" source="狮子_png" x="201.68" y="651.02" anchorOffsetX="0" width="152.81" anchorOffsetY="0" height="132.72"/>
<e:Image id="animal1" source="狮子_png" x="201.68" y="651.02" anchorOffsetX="0" width="152.81" anchorOffsetY="0" height="132.72" visible="false"/>
<e:Image id="animal2" source="animal1_png" x="232" y="567.5" visible="false"/>
</e:Skin>
\ No newline at end of file
......@@ -149,8 +149,8 @@
</e:Group>
<e:Group id="activitys" x="13.4" y="620.55" touchEnabled="false">
<e:Group id="actIconsGroup" x="12.12" y="0">
<e:Image id="actIconsBg1" source="map2+bg_png" x="-27.15" y="0" visible="false"/>
<e:Image id="actIconsBg2" x="-29.27" y="10" source="map2+bg2_png"/>
<e:Image id="actIconsBg1" source="map2+bg_png" x="-27.15" y="0"/>
<e:Image id="actIconsBg2" x="-29.27" y="10" source="map2+bg2_png" visible="false"/>
<e:Group id="hbRainGroup" x="4.27" y="157.5" width="120" height="120">
<e:Button id="hbRainBtn" label="" y="-1" x="0">
<e:skinName>
......@@ -161,7 +161,7 @@
</e:skinName>
</e:Button>
</e:Group>
<e:Image id="act2Btn" source="map2红包大作战_png" x="157.76" y="159" visible="false"/>
<e:Image id="act2Btn" source="map2红包大作战_png" x="157.76" y="159"/>
</e:Group>
<e:Image id="actsShowBtn" source="map2+_png" x="-7.64" y="5.45"/>
<e:Image id="actTips" source="maphot_png" x="91.52" y="15.72"/>
......
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="MapTop" width="750" height="1240" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Skin class="MapTop" width="750" height="1305" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Image source="map1_jpg" x="0" y="0"/>
<e:Group x="315" y="492" id="icon0">
<e:Group x="448" y="496.04" id="icon0">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel width="76" x="12" y="18.69" text="1" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group id="icon1" x="196" y="550.35">
<e:Group id="icon1" x="490" y="625">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel width="76" x="12" y="18.69" text="2" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="142" y="744" id="icon2">
<e:Group x="573.33" y="745.37" id="icon2">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel width="76" x="12" y="18.69" text="3" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="360" y="803" id="icon3">
<e:Group x="442" y="845.5" id="icon3">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel width="76" x="12" y="18.69" text="4" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="513" y="841" id="icon4">
<e:Group x="238.01" y="939.19" id="icon4">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel width="76" x="12" y="18.69" text="5" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="440" y="975" id="icon5">
<e:Group x="180" y="1092" id="icon5">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel width="76" x="12" y="18.69" text="6" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="297.01" y="1089.69" id="icon6">
<e:Group x="382.01" y="1194.69" id="icon6">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel width="76" x="12" y="18.69" text="7" font="nums_fnt" textAlign="center"/>
</e:Group>
......
<?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:Image id="rulebtn" source="redbagtips活动规则_png" y="814" horizontalCenter="0.5"/>
<e:Button id="btn" label="" y="692" horizontalCenter="0">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="redbagtips按钮_png" source.down="redbagtips按钮_png" source.disabled="redbagtips按钮_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
</e:Skin>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -642,7 +642,7 @@ export default class MapScene extends Scene {
}
onTap_act2btn() {
PanelCtrl.instance.show("BombTipsPanel");
PanelCtrl.instance.show("BombTips2Panel");
GDispatcher.dispatchEvent('closeActBtn');
}
......
......@@ -26,7 +26,7 @@ export default class RedBagAni {
}
export const createRedBagIcon = (parent)=>{
const icon = RES.getRes('mapredbagicom_png');
const icon = RES.getRes('mapredbagicom2_png');
const bmp = new egret.Bitmap(icon);
bmp.anchorOffsetX=32;
bmp.anchorOffsetY=33;
......
import Panel from "../../libs/new_wx/components/Panel";
import PanelCtrl from "../../libs/new_wx/ctrls/panelCtrl";
import SceneCtrl from "../../libs/new_wx/ctrls/sceneCtrl";
import { createEffect1MovieClip } from "../effect/createEffect1";
import RedBombRule from "./RedBombRule";
import { loadSvga } from "../loadSvga";
import getResPath from "../../libs/new_tc/getResPath";
export default class BombTips2Panel extends Panel {
mv;
async start(data) {
super.start();
this.showlog();
loadSvga(getResPath() + 'resource/assets/svgas/redBombTip.svga').then(
(mv: egret.DisplayObject) => {
mv.y = -190;
this.addChildAt(mv, 1);
this.mv = mv;
mv.addEventListener(egret.Event.COMPLETE, () => {
// @ts-ignore
mv.gotoAndPlay(35, true);
}, this);
}
);
this.touchChildren = this.touchEnabled = false;
await RES.getResAsync('effect1_json');
await RES.getResAsync('effect2_json');
this.touchChildren = this.touchEnabled = true;
}
showlog() {
}
initEvents() {
super.initEvents();
this['btn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTapInvite, this);
this['rulebtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTapInvite2, this);
}
onTapInvite2() {
const rule = new RedBombRule();
rule.loadSkin();
rule.start();
this.addChild(rule);
}
onTapInvite() {
this['btn'].touchEnabled = false;
const dur = 100;
egret.Tween.get(this.mv).to({alpha: 0}, dur);
const mask = PanelCtrl.instance._mask;
egret.Tween.get(mask).to({alpha: 0}, dur);
egret.Tween.get(this['redbag']).to({scaleX: 0.7, scaleY: 0.7}, 100)
.to({scaleX: 1.5, scaleY: 1.5, alpha: 0}, 300);
setTimeout(() => {
const mc = createEffect1MovieClip();
this.addChild(mc);
}, 200);
setTimeout(() => {
SceneCtrl.instance.currentScene['showRedBagAni']();
}, 400);
setTimeout(() => {
this.hidePanel();
}, 1000);
}
protected get closeBtns(): eui.Button[] {
return [this['closeBtn']]
}
get skinKey() {
return 'RedBombTips2'
}
}
\ No newline at end of file
......@@ -54,7 +54,7 @@ export default class RedBombAlertPanel extends Panel {
this.once(egret.TouchEvent.TOUCH_TAP,()=>{this.hidePanel()},this);
}, this);
setTimeout(()=>{
mv.setImage("img_2349",DataManager.ins.getData('hc_redBombAward').data.option.img)
mv.setImage("img_1951",DataManager.ins.getData('hc_redBombAward').data.option.img)
},100)
});
......
......@@ -4,19 +4,31 @@ import { RecoverName } from "../enum/RecoverName";
export class FesRedBombShowAni extends egret.DisplayObjectContainer {
// 红包
// constructor() {
// super()
// var textureDown: egret.Texture = RES.getRes("fesRedBombSta1_png");
// var down = new egret.Bitmap(textureDown);
// down.x = -textureDown.textureWidth / 2;
// down.y = -textureDown.textureHeight / 2;
// this.addChild(down);
// var textureUp: egret.Texture = RES.getRes("xingxingbi_png");
// var up = new egret.Bitmap(textureUp);
// up.x = -textureUp.textureWidth / 2; //-89
// up.y = -100;
// this.addChild(up);
// }
// 铃铛
constructor() {
super()
var textureDown: egret.Texture = RES.getRes("fesRedBombSta1_png")
var textureDown: egret.Texture = RES.getRes("fesRedBombSta2_png");
var down = new egret.Bitmap(textureDown);
down.x = -textureDown.textureWidth / 2;
down.y = -textureDown.textureHeight / 2;
this.addChild(down);
var textureUp: egret.Texture = RES.getRes("xingxingbi_png");
var up = new egret.Bitmap(textureUp);
up.x = -textureUp.textureWidth / 2; //-89
up.y = -100;
this.addChild(up);
}
play(position: number[], callback: Function) {
this.scaleX = this.scaleY = 0.29;
......
import { ImageAni } from "../class/ImageAni";
import { Pool } from "../Pool";
import { RecoverName } from "../enum/RecoverName";
import { Element } from "../class/Element";
import { Tool } from "../Tool";
import { ElementType } from "../enum/ElementType";
export const stepPosition: number[] = [125, 115];
/**
* 需要回调的
* 手动修改this.shoot.rotation=
*/
export class FesRedShootAni2 extends egret.DisplayObjectContainer {
light: LightingAni;
imageAni: ImageAni;
imageAniCon: egret.DisplayObjectContainer
constructor() {
super()
this.light = new LightingAni();
this.addChild(this.light);
var arr = []
for (var i = 1; i <= 10; i++) {
arr.push("fesEleSmallDis" + i + "_png");
}
this.imageAniCon = new egret.DisplayObjectContainer();
this.imageAni = new ImageAni(arr);
this.imageAniCon.addChild(this.imageAni);
this.addChild(this.imageAniCon);
this.imageAni.visible = false
}
reset() {
this.light.visible = true;
this.imageAni.visible = false;
this.light.scaleX = 0.2;
}
play(startP: number[], ele: Element, callback: Function) {
this.reset()
//算角度
var r = Tool.getForwardRotation(startP, [ele.x, ele.y])
this.light.rotation = r * 180 / Math.PI;
this.light.x = startP[0];
this.light.y = startP[1];
this.imageAniCon.x = ele.x;
this.imageAniCon.y = ele.y;
//247
var dis = Math.sqrt(
(startP[0] - ele.x) * (startP[0] - ele.x) +
(startP[1] - ele.y) * (startP[1] - ele.y)
)
var scaleX = dis / 247;
egret.Tween.get(this.light)
.to({ scaleX: scaleX, }, 400)
.call(() => {
ele.reset(ElementType.FESTIVALELE_SMALL);
ele.scaleX = ele.scaleY = 0.1
egret.Tween.get(ele)
.to({ scaleX: 1, scaleY: 1 }, 500, egret.Ease.backOut)
//回调
callback();
this.imageAni.visible = true;
this.imageAni.play(() => {
if (this.$parent) {
this.$parent.removeChild(this)
};
Pool.recover(RecoverName.FESREDSHOOT_ANI2, this)
})
setTimeout(() => {
this.light.visible = false;
}, 200)
})
}
}
class LightingAni extends egret.Bitmap {
sourceAll: string[];
currentFrame: number;
totalFrames: number;
isPlay: boolean;
startTime: number
/**
* 所有时间,帧数按每秒30
*/
allTime: number
/**
* 播放完的回调
*/
constructor() {
super();
var arr = [];
for (var i = 1; i <= 13; i++) {
arr.push("lineLight" + i + "_png")
}
this.anchorOffsetX = 23;
this.anchorOffsetY = 27;
this.sourceAll = arr;
this.texture = RES.getRes(this.sourceAll[0])
this.currentFrame = 0;
this.totalFrames = arr.length;
this.addEventListener(egret.Event.ENTER_FRAME, this.onEnterFrame, this)
this.startTime = Date.now()
this.allTime = this.sourceAll.length / 30 * 1000;
}
onEnterFrame() {
if (!this.stage) return
var dataNow = Date.now();
var deltaTime = dataNow - this.startTime;
var scale = deltaTime / this.allTime;
if (scale >= 1) {
this.startTime = Date.now()
this.currentFrame = 0;
} else {
this.currentFrame = (scale * this.sourceAll.length) >> 0;
}
this.texture = RES.getRes(this.sourceAll[this.currentFrame])
}
}
......@@ -17,6 +17,7 @@ import { HairballGreyState } from "../states/HairballGreyState";
import { HairballBlackState } from "../states/HairballBlackState";
import { Tool } from "../Tool";
import { FestivalEle } from "./FestivalEle";
import { FestivalEle2 } from "./FestivalEle2";
/**
......@@ -32,6 +33,7 @@ export class Element extends eui.Component {
get type() {
return this._type
}
/**
* 显示的图片,直接改source,"ele"+type
*/
......@@ -45,18 +47,19 @@ export class Element extends eui.Component {
get effectType() {
return this._effectType;
}
set effectType(value: EffectType) {
if (this._effectType == value) return
if (value != null) {
if(this._effectType == value) return
if(value != null) {
//先去掉原先有的
this.removeEffectHas();
//赋值现在的
switch (value) {
switch(value) {
case EffectType.MAGICLION:
this.changeSource("magicLion_png");
//添加MagicLionBgAni
this.magicLionBgAni = Pool.takeOut(RecoverName.MAGICLIONBG_ANI)
if (!this.magicLionBgAni) {
if(!this.magicLionBgAni) {
this.magicLionBgAni = new MagicLionBgAni();
} else {
this.magicLionBgAni.reset();
......@@ -67,7 +70,7 @@ export class Element extends eui.Component {
this.changeSource("ele" + this.type + "Line" + "_png");
//添加HorizontalBgAni
this.horizontalBgAni = Pool.takeOut(RecoverName.HORIZONTALBG_ANI)
if (!this.horizontalBgAni) {
if(!this.horizontalBgAni) {
this.horizontalBgAni = new HorizontalBgAni();
} else {
this.horizontalBgAni.reset();
......@@ -78,7 +81,7 @@ export class Element extends eui.Component {
this.changeSource("ele" + this.type + "Line" + "_png");
//添加VerticalBgAni
this.verticalBgAni = Pool.takeOut(RecoverName.VERTICALBG_ANI)
if (!this.verticalBgAni) {
if(!this.verticalBgAni) {
this.verticalBgAni = new VerticalBgAni();
} else {
this.verticalBgAni.reset();
......@@ -88,7 +91,7 @@ export class Element extends eui.Component {
case EffectType.EXPLOSIVE:
this.changeSource("ele" + this.type + "Exp" + "_png");
this.explosiveBgAni = Pool.takeOut(RecoverName.EXPLOSIVEBG_ANI)
if (!this.explosiveBgAni) {
if(!this.explosiveBgAni) {
this.explosiveBgAni = new ExplosiveBgAni();
} else {
this.explosiveBgAni.reset();
......@@ -106,6 +109,7 @@ export class Element extends eui.Component {
// console.log(this)
}
}
private magicLionBgAni: MagicLionBgAni;
private horizontalBgAni: HorizontalBgAni;
private verticalBgAni: VerticalBgAni;
......@@ -125,7 +129,7 @@ export class Element extends eui.Component {
//鸡蛋
chickenEgg: ChickenEgg;
//节日红包大
festivalEle: FestivalEle;
festivalEle: FestivalEle | FestivalEle2;
/**
* 所有的状态,注意,变色气泡特殊,不能和特效共存,所以初始化时,气泡的不能加特效。生成特效,去掉气泡
......@@ -144,9 +148,9 @@ export class Element extends eui.Component {
this.changeSource("ele" + this.type + "_png");
this.addChild(this.showImage);
//鸡蛋
if (type == ElementType.CHICKEN_EGG) {
if(type == ElementType.CHICKEN_EGG) {
this.chickenEgg = Pool.takeOut(RecoverName.CHICKEN_EGG)
if (!this.chickenEgg) {
if(!this.chickenEgg) {
this.chickenEgg = new ChickenEgg();
} else {
this.chickenEgg.reset();
......@@ -154,16 +158,15 @@ export class Element extends eui.Component {
this.addChild(this.chickenEgg)
}
//节日红包
else if (type == ElementType.FESTIVALELE_BIG) {
else if(type == ElementType.FESTIVALELE_BIG) {
this.festivalEle = Pool.takeOut(RecoverName.FESTIVAL_ELE)
if (!this.festivalEle) {
this.festivalEle = new FestivalEle();
if(!this.festivalEle) {
this.festivalEle = new FestivalEle2();
} else {
this.festivalEle.reset();
}
this.addChild(this.festivalEle)
}
}
/**
......@@ -179,7 +182,7 @@ export class Element extends eui.Component {
this.showImage.y = -texture.textureHeight / 2;
//特殊逻辑,因为魔力鸟动效要旋转,所以隐藏原图showImage,还有鸡蛋,还有特殊节日元素大
if (source == "magicLion_png" ||
if(source == "magicLion_png" ||
source == "ele" + ElementType.CHICKEN_EGG + "_png" ||
source == "ele" + ElementType.FESTIVALELE_BIG + "_png") {
this.showImage.alpha = 0;
......@@ -203,32 +206,31 @@ export class Element extends eui.Component {
//所有状态重置
this.removeAllState();
//如果类型是鸡蛋
if (type == ElementType.CHICKEN_EGG) {
if(type == ElementType.CHICKEN_EGG) {
this.chickenEgg = this.chickenEgg || Pool.takeOut(RecoverName.CHICKEN_EGG)
if (!this.chickenEgg) {
if(!this.chickenEgg) {
//新建
this.chickenEgg = new ChickenEgg();
} else {
this.chickenEgg.reset();
}
this.addChild(this.chickenEgg)
}
else if (this.chickenEgg) {
} else if(this.chickenEgg) {
this.removeChild(this.chickenEgg);
Pool.recover(RecoverName.CHICKEN_EGG, this.chickenEgg);
this.chickenEgg = null;
}
//如果类型是节日红包大
if (type == ElementType.FESTIVALELE_BIG) {
if(type == ElementType.FESTIVALELE_BIG) {
this.festivalEle = this.festivalEle || Pool.takeOut(RecoverName.FESTIVAL_ELE)
if (!this.festivalEle) {
if(!this.festivalEle) {
//新建
this.festivalEle = new FestivalEle();
this.festivalEle = new FestivalEle2();
} else {
this.festivalEle.reset();
}
this.addChild(this.festivalEle)
} else if (this.festivalEle) {
} else if(this.festivalEle) {
this.removeChild(this.festivalEle);
Pool.recover(RecoverName.FESTIVAL_ELE, this.festivalEle);
this.festivalEle = null;
......@@ -241,21 +243,21 @@ export class Element extends eui.Component {
*/
resetType(type: ElementType) {
//如果类型一致,return
if (this._type == type) return
if(this._type == type) return
//如果目标类型不是基础元素 或者原先不是基础元素
if (FiveBaseElementTypes.indexOf(type) == -1 ||
if(FiveBaseElementTypes.indexOf(type) == -1 ||
FiveBaseElementTypes.indexOf(this._type) == -1
) {
this.reset(type)
} else {
this._type = type;
//无特效,直接修改
if (this._effectType == null) {
if(this._effectType == null) {
this.changeSource("ele" + type + "_png");
}
//有特效 且不是魔力鸟的
else if (this._effectType != EffectType.MAGICLION) {
switch (this._effectType) {
else if(this._effectType != EffectType.MAGICLION) {
switch(this._effectType) {
case EffectType.HORIZONTAL:
case EffectType.VERTICAL:
this.changeSource("ele" + this.type + "Line" + "_png");
......@@ -266,7 +268,7 @@ export class Element extends eui.Component {
}
}
//如果有气泡状态,气泡也要变成相应的
if (this.hasState(StateType.BUBBLE)) {
if(this.hasState(StateType.BUBBLE)) {
this.getState(StateType.BUBBLE).reset(type);
//一样要隐藏showImage
this.showImage.alpha = 0;
......@@ -275,10 +277,9 @@ export class Element extends eui.Component {
}
private removeEffectHas() {
//回收掉原先有的
switch (this._effectType) {
switch(this._effectType) {
case EffectType.MAGICLION:
this.removeChild(this.magicLionBgAni);
Pool.recover(RecoverName.MAGICLIONBG_ANI, this.magicLionBgAni);
......@@ -324,15 +325,15 @@ export class Element extends eui.Component {
*/
setState(state: StateType, set: boolean, data?: any) {
//set为false的话,
if (!set) {
if(!set) {
//如果原先有状态,去掉
if (this.hasState(state)) {
if(this.hasState(state)) {
//自己回收,动画,然后从父级移除,最后进入pool
this.states[state].recover();
//置空
this.states[state] = null;
//如果状态是气泡,并且特效不是魔力鸟时,显示showImage,魔力鸟显示原图
if (state == StateType.BUBBLE && this.effectType != EffectType.MAGICLION) this.showImage.alpha = 1;
if(state == StateType.BUBBLE && this.effectType != EffectType.MAGICLION) this.showImage.alpha = 1;
}
//原先每状态不管
else {
......@@ -341,7 +342,7 @@ export class Element extends eui.Component {
//set为true的话
else {
//如果有状态,执行重置
if (this.hasState(state)) {
if(this.hasState(state)) {
this.states[state].reset(data);
}
//没有的话加上
......@@ -350,7 +351,7 @@ export class Element extends eui.Component {
var recoverName: RecoverName = stateData.recoverName;
var className = stateData.className;
let stateEx = Pool.takeOut(recoverName);
if (!stateEx) {
if(!stateEx) {
stateEx = new className(data);
} else {
stateEx.reset(data)
......@@ -359,7 +360,7 @@ export class Element extends eui.Component {
//视图添加
this.addChild(this.states[state]);
//气泡定制逻辑
if (state === StateType.BUBBLE) this.showImage.alpha = 0;
if(state === StateType.BUBBLE) this.showImage.alpha = 0;
}
}
}
......@@ -369,18 +370,19 @@ export class Element extends eui.Component {
* 判断是否有任何特效,true表示有,false表示没有
*/
hasAnyState(): boolean {
for (var i = 0; i < this.states.length; i++) {
if (this.states[i]) return true
for(var i = 0; i < this.states.length; i++) {
if(this.states[i]) return true
}
return false
}
/**
* 去掉所有状态
*/
removeAllState() {
for (var i = 0; i < this.states.length; i++) {
for(var i = 0; i < this.states.length; i++) {
let state = this.states[i];
if (!state) continue
if(!state) continue
//直接移除
this.removeChild(state);
//直接回收
......@@ -389,6 +391,7 @@ export class Element extends eui.Component {
this.states[i] = null;
}
}
/**
* 取得一个状态
* @param state
......@@ -409,9 +412,9 @@ export class Element extends eui.Component {
//特效加上
ele.effectType = this.effectType;
//状态加上
for (var i = 0; i < this.states.length; i++) {
for(var i = 0; i < this.states.length; i++) {
let state = this.states[i];
if (!state) continue;
if(!state) continue;
ele.setState(i, true, this.type)
}
//位置信息
......
......@@ -286,11 +286,6 @@ class Status3 extends egret.DisplayObjectContainer {
.to({ x: 86 - offset, y: 60 - offset }, 100)
.wait(500);
})
}
play(callback: Function) {
......
import { loadSvga } from "../../loadSvga";
import getResPath from "../../../libs/new_tc/getResPath";
import MovieClip from "../../movieclip/MovieClip";
/**
* 节日元素
*
*/
export class FestivalEle2 extends egret.DisplayObjectContainer {
/**
* 是否要分裂了
*/
isActive: boolean;
/**
* 状态变化 2 1 0 再往后,可分裂
*/
private _statusNum: number;
get statusNum() {
return this._statusNum
}
set statusNum(value: number) {
if(value >= 0) {
//播放原来的动画
let child = this.$children[this._statusNum];
child["play"](() => {
//切换
this.toggleStatus(value);
})
this._statusNum = value;
} else {
//不用动画
this._statusNum = 0;
this.isActive = true;
}
}
constructor(n: number = 2) {
super();
var status3 = new Status3();
this.addChild(status3);
var status2 = new Status2();
this.addChild(status2);
var status1 = new Status1();
this.addChild(status1);
this.toggleStatus(n);
this.isActive = false;
this._statusNum = n;
}
reset(n: number = 2) {
this.toggleStatus(n);
this.isActive = false;
this._statusNum = n;
}
toggleStatus(index: number) {
for(var i = 0; i < this.$children.length; i++) {
var child = this.$children[i];
if(i == index) {
child.visible = true;
//重置状态
child["reset"]();
} else {
child.visible = false;
}
}
}
}
//第一种状态
class Status1 extends egret.DisplayObjectContainer {
mv;
constructor() {
super();
loadSvga(getResPath() + 'resource/assets/svgas/铃铛01.svga').then(
(mv: egret.DisplayObject) => {
mv.x = -60;
mv.y = -60;
this.mv = mv;
this.addChild(mv);
}
);
}
reset() {
this.mv && function() {
this.mv.visible = true;
this.mv.gotoAndPlay(1, true);
}.bind(this)();
}
play(callback: Function) {
this.mv.stop();
this.mv.visible = false;
loadSvga(getResPath() + 'resource/assets/svgas/铃铛01变02.svga').then(
(mv: MovieClip) => {
mv.x = -60;
mv.y = -60;
this.addChild(mv);
mv.addEventListener(egret.Event.COMPLETE, () => {
this.removeChild(mv);
callback();
}, this);
}
);
}
}
//第二种状态
class Status2 extends egret.DisplayObjectContainer {
mv;
constructor() {
super();
loadSvga(getResPath() + 'resource/assets/svgas/铃铛02.svga').then(
(mv: egret.DisplayObject) => {
mv.x = -60;
mv.y = -60;
this.mv = mv;
this.addChild(mv);
}
);
}
reset() {
this.mv && function() {
this.mv.visible = true;
this.mv.gotoAndPlay(1, true);
}.bind(this)();
}
play(callback: Function) {
this.mv.stop();
this.mv.visible = false;
callback();
}
}
class Status3 extends egret.DisplayObjectContainer {
mv;
constructor() {
super();
loadSvga(getResPath() + 'resource/assets/svgas/铃铛03.svga').then(
(mv: egret.DisplayObject) => {
mv.x = -60;
mv.y = -60;
this.mv = mv;
this.addChild(mv);
}
);
}
reset() {
this.mv && function() {
this.mv.visible = true;
this.mv.gotoAndPlay(1, true);
}.bind(this)();
}
play(callback: Function) {
this.mv.stop();
this.mv.visible = false;
callback();
}
}
\ No newline at end of file
......@@ -28,8 +28,7 @@ export enum ElementType {
//特殊元素 ,节日元素
FESTIVALELE_BIG, //节日元素大中间一个13
FESTIVALELE_SMALL //节日元素飞溅的小元素14
FESTIVALELE_SMALL, //节日元素飞溅的小元素14
}
/**
......
......@@ -23,9 +23,10 @@ export enum RecoverName {
HAIRBALLBROWNDIVIDE_ANI = "HairballBrownDivideAni",
HAIRBALLJUMP_ANI = "HairballJumpAni", //三种毛球是一样的动画
FESREDBOMBSHOW_ANI = "FesRedBombShowAni",
FESREDBOMBSHOW2_ANI = 'FesRedBombShow2Ani',
FESREDSHOOT_ANI="FesRedShootAni",
FESREDSHOOT_ANI = "FesRedShootAni",
FESREDSHOOT_ANI2 = "FesRedShootAni",
//元素身上,特效常驻动效
......
......@@ -17,6 +17,7 @@ import { HairballBrownDivideAni } from "../anis/HairballBrownDivideAni";
import { NetManager } from "../../../libs/tw/manager/NetManager";
import { getRotByTwoVectors } from "../anis/MagicRotateAni";
import { FesRedShootAni } from "../anisCall/FesRedShootAni";
import { FesRedShootAni2 } from "../anisCall/FesRedShootAni2";
//孵鸡的数量
const chickenNum: number = 4;
......@@ -160,8 +161,10 @@ export class AiControl {
let endIndex = six[a];
let lat = thisObj.lattices[endIndex];
let ele = lat.element;
let fesRedShootAni: FesRedShootAni = Pool.takeOut(RecoverName.FESREDSHOOT_ANI)
if (!fesRedShootAni) fesRedShootAni = new FesRedShootAni();
// let fesRedShootAni: FesRedShootAni = Pool.takeOut(RecoverName.FESREDSHOOT_ANI);
// if (!fesRedShootAni) fesRedShootAni = new FesRedShootAni();
let fesRedShootAni: FesRedShootAni2 = Pool.takeOut(RecoverName.FESREDSHOOT_ANI2);
if (!fesRedShootAni) fesRedShootAni = new FesRedShootAni2();
setTimeout(() => {
thisObj.addChild(fesRedShootAni);
fesRedShootAni.play(p, ele, () => {
......
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