Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xiaoxiaole
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wildfirecode13
xiaoxiaole
Commits
deb521da
Commit
deb521da
authored
Feb 08, 2020
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
0c645983
Changes
15
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
122 additions
and
15 deletions
+122
-15
MainBase.ts
egret/libs/new_wx/MainBase.ts
+1
-0
monster_shoot.png
egret/resource/assets/mainScene/monster_shoot.png
+0
-0
monster0.svga
egret/resource/assets/svgas/monster0.svga
+0
-0
monster1.svga
egret/resource/assets/svgas/monster1.svga
+0
-0
monster2.svga
egret/resource/assets/svgas/monster2.svga
+0
-0
monster3.svga
egret/resource/assets/svgas/monster3.svga
+0
-0
monster4.svga
egret/resource/assets/svgas/monster4.svga
+0
-0
default.res.json
egret/resource/default.res.json
+6
-1
doMonsterAI.ts
egret/src/mainScene/doMonsterAI.ts
+25
-5
MapScene.ts
egret/src/mapScene/MapScene.ts
+5
-0
MonsterShootAni.ts
egret/src/something/anis/MonsterShootAni.ts
+42
-0
Element.ts
egret/src/something/class/Element.ts
+1
-1
Monster.ts
egret/src/something/class/Monster.ts
+21
-8
RecoverName.ts
egret/src/something/enum/RecoverName.ts
+1
-0
home.json
mock/happyclear/home.json
+20
-0
No files found.
egret/libs/new_wx/MainBase.ts
View file @
deb521da
...
@@ -417,6 +417,7 @@ export default class MainBase extends eui.UILayer {
...
@@ -417,6 +417,7 @@ export default class MainBase extends eui.UILayer {
"unlightedStar"
,
"unlightedStar"
,
"mainSoundBtnOff"
,
"mainSoundBtnOff"
,
"mainMusicBtnOff"
,
"mainMusicBtnOff"
,
"monster_shoot"
,
]
]
for
(
var
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
RES
.
getResAsync
(
arr
[
i
]
+
"_png"
)
RES
.
getResAsync
(
arr
[
i
]
+
"_png"
)
...
...
egret/resource/assets/mainScene/monster_shoot.png
0 → 100644
View file @
deb521da
1006 Bytes
egret/resource/assets/svgas/monster0.svga
0 → 100644
View file @
deb521da
File added
egret/resource/assets/svgas/monster1.svga
0 → 100644
View file @
deb521da
File added
egret/resource/assets/svgas/monster2.svga
0 → 100644
View file @
deb521da
File added
egret/resource/assets/svgas/monster3.svga
0 → 100644
View file @
deb521da
File added
egret/resource/assets/svgas/monster4.svga
0 → 100644
View file @
deb521da
File added
egret/resource/default.res.json
View file @
deb521da
...
@@ -97,7 +97,7 @@
...
@@ -97,7 +97,7 @@
"name"
:
"h5"
"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,ele12_png,ele13_png,xingxingbi_png,tinyRedMid_png,tinyRedLeft_png,tinyRedRight_png,rectLatWhite_png,fesRedBombSta2_png,ele14_png,redBombYStar_png,redBombBStar_png,redBombBSnow_png,线条尾部炸开_00000_png,线条尾部炸开_00001_png,线条尾部炸开_00002_png,线条尾部炸开_00003_png,线条尾部炸开_00004_png,线条尾部炸开_00005_png,线条尾部炸开_00006_png,线条尾部炸开_00007_png,线条尾部炸开_00008_png,ele15_png,ele16_png,ele17_png,ele18_png,ele19_png,ele20_png,empty_png,ele23_png,ele25_png,ele27_png,ele26_png,ele24_png,ele22_png,chocolateMark3_png,chocolateMark1_png,chocolateFour_png,chocolateMark0_png,chocolateMark2_png,ele29_png,ele29_3_png,ele29_2_png,ele29_1_png,ele29_0_png,ele28_png,ele28_3_png,ele28_2_png,ele28_1_png,ele28_0_png,ele32_png,ele32_3_png,ele32_2_png,ele32_1_png,ele32_0_png,ele31_png,ele31_3_png,ele31_2_png,ele31_1_png,ele31_0_png,ele30_png,ele30_3_png,ele30_2_png,ele30_1_png,ele30_0_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,redBombYStar_png,redBombBStar_png,redBombBSnow_png,线条尾部炸开_00000_png,线条尾部炸开_00001_png,线条尾部炸开_00002_png,线条尾部炸开_00003_png,线条尾部炸开_00004_png,线条尾部炸开_00005_png,线条尾部炸开_00006_png,线条尾部炸开_00007_png,线条尾部炸开_00008_png,ele15_png,ele16_png,ele17_png,ele18_png,ele19_png,ele20_png,empty_png,ele23_png,ele25_png,ele27_png,ele26_png,ele24_png,ele22_png,chocolateMark3_png,chocolateMark1_png,chocolateFour_png,chocolateMark0_png,chocolateMark2_png,ele29_png,ele29_3_png,ele29_2_png,ele29_1_png,ele29_0_png,ele28_png,ele28_3_png,ele28_2_png,ele28_1_png,ele28_0_png,ele32_png,ele32_3_png,ele32_2_png,ele32_1_png,ele32_0_png,ele31_png,ele31_3_png,ele31_2_png,ele31_1_png,ele31_0_png,ele30_png,ele30_3_png,ele30_2_png,ele30_1_png,ele30_0_png
,monster_shoot_png
"
,
"name"
:
"main2"
"name"
:
"main2"
},
},
{
{
...
@@ -4462,6 +4462,11 @@
...
@@ -4462,6 +4462,11 @@
"url"
:
"assets/mainScene/ele28_0.png"
,
"url"
:
"assets/mainScene/ele28_0.png"
,
"type"
:
"image"
,
"type"
:
"image"
,
"name"
:
"ele28_0_png"
"name"
:
"ele28_0_png"
},
{
"url"
:
"assets/mainScene/monster_shoot.png"
,
"type"
:
"image"
,
"name"
:
"monster_shoot_png"
}
}
]
]
}
}
\ No newline at end of file
egret/src/mainScene/doMonsterAI.ts
View file @
deb521da
...
@@ -3,10 +3,14 @@ import { StateType } from "../something/enum/StateType";
...
@@ -3,10 +3,14 @@ import { StateType } from "../something/enum/StateType";
import
MainScene
from
"./MainScene"
;
import
MainScene
from
"./MainScene"
;
import
{
Tool
}
from
"../something/Tool"
;
import
{
Tool
}
from
"../something/Tool"
;
import
{
EffectType
}
from
"../something/enum/EffectType"
;
import
{
EffectType
}
from
"../something/enum/EffectType"
;
import
wait
from
"../../libs/new_tc/wait"
;
import
{
MonsterShootAni
,
monstShootAniDur
}
from
"../something/anis/MonsterShootAni"
;
import
{
RecoverName
}
from
"../something/enum/RecoverName"
;
import
{
Pool
}
from
"../something/Pool"
;
/**
/**
* 独眼怪爆炸
* 独眼怪爆炸
*/
*/
export
default
(
thisObj
:
MainScene
)
=>
{
export
default
async
(
thisObj
:
MainScene
)
=>
{
//先找出所有激活的怪物
//先找出所有激活的怪物
const
awakeMonsterIndexs
:
number
[]
=
[];
const
awakeMonsterIndexs
:
number
[]
=
[];
for
(
var
i
=
0
;
i
<
thisObj
.
lattices
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
thisObj
.
lattices
.
length
;
i
++
)
{
...
@@ -17,7 +21,7 @@ export default (thisObj: MainScene) => {
...
@@ -17,7 +21,7 @@ export default (thisObj: MainScene) => {
}
}
}
}
//遍历所有基础元素
//遍历所有基础元素
const
baseElements
:
Element
[]
=
[];
const
baseElements
:
Element
[]
=
[];
for
(
var
i
=
Tool
.
colNum
*
Tool
.
rowNum
-
1
;
i
>=
0
;
i
--
)
{
for
(
var
i
=
Tool
.
colNum
*
Tool
.
rowNum
-
1
;
i
>=
0
;
i
--
)
{
var
lat
=
thisObj
.
lattices
[
i
];
var
lat
=
thisObj
.
lattices
[
i
];
if
(
Tool
.
judgeBaseEle
(
lat
)
&&
if
(
Tool
.
judgeBaseEle
(
lat
)
&&
...
@@ -31,10 +35,10 @@ export default (thisObj: MainScene) => {
...
@@ -31,10 +35,10 @@ export default (thisObj: MainScene) => {
return
(
0.5
-
Math
.
random
());
return
(
0.5
-
Math
.
random
());
});
});
let
genarateEffect
:
Element
[]
=
[];
//生成的特效的列表
let
genarateEffect
:
Element
[]
=
[];
//生成的特效的列表
const
activeMosterEles
:
Element
[]
=
awakeMonsterIndexs
.
map
(
i
=>
thisObj
.
lattices
[
i
].
element
);
const
activeMosterEles
:
Element
[]
=
awakeMonsterIndexs
.
map
(
i
=>
thisObj
.
lattices
[
i
].
element
);
const
foundsResult
:
Element
[][]
=
[];
const
foundsResult
:
Element
[][]
=
[];
//遍历激活的怪物
//遍历激活的怪物
for
(
let
index
=
0
;
index
<
activeMosterEles
.
length
;
index
++
)
{
for
(
let
index
=
0
;
index
<
activeMosterEles
.
length
;
index
++
)
{
const
monsterEle
=
activeMosterEles
[
index
];
const
monsterEle
=
activeMosterEles
[
index
];
...
@@ -45,9 +49,25 @@ export default (thisObj: MainScene) => {
...
@@ -45,9 +49,25 @@ export default (thisObj: MainScene) => {
foundsResult
[
index
]
=
founds
;
foundsResult
[
index
]
=
founds
;
}
}
for
(
let
index
=
0
;
index
<
activeMosterEles
.
length
;
index
++
)
{
const
monsterEle
=
activeMosterEles
[
index
];
//找到相同颜色的元素
let
founds
=
foundsResult
[
index
];
founds
.
forEach
((
ele
)
=>
{
let
bonusShootAni
:
MonsterShootAni
=
Pool
.
takeOut
(
RecoverName
.
MONSTER_SHOOT_ANI
);
if
(
!
bonusShootAni
)
bonusShootAni
=
new
MonsterShootAni
();
var
r
=
Tool
.
getForwardRotation
([
monsterEle
.
x
,
monsterEle
.
y
],
[
ele
.
x
,
ele
.
y
])
bonusShootAni
.
play
(
r
*
180
/
Math
.
PI
,
[
monsterEle
.
x
,
monsterEle
.
y
],
[
ele
.
x
,
ele
.
y
],
()
=>
{
});
thisObj
.
addChild
(
bonusShootAni
);
});
}
if
(
genarateEffect
.
length
>
0
)
await
wait
(
monstShootAniDur
);
for
(
let
index
=
0
;
index
<
foundsResult
.
length
;
index
++
)
{
for
(
let
index
=
0
;
index
<
foundsResult
.
length
;
index
++
)
{
const
founds
=
foundsResult
[
index
];
const
founds
=
foundsResult
[
index
];
founds
.
forEach
(
ele
=>
{
founds
.
forEach
(
ele
=>
{
ele
.
effectType
=
Math
.
random
()
>
0.5
?
EffectType
.
HORIZONTAL
:
EffectType
.
VERTICAL
;
ele
.
effectType
=
Math
.
random
()
>
0.5
?
EffectType
.
HORIZONTAL
:
EffectType
.
VERTICAL
;
});
});
activeMosterEles
[
index
].
monster
.
resetStatus
();
activeMosterEles
[
index
].
monster
.
resetStatus
();
...
...
egret/src/mapScene/MapScene.ts
View file @
deb521da
...
@@ -369,6 +369,11 @@ export default class MapScene extends Scene {
...
@@ -369,6 +369,11 @@ export default class MapScene extends Scene {
RES
.
getResAsync
(
'hbRule_bg_png'
);
RES
.
getResAsync
(
'hbRule_bg_png'
);
loadSvga
(
getResPath
()
+
'resource/assets/svgas/monster1.svga'
);
loadSvga
(
getResPath
()
+
'resource/assets/svgas/monster2.svga'
);
loadSvga
(
getResPath
()
+
'resource/assets/svgas/monster3.svga'
);
loadSvga
(
getResPath
()
+
'resource/assets/svgas/monster4.svga'
);
loadSvga
(
getResPath
()
+
'resource/assets/svgas/monster5.svga'
);
loadSvga
(
getResPath
()
+
'resource/assets/svgas/box.svga'
);
loadSvga
(
getResPath
()
+
'resource/assets/svgas/box.svga'
);
loadSvga
(
getResPath
()
+
'resource/assets/svgas/invite.svga'
);
loadSvga
(
getResPath
()
+
'resource/assets/svgas/invite.svga'
);
loadSvga
(
getResPath
()
+
'resource/assets/svgas/turntable.svga'
);
loadSvga
(
getResPath
()
+
'resource/assets/svgas/turntable.svga'
);
...
...
egret/src/something/anis/MonsterShootAni.ts
0 → 100644
View file @
deb521da
import
{
ImageAni
}
from
"../class/ImageAni"
;
import
{
Pool
}
from
"../Pool"
;
import
{
RecoverName
}
from
"../enum/RecoverName"
;
import
{
playSound
,
SoundType
}
from
"../../soundCtrl"
;
export
const
monstShootAniDur
:
number
=
500
;
/**
* 需要回调的
* 手动修改this.shoot.rotation=
*/
export
class
MonsterShootAni
extends
egret
.
DisplayObjectContainer
{
shoot
:
egret
.
Bitmap
;
// imageAni: ImageAni
constructor
()
{
super
()
var
texture
=
RES
.
getRes
(
"monster_shoot_png"
)
this
.
shoot
=
new
egret
.
Bitmap
(
texture
);
this
.
shoot
.
anchorOffsetX
=
87
;
this
.
shoot
.
anchorOffsetY
=
28
/
2
;
this
.
addChild
(
this
.
shoot
);
}
private
reset
(
p
:
number
[])
{
this
.
x
=
p
[
0
];
this
.
y
=
p
[
1
];
}
play
(
rotation
:
number
,
from
:
number
[],
p
:
number
[],
callback
:
Function
)
{
this
.
reset
(
from
)
this
.
shoot
.
rotation
=
rotation
;
egret
.
Tween
.
get
(
this
)
.
to
({
x
:
p
[
0
],
y
:
p
[
1
]
},
monstShootAniDur
)
.
call
(()
=>
{
callback
();
if
(
this
.
parent
)
{
this
.
parent
.
removeChild
(
this
)
};
Pool
.
recover
(
RecoverName
.
MONSTER_SHOOT_ANI
,
this
)
})
}
}
\ No newline at end of file
egret/src/something/class/Element.ts
View file @
deb521da
...
@@ -137,7 +137,7 @@ export class Element extends eui.Component {
...
@@ -137,7 +137,7 @@ export class Element extends eui.Component {
resetToMonsterView
(
res
:
ElementType
)
{
resetToMonsterView
(
res
:
ElementType
)
{
this
.
changeSource
(
"ele"
+
res
+
"_png"
);
this
.
changeSource
(
"ele"
+
res
+
"_png"
);
this
.
monster
=
new
Monster
(
res
);
this
.
monster
=
new
Monster
(
res
,
this
.
type
);
this
.
addChild
(
this
.
monster
);
this
.
addChild
(
this
.
monster
);
this
.
showImage
.
alpha
=
0
;
this
.
showImage
.
alpha
=
0
;
}
}
...
...
egret/src/something/class/Monster.ts
View file @
deb521da
import
{
ElementType
}
from
"../enum/ElementType"
;
import
{
ElementType
}
from
"../enum/ElementType"
;
import
{
loadSvga
}
from
"../../loadSvga"
;
import
getResPath
from
"../../../libs/new_tc/getResPath"
;
export
class
Monster
extends
eui
.
Component
{
export
class
Monster
extends
eui
.
Component
{
nextStatus
()
{
nextStatus
()
{
this
.
_statusNum
++
;
this
.
_statusNum
++
;
...
@@ -18,32 +20,43 @@ export class Monster extends eui.Component {
...
@@ -18,32 +20,43 @@ export class Monster extends eui.Component {
return
this
.
_statusNum
==
4
;
return
this
.
_statusNum
==
4
;
}
}
private
showImage
:
eui
.
Image
;
//
private showImage: eui.Image;
/**
/**
* 状态变化 0,1,2,3
* 状态变化 0,1,2,3
*/
*/
private
_statusNum
:
number
;
private
_statusNum
:
number
;
res
:
ElementType
;
res
:
ElementType
;
_mv
;
getRes
()
{
getRes
()
{
return
`ele
${
this
.
res
}
_
${
this
.
_statusNum
}
_png`
;
return
`ele
${
this
.
res
}
_
${
this
.
_statusNum
}
_png`
;
}
}
constructor
(
res
:
ElementType
,
n
:
number
=
0
)
{
type
;
constructor
(
res
:
ElementType
,
type
:
number
,
n
:
number
=
0
)
{
super
();
super
();
this
.
touchEnabled
=
this
.
touchChildren
=
false
;
this
.
res
=
res
;
this
.
res
=
res
;
this
.
showImage
=
new
eui
.
Image
();
this
.
type
=
type
;
this
.
addChild
(
this
.
showImage
)
// this.showImage = new eui.Image();
// this.addChild(this.showImage)
this
.
_statusNum
=
n
;
this
.
_statusNum
=
n
;
this
.
changeSource
();
this
.
changeSource
();
this
.
initSvga
();
}
async
initSvga
()
{
const
mv
:
any
=
await
loadSvga
(
getResPath
()
+
'resource/assets/svgas/monster'
+
this
.
type
+
'.svga'
);
this
.
_mv
=
mv
;
this
.
addChild
(
mv
);
mv
.
anchorOffsetX
=
87
/
2
;
mv
.
anchorOffsetY
=
92
/
2
;
}
}
changeSource
()
{
changeSource
()
{
const
source
=
this
.
getRes
();
const
source
=
this
.
getRes
();
var
texture
:
egret
.
Texture
=
RES
.
getRes
(
source
);
var
texture
:
egret
.
Texture
=
RES
.
getRes
(
source
);
this
.
showImage
.
texture
=
texture
;
//
this.showImage.texture = texture;
this
.
showImage
.
anchorOffsetX
=
texture
.
textureWidth
/
2
;
//
this.showImage.anchorOffsetX = texture.textureWidth / 2;
this
.
showImage
.
anchorOffsetY
=
texture
.
textureHeight
/
2
;
//
this.showImage.anchorOffsetY = texture.textureHeight / 2;
}
}
// shakeAni() {
// shakeAni() {
// this.showImage.rotation = 0;
// this.showImage.rotation = 0;
...
...
egret/src/something/enum/RecoverName.ts
View file @
deb521da
...
@@ -17,6 +17,7 @@ export enum RecoverName {
...
@@ -17,6 +17,7 @@ export enum RecoverName {
//带回调的动画,和不带的合并不了,因为可能还有其他参数
//带回调的动画,和不带的合并不了,因为可能还有其他参数
BONUSSHOOT_ANI
=
"BonusShootAni"
,
BONUSSHOOT_ANI
=
"BonusShootAni"
,
MONSTER_SHOOT_ANI
=
"MONSTER_SHOOT_ANI"
,
JELLYSPREAD_ANI
=
"JellySpreadAni"
,
JELLYSPREAD_ANI
=
"JellySpreadAni"
,
PIECETOEGG_ANI
=
"PieceToEggAni"
,
PIECETOEGG_ANI
=
"PieceToEggAni"
,
BUBBLE_ANI
=
"BubbleAni"
,
BUBBLE_ANI
=
"BubbleAni"
,
...
...
mock/happyclear/home.json
View file @
deb521da
...
@@ -1892,6 +1892,26 @@
...
@@ -1892,6 +1892,26 @@
"levelNum"
:
376
,
"levelNum"
:
376
,
"maxScore"
:
47440
,
"maxScore"
:
47440
,
"stars"
:
1
"stars"
:
1
},
{
"levelNum"
:
377
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
378
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
379
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
380
,
"maxScore"
:
47440
,
"stars"
:
1
}
}
],
],
"remainProp"
:
[
"remainProp"
:
[
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment