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
Show 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 {
...
@@ -456,7 +456,7 @@ export default class MainBase extends eui.UILayer {
this
.
hcHome
(),
this
.
hcHome
(),
this
.
hc_userInfo
(),
this
.
hc_userInfo
(),
// this.getBackReward(),
// this.getBackReward(),
this
.
hcRedBoobBaseInfo
(),
//
this.hcRedBoobBaseInfo(),
]);
]);
MapScene
.
adData
=
DataManager
.
ins
.
getData
(
'hc_advert'
);
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';
...
@@ -66,6 +66,7 @@ import { CurScoreNum } from '../something/uis/CurScoreNum';
import
{
FestivalTarget
}
from
'../something/uis/FestivalTarget'
;
import
{
FestivalTarget
}
from
'../something/uis/FestivalTarget'
;
import
getRedBombAward
,
{
getRedBombTimes
}
from
'../getRedBombAward'
;
import
getRedBombAward
,
{
getRedBombTimes
}
from
'../getRedBombAward'
;
import
{
FesRedBombShowAni
}
from
'../something/anisCall/FesRedBombShowAni'
;
import
{
FesRedBombShowAni
}
from
'../something/anisCall/FesRedBombShowAni'
;
import
{
RectsWaveAni
}
from
'../something/anisCall/RectsWaveAni'
;
const
aniClass
=
{
const
aniClass
=
{
"BoomAni"
:
BoomAni
,
"BoomAni"
:
BoomAni
,
...
@@ -702,7 +703,7 @@ export default class MainScene extends Scene {
...
@@ -702,7 +703,7 @@ export default class MainScene extends Scene {
//添加节日元素,条件可能会变
//添加节日元素,条件可能会变
if
(
fesChapterData
.
indexOf
(
this
.
chapter
>>
0
)
>
-
1
&&
if
(
fesChapterData
.
indexOf
(
this
.
chapter
>>
0
)
>
-
1
&&
getRedBombTimes
()
&&
getRedBombTimes
()
&&
Math
.
random
()
>
0.5
&&
//
Math.random() > 0.5 &&
this
.
lattices
[
festivalIndex
]
&&
//格子必须有
this
.
lattices
[
festivalIndex
]
&&
//格子必须有
(
Tool
.
judgeSetFesEle
(
this
.
lattices
[
festivalIndex
])
||
!
this
.
lattices
[
festivalIndex
].
element
)
//没有元素也行
(
Tool
.
judgeSetFesEle
(
this
.
lattices
[
festivalIndex
])
||
!
this
.
lattices
[
festivalIndex
].
element
)
//没有元素也行
)
{
)
{
...
@@ -728,6 +729,7 @@ export default class MainScene extends Scene {
...
@@ -728,6 +729,7 @@ export default class MainScene extends Scene {
this
.
lattices
[
festivalIndex
].
element
.
visible
=
false
;
this
.
lattices
[
festivalIndex
].
element
.
visible
=
false
;
ani
.
play
(
p
,
()
=>
{
ani
.
play
(
p
,
()
=>
{
this
.
lattices
[
festivalIndex
].
element
.
visible
=
true
;
this
.
lattices
[
festivalIndex
].
element
.
visible
=
true
;
RectsWaveAni
(
this
.
lattices
,
this
.
map
)
//检查三消
//检查三消
if
(
this
.
threeMatch
())
{
if
(
this
.
threeMatch
())
{
this
.
eliminate
();
this
.
eliminate
();
...
...
egret/src/panels/RedBombAlertPanel.ts
View file @
498edfca
...
@@ -6,6 +6,7 @@ import RedBombRule from "./RedBombRule";
...
@@ -6,6 +6,7 @@ import RedBombRule from "./RedBombRule";
import
{
getRedBombTimes
}
from
"../getRedBombAward"
;
import
{
getRedBombTimes
}
from
"../getRedBombAward"
;
import
{
loadSvga
}
from
"../loadSvga"
;
import
{
loadSvga
}
from
"../loadSvga"
;
import
getResPath
from
"../../libs/new_tc/getResPath"
;
import
getResPath
from
"../../libs/new_tc/getResPath"
;
import
{
DataManager
}
from
"../../libs/tw/manager/DataManager"
;
export
default
class
RedBombAlertPanel
extends
Panel
{
export
default
class
RedBombAlertPanel
extends
Panel
{
async
start
(
data
)
{
async
start
(
data
)
{
...
@@ -24,7 +25,12 @@ export default class RedBombAlertPanel extends Panel {
...
@@ -24,7 +25,12 @@ export default class RedBombAlertPanel extends Panel {
mv
.
once
(
egret
.
Event
.
COMPLETE
,
()
=>
{
mv
.
once
(
egret
.
Event
.
COMPLETE
,
()
=>
{
mv
.
stop
();
mv
.
stop
();
this
.
removeChild
(
mv
);
this
.
removeChild
(
mv
);
const
data
=
DataManager
.
ins
.
getData
(
'hc_redBombAward'
).
data
;
if
(
data
){
this
.
playPrizeAni
();
}
else
{
this
.
playNoPrizeAni
();
this
.
playNoPrizeAni
();
}
},
this
);
},
this
);
});
});
...
@@ -33,6 +39,8 @@ export default class RedBombAlertPanel extends Panel {
...
@@ -33,6 +39,8 @@ export default class RedBombAlertPanel extends Panel {
playNoPrizeAni
(){
playNoPrizeAni
(){
loadSvga
(
getResPath
()
+
'resource/assets/svgas/redbomb_noprize.svga'
).
then
(
async
(
mv
:
any
)
=>
{
loadSvga
(
getResPath
()
+
'resource/assets/svgas/redbomb_noprize.svga'
).
then
(
async
(
mv
:
any
)
=>
{
//去掉文案
egret
.
Tween
.
get
(
this
[
'group'
]).
to
({
alpha
:
0
},
300
);
this
.
addChild
(
mv
);
this
.
addChild
(
mv
);
mv
.
once
(
egret
.
Event
.
COMPLETE
,
()
=>
{
mv
.
once
(
egret
.
Event
.
COMPLETE
,
()
=>
{
mv
.
stop
();
mv
.
stop
();
...
@@ -40,6 +48,21 @@ export default class RedBombAlertPanel extends Panel {
...
@@ -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
()
{
showlog
()
{
}
}
...
...
egret/src/something/anisCall/FesRedBombShowAni.ts
View file @
498edfca
...
@@ -32,7 +32,5 @@ export class FesRedBombShowAni extends egret.DisplayObjectContainer {
...
@@ -32,7 +32,5 @@ export class FesRedBombShowAni extends egret.DisplayObjectContainer {
Pool
.
recover
(
RecoverName
.
FESREDBOMBSHOW_ANI
,
this
);
Pool
.
recover
(
RecoverName
.
FESREDBOMBSHOW_ANI
,
this
);
callback
()
callback
()
})
})
//波纹动效再说,现在来不及
}
}
}
}
\ No newline at end of file
egret/src/something/anisCall/RectsWaveAni.ts
View file @
498edfca
...
@@ -21,15 +21,18 @@ export function RectsWaveAni(
...
@@ -21,15 +21,18 @@ export function RectsWaveAni(
var
num
=
0
;
var
num
=
0
;
var
maxNum
=
Math
.
max
(
rc
[
0
],
rc
[
1
],
Tool
.
rowNum
-
rc
[
0
]
-
1
,
Tool
.
colNum
-
rc
[
1
]
-
1
)
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
indexs
:
number
[]
=
[];
if
(
num
)
{
var
rowMax
=
rc
[
0
]
+
num
;
var
rowMax
=
rc
[
0
]
+
num
;
var
rowMin
=
rc
[
0
]
-
num
;
var
rowMin
=
rc
[
0
]
-
num
;
var
colMax
=
rc
[
1
]
+
num
;
var
colMax
=
rc
[
1
]
+
num
;
var
colMin
=
rc
[
1
]
-
num
;
var
colMin
=
rc
[
1
]
-
num
;
num
++
;
var
colIndexs
=
rangeIndexs
(
var
colIndexs
=
rangeIndexs
(
colMin
>=
0
?
colMin
:
0
,
colMin
>=
0
?
colMin
:
0
,
...
@@ -57,17 +60,20 @@ export function RectsWaveAni(
...
@@ -57,17 +60,20 @@ export function RectsWaveAni(
//左边
//左边
if
(
colMin
>=
0
)
{
if
(
colMin
>=
0
)
{
for
(
var
i
=
0
;
i
<
rowIndexs
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
rowIndexs
.
length
;
i
++
)
{
var
index
=
Tool
.
rcToIndex
(
colMin
,
rowIndexs
[
i
]
);
var
index
=
Tool
.
rcToIndex
(
rowIndexs
[
i
],
colMin
);
if
(
lattices
[
index
])
indexs
.
push
(
index
)
if
(
lattices
[
index
])
indexs
.
push
(
index
)
}
}
}
}
//右边
//右边
if
(
colMax
<
Tool
.
colNum
)
{
if
(
colMax
<
Tool
.
colNum
)
{
for
(
var
i
=
0
;
i
<
rowIndexs
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
rowIndexs
.
length
;
i
++
)
{
var
index
=
Tool
.
rcToIndex
(
colMax
,
rowIndexs
[
i
]
);
var
index
=
Tool
.
rcToIndex
(
rowIndexs
[
i
],
colMax
);
if
(
lattices
[
index
])
indexs
.
push
(
index
)
if
(
lattices
[
index
])
indexs
.
push
(
index
)
}
}
}
}
}
else
{
indexs
.
push
(
centerIndex
)
}
var
loop
=
[]
var
loop
=
[]
//根据索引
//根据索引
for
(
var
i
=
0
;
i
<
indexs
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
indexs
.
length
;
i
++
)
{
...
@@ -83,9 +89,33 @@ export function RectsWaveAni(
...
@@ -83,9 +89,33 @@ export function RectsWaveAni(
}
}
//总
//总
loops
.
push
(
loop
);
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
{
class
WhiteRect
extends
egret
.
Bitmap
{
...
@@ -93,8 +123,8 @@ class WhiteRect extends egret.Bitmap {
...
@@ -93,8 +123,8 @@ class WhiteRect extends egret.Bitmap {
super
();
super
();
var
texture
:
egret
.
Texture
=
RES
.
getRes
(
"rectLatWhite_png"
);
var
texture
:
egret
.
Texture
=
RES
.
getRes
(
"rectLatWhite_png"
);
this
.
texture
=
texture
;
this
.
texture
=
texture
;
this
.
x
=
-
texture
.
textureWidth
/
2
;
this
.
anchorOffsetX
=
texture
.
textureWidth
/
2
;
this
.
y
=
-
texture
.
textureHeight
/
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