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
498edfca
Commit
498edfca
authored
Nov 08, 2019
by
wjf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
l
parent
d9e23f9b
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
99 additions
and
46 deletions
+99
-46
MainBase.ts
egret/libs/new_wx/MainBase.ts
+1
-1
svga.egret.min2.js
egret/libs/svga.egret.min2.js
+1
-1
MainScene.ts
egret/src/mainScene/MainScene.ts
+3
-1
RedBombAlertPanel.ts
egret/src/panels/RedBombAlertPanel.ts
+24
-1
FesRedBombShowAni.ts
egret/src/something/anisCall/FesRedBombShowAni.ts
+0
-2
RectsWaveAni.ts
egret/src/something/anisCall/RectsWaveAni.ts
+70
-40
No files found.
egret/libs/new_wx/MainBase.ts
View file @
498edfca
...
...
@@ -456,7 +456,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'
);
...
...
egret/libs/svga.egret.min2.js
View file @
498edfca
This source diff could not be displayed because it is too large. You can
view the blob
instead.
egret/src/mainScene/MainScene.ts
View file @
498edfca
...
...
@@ -66,6 +66,7 @@ import { CurScoreNum } from '../something/uis/CurScoreNum';
import
{
FestivalTarget
}
from
'../something/uis/FestivalTarget'
;
import
getRedBombAward
,
{
getRedBombTimes
}
from
'../getRedBombAward'
;
import
{
FesRedBombShowAni
}
from
'../something/anisCall/FesRedBombShowAni'
;
import
{
RectsWaveAni
}
from
'../something/anisCall/RectsWaveAni'
;
const
aniClass
=
{
"BoomAni"
:
BoomAni
,
...
...
@@ -702,7 +703,7 @@ export default class MainScene extends Scene {
//添加节日元素,条件可能会变
if
(
fesChapterData
.
indexOf
(
this
.
chapter
>>
0
)
>
-
1
&&
getRedBombTimes
()
&&
Math
.
random
()
>
0.5
&&
//
Math.random() > 0.5 &&
this
.
lattices
[
festivalIndex
]
&&
//格子必须有
(
Tool
.
judgeSetFesEle
(
this
.
lattices
[
festivalIndex
])
||
!
this
.
lattices
[
festivalIndex
].
element
)
//没有元素也行
)
{
...
...
@@ -728,6 +729,7 @@ export default class MainScene extends Scene {
this
.
lattices
[
festivalIndex
].
element
.
visible
=
false
;
ani
.
play
(
p
,
()
=>
{
this
.
lattices
[
festivalIndex
].
element
.
visible
=
true
;
RectsWaveAni
(
this
.
lattices
,
this
.
map
)
//检查三消
if
(
this
.
threeMatch
())
{
this
.
eliminate
();
...
...
egret/src/panels/RedBombAlertPanel.ts
View file @
498edfca
...
...
@@ -6,6 +6,7 @@ import RedBombRule from "./RedBombRule";
import
{
getRedBombTimes
}
from
"../getRedBombAward"
;
import
{
loadSvga
}
from
"../loadSvga"
;
import
getResPath
from
"../../libs/new_tc/getResPath"
;
import
{
DataManager
}
from
"../../libs/tw/manager/DataManager"
;
export
default
class
RedBombAlertPanel
extends
Panel
{
async
start
(
data
)
{
...
...
@@ -24,7 +25,12 @@ export default class RedBombAlertPanel extends Panel {
mv
.
once
(
egret
.
Event
.
COMPLETE
,
()
=>
{
mv
.
stop
();
this
.
removeChild
(
mv
);
this
.
playNoPrizeAni
();
const
data
=
DataManager
.
ins
.
getData
(
'hc_redBombAward'
).
data
;
if
(
data
){
this
.
playPrizeAni
();
}
else
{
this
.
playNoPrizeAni
();
}
},
this
);
});
...
...
@@ -33,6 +39,8 @@ export default class RedBombAlertPanel extends Panel {
playNoPrizeAni
(){
loadSvga
(
getResPath
()
+
'resource/assets/svgas/redbomb_noprize.svga'
).
then
(
async
(
mv
:
any
)
=>
{
//去掉文案
egret
.
Tween
.
get
(
this
[
'group'
]).
to
({
alpha
:
0
},
300
);
this
.
addChild
(
mv
);
mv
.
once
(
egret
.
Event
.
COMPLETE
,
()
=>
{
mv
.
stop
();
...
...
@@ -40,6 +48,21 @@ export default class RedBombAlertPanel extends Panel {
});
}
playPrizeAni
(){
loadSvga
(
getResPath
()
+
'resource/assets/svgas/redbomb_prize.svga'
).
then
(
async
(
mv
:
any
)
=>
{
//去掉文案
egret
.
Tween
.
get
(
this
[
'group'
]).
to
({
alpha
:
0
},
300
);
this
.
addChild
(
mv
);
mv
.
once
(
egret
.
Event
.
COMPLETE
,
()
=>
{
mv
.
stop
();
},
this
);
setTimeout
(()
=>
{
mv
.
setImage
(
"img_2349"
,
"//yun.dui88.com/images/201910/e6pmpk2pne.png"
)
},
100
)
});
}
showlog
()
{
}
...
...
egret/src/something/anisCall/FesRedBombShowAni.ts
View file @
498edfca
...
...
@@ -32,7 +32,5 @@ export class FesRedBombShowAni extends egret.DisplayObjectContainer {
Pool
.
recover
(
RecoverName
.
FESREDBOMBSHOW_ANI
,
this
);
callback
()
})
//波纹动效再说,现在来不及
}
}
\ No newline at end of file
egret/src/something/anisCall/RectsWaveAni.ts
View file @
498edfca
...
...
@@ -21,52 +21,58 @@ export function RectsWaveAni(
var
num
=
0
;
var
maxNum
=
Math
.
max
(
rc
[
0
],
rc
[
1
],
Tool
.
rowNum
-
rc
[
0
]
-
1
,
Tool
.
colNum
-
rc
[
1
]
-
1
)
//所有格子都填上
while
(
num
<
maxNum
)
{
while
(
num
<
=
maxNum
)
{
//每一圈所有格子索引
var
indexs
:
number
[]
=
[];
var
rowMax
=
rc
[
0
]
+
num
;
var
rowMin
=
rc
[
0
]
-
num
;
var
colMax
=
rc
[
1
]
+
num
;
var
colMin
=
rc
[
1
]
-
num
;
num
++
;
if
(
num
)
{
var
rowMax
=
rc
[
0
]
+
num
;
var
rowMin
=
rc
[
0
]
-
num
;
var
colMax
=
rc
[
1
]
+
num
;
var
colMin
=
rc
[
1
]
-
num
;
var
colIndexs
=
rangeIndexs
(
colMin
>=
0
?
colMin
:
0
,
colMax
<
Tool
.
colNum
?
colMax
:
Tool
.
colNum
-
1
)
var
rowIndexs
=
rangeIndexs
(
rowMin
>=
0
?
rowMin
:
0
,
rowMax
<
Tool
.
rowNum
?
rowMax
:
Tool
.
rowNum
-
1
,
false
)
//上排,行数一致,列数在之内
if
(
rowMin
>=
0
)
{
for
(
var
i
=
0
;
i
<
colIndexs
.
length
;
i
++
)
{
var
index
=
Tool
.
rcToIndex
(
rowMin
,
colIndexs
[
i
]);
if
(
lattices
[
index
])
indexs
.
push
(
index
)
var
colIndexs
=
rangeIndexs
(
colMin
>=
0
?
colMin
:
0
,
colMax
<
Tool
.
colNum
?
colMax
:
Tool
.
colNum
-
1
)
var
rowIndexs
=
rangeIndexs
(
rowMin
>=
0
?
rowMin
:
0
,
rowMax
<
Tool
.
rowNum
?
rowMax
:
Tool
.
rowNum
-
1
,
false
)
//上排,行数一致,列数在之内
if
(
rowMin
>=
0
)
{
for
(
var
i
=
0
;
i
<
colIndexs
.
length
;
i
++
)
{
var
index
=
Tool
.
rcToIndex
(
rowMin
,
colIndexs
[
i
]);
if
(
lattices
[
index
])
indexs
.
push
(
index
)
}
}
}
//下排
if
(
rowMax
<
Tool
.
rowNum
)
{
for
(
var
i
=
0
;
i
<
colIndexs
.
length
;
i
++
)
{
var
index
=
Tool
.
rcToIndex
(
rowMax
,
colIndexs
[
i
]);
if
(
lattices
[
index
])
indexs
.
push
(
index
)
//下排
if
(
rowMax
<
Tool
.
rowNum
)
{
for
(
var
i
=
0
;
i
<
colIndexs
.
length
;
i
++
)
{
var
index
=
Tool
.
rcToIndex
(
rowMax
,
colIndexs
[
i
]);
if
(
lattices
[
index
])
indexs
.
push
(
index
)
}
}
}
//左边
if
(
colMin
>=
0
)
{
for
(
var
i
=
0
;
i
<
rowIndexs
.
length
;
i
++
)
{
var
index
=
Tool
.
rcToIndex
(
colMin
,
rowIndexs
[
i
]);
if
(
lattices
[
index
])
indexs
.
push
(
index
)
//左边
if
(
colMin
>=
0
)
{
for
(
var
i
=
0
;
i
<
rowIndexs
.
length
;
i
++
)
{
var
index
=
Tool
.
rcToIndex
(
rowIndexs
[
i
],
colMin
);
if
(
lattices
[
index
])
indexs
.
push
(
index
)
}
}
}
//右边
if
(
colMax
<
Tool
.
colNum
)
{
for
(
var
i
=
0
;
i
<
rowIndexs
.
length
;
i
++
)
{
var
index
=
Tool
.
rcToIndex
(
colMax
,
rowIndexs
[
i
]);
if
(
lattices
[
index
])
indexs
.
push
(
index
)
//右边
if
(
colMax
<
Tool
.
colNum
)
{
for
(
var
i
=
0
;
i
<
rowIndexs
.
length
;
i
++
)
{
var
index
=
Tool
.
rcToIndex
(
rowIndexs
[
i
],
colMax
);
if
(
lattices
[
index
])
indexs
.
push
(
index
)
}
}
}
else
{
indexs
.
push
(
centerIndex
)
}
var
loop
=
[]
//根据索引
...
...
@@ -83,9 +89,33 @@ export function RectsWaveAni(
}
//总
loops
.
push
(
loop
);
// console.log(indexs)
num
++
;
}
//动画
let
loopsLen
=
loops
.
length
for
(
let
m
=
0
;
m
<
loops
.
length
;
m
++
)
{
let
loop
=
loops
[
m
];
let
wait
=
m
*
100
;
let
loopLen
=
loop
.
length
;
for
(
let
n
=
0
;
n
<
loop
.
length
;
n
++
)
{
let
rect
=
loop
[
n
];
egret
.
Tween
.
get
(
rect
)
.
wait
(
wait
)
.
to
({
alpha
:
1
},
150
)
.
to
({
alpha
:
0
},
150
)
.
call
(()
=>
{
//回收
if
(
rect
.
parent
){
rect
.
parent
.
removeChild
(
rect
);
whiteRectPool
.
push
(
rect
);
}
if
(
m
==
loopsLen
-
1
&&
n
==
loopLen
-
1
&&
callback
)
callback
();
})
}
}
}
class
WhiteRect
extends
egret
.
Bitmap
{
...
...
@@ -93,8 +123,8 @@ class WhiteRect extends egret.Bitmap {
super
();
var
texture
:
egret
.
Texture
=
RES
.
getRes
(
"rectLatWhite_png"
);
this
.
texture
=
texture
;
this
.
x
=
-
texture
.
textureWidth
/
2
;
this
.
y
=
-
texture
.
textureHeight
/
2
;
this
.
anchorOffsetX
=
texture
.
textureWidth
/
2
;
this
.
anchorOffsetY
=
texture
.
textureHeight
/
2
;
}
}
...
...
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