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
02ce9d89
Commit
02ce9d89
authored
May 12, 2020
by
zjz1994
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
节日暂存
parent
06af51f8
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
78 additions
and
11 deletions
+78
-11
titimg1.png
egret/resource/assets/redbombalert/titimg1.png
+0
-0
titimg2.png
egret/resource/assets/redbombalert/titimg2.png
+0
-0
titimg3.png
egret/resource/assets/redbombalert/titimg3.png
+0
-0
titimg4.png
egret/resource/assets/redbombalert/titimg4.png
+0
-0
loadingbgfes.png
egret/resource/assets/startScene/loadingbgfes.png
+0
-0
redbomb.svga
egret/resource/assets/svgas/redbomb.svga
+0
-0
default.res.json
egret/resource/default.res.json
+26
-1
Main2Skin.exml
egret/resource/skins/Main2Skin.exml
+2
-2
RedBombAlertSkin.exml
egret/resource/skins/RedBombAlertSkin.exml
+6
-3
MainScene.ts
egret/src/mainScene/MainScene.ts
+6
-1
RedBombAlertPanel.ts
egret/src/panels/RedBombAlertPanel.ts
+35
-1
AiControl.ts
egret/src/something/logic/AiControl.ts
+1
-1
FestivalTarget.ts
egret/src/something/uis/FestivalTarget.ts
+2
-2
No files found.
egret/resource/assets/redbombalert/titimg1.png
0 → 100644
View file @
02ce9d89
12.3 KB
egret/resource/assets/redbombalert/titimg2.png
0 → 100644
View file @
02ce9d89
15.1 KB
egret/resource/assets/redbombalert/titimg3.png
0 → 100644
View file @
02ce9d89
22 KB
egret/resource/assets/redbombalert/titimg4.png
0 → 100644
View file @
02ce9d89
13.4 KB
egret/resource/assets/startScene/loadingbgfes.png
0 → 100644
View file @
02ce9d89
3.87 KB
egret/resource/assets/svgas/redbomb.svga
View file @
02ce9d89
No preview for this file type
egret/resource/default.res.json
View file @
02ce9d89
...
@@ -241,7 +241,7 @@
...
@@ -241,7 +241,7 @@
"name"
:
"helpGroup"
"name"
:
"helpGroup"
},
},
{
{
"keys"
:
"virprizebg_png,lightdi_png,wormhole_png,startscenebg_jpg,adsmask_png,nsad2_png,nsad1_png,hbchuanguan2_png,redAlert_btn1_png"
,
"keys"
:
"virprizebg_png,lightdi_png,wormhole_png,startscenebg_jpg,adsmask_png,nsad2_png,nsad1_png,hbchuanguan2_png,redAlert_btn1_png
,loadingbgfes_png,titimg1_png,titimg2_png,titimg3_png,titimg4_png
"
,
"name"
:
"preload"
"name"
:
"preload"
}
}
],
],
...
@@ -5426,6 +5426,31 @@
...
@@ -5426,6 +5426,31 @@
"name"
:
"redAlert_btn1_png"
,
"name"
:
"redAlert_btn1_png"
,
"type"
:
"image"
,
"type"
:
"image"
,
"url"
:
"assets/redbombalert/redAlert_btn1.png"
"url"
:
"assets/redbombalert/redAlert_btn1.png"
},
{
"name"
:
"loadingbgfes_png"
,
"type"
:
"image"
,
"url"
:
"assets/startScene/loadingbgfes.png"
},
{
"name"
:
"titimg1_png"
,
"type"
:
"image"
,
"url"
:
"assets/redbombalert/titimg1.png"
},
{
"name"
:
"titimg2_png"
,
"type"
:
"image"
,
"url"
:
"assets/redbombalert/titimg2.png"
},
{
"name"
:
"titimg3_png"
,
"type"
:
"image"
,
"url"
:
"assets/redbombalert/titimg3.png"
},
{
"name"
:
"titimg4_png"
,
"type"
:
"image"
,
"url"
:
"assets/redbombalert/titimg4.png"
}
}
]
]
}
}
\ No newline at end of file
egret/resource/skins/Main2Skin.exml
View file @
02ce9d89
...
@@ -31,12 +31,12 @@
...
@@ -31,12 +31,12 @@
</e:Group>
</e:Group>
<e:Image
id=
"settingBtn"
y=
"1"
source=
"setting_png"
horizontalCenter=
"0"
/>
<e:Image
id=
"settingBtn"
y=
"1"
source=
"setting_png"
horizontalCenter=
"0"
/>
</e:Group>
</e:Group>
<e:Group
id=
"redrainbg"
width=
"750"
height=
"1624"
visible=
"false"
>
<e:Group
id=
"redrainbg"
width=
"750"
height=
"1624"
>
<e:Image
source=
"redrainbg_jpg"
/>
<e:Image
source=
"redrainbg_jpg"
/>
<e:Label
id=
"tips"
text=
"正在加载中,请稍后"
y=
"826.33"
textColor=
"0x244B00"
horizontalCenter=
"0"
size=
"24"
visible=
"false"
/>
<e:Label
id=
"tips"
text=
"正在加载中,请稍后"
y=
"826.33"
textColor=
"0x244B00"
horizontalCenter=
"0"
size=
"24"
visible=
"false"
/>
<e:Label
id=
"percentTxt"
text=
"63%"
y=
"943.33"
textColor=
"0x244B00"
horizontalCenter=
"0.5"
/>
<e:Label
id=
"percentTxt"
text=
"63%"
y=
"943.33"
textColor=
"0x244B00"
horizontalCenter=
"0.5"
/>
<e:Group
x=
"140"
y=
"857.27"
>
<e:Group
x=
"140"
y=
"857.27"
>
<e:Image
source=
"loadingbg_png"
y=
"0"
x=
"0
"
/>
<e:Image
y=
"3.99"
x=
"5.33"
source=
"loadingbgfes_png
"
/>
<e:Group
id=
"maskwrapper"
x=
"14.56"
y=
"7.14"
>
<e:Group
id=
"maskwrapper"
x=
"14.56"
y=
"7.14"
>
<e:Group
id=
"container4"
x=
"0"
y=
"0"
>
<e:Group
id=
"container4"
x=
"0"
y=
"0"
>
<e:Group
id=
"container3"
x=
"0"
y=
"0"
/>
<e:Group
id=
"container3"
x=
"0"
y=
"0"
/>
...
...
egret/resource/skins/RedBombAlertSkin.exml
View file @
02ce9d89
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<e:Skin
class=
"RedBombAlertSkin"
width=
"750"
height=
"1624"
xmlns:e=
"http://ns.egret.com/eui"
xmlns:w=
"http://ns.egret.com/wing"
>
<e:Skin
class=
"RedBombAlertSkin"
width=
"750"
height=
"1624"
xmlns:e=
"http://ns.egret.com/eui"
xmlns:w=
"http://ns.egret.com/wing"
>
<e:Group
id=
"group"
y=
"470"
horizontalCenter=
"0"
visible=
"false"
>
<e:Group
id=
"group"
y=
"470"
horizontalCenter=
"0"
>
<e:Image
source=
"redbombalert文案_png"
y=
"0"
horizontalCenter=
"0"
/>
<e:Image
id=
"titimg1"
y=
"0"
horizontalCenter=
"0"
source=
"titimg1_png"
visible=
"false"
/>
<e:Label
id=
"tips"
text=
"今日还有2个红包在其他关卡等你哦~"
y=
"79"
textColor=
"0xffe9c0"
x=
"0"
/>
<e:Image
id=
"titimg2"
y=
"0"
horizontalCenter=
"0"
source=
"titimg2_png"
visible=
"false"
/>
<e:Image
id=
"titimg3"
y=
"0"
horizontalCenter=
"0"
source=
"titimg3_png"
visible=
"false"
/>
<e:Image
id=
"titimg4"
y=
"0"
horizontalCenter=
"0"
source=
"titimg4_png"
visible=
"false"
/>
<e:Label
id=
"tips"
text=
"今日还有2个红包在其他关卡等你哦~"
y=
"79"
textColor=
"0xffe9c0"
horizontalCenter=
"0"
/>
</e:Group>
</e:Group>
<e:Group
id=
"btn"
y=
"985"
horizontalCenter=
"0"
>
<e:Group
id=
"btn"
y=
"985"
horizontalCenter=
"0"
>
<e:Image
id=
"btn1"
y=
"0"
source=
"redAlert_btn1_png"
horizontalCenter=
"0"
visible=
"false"
/>
<e:Image
id=
"btn1"
y=
"0"
source=
"redAlert_btn1_png"
horizontalCenter=
"0"
visible=
"false"
/>
...
...
egret/src/mainScene/MainScene.ts
View file @
02ce9d89
...
@@ -291,7 +291,7 @@ export default class MainScene extends Scene {
...
@@ -291,7 +291,7 @@ export default class MainScene extends Scene {
//节日元素目标
//节日元素目标
festivalTarget
:
FestivalTarget
;
festivalTarget
:
FestivalTarget
;
//节日小元素需要个数
//节日小元素需要个数
festivalTargetNum
:
number
=
fesELeSmallNum
;
festivalTargetNum
:
number
=
4
;
//
fesELeSmallNum;
//所有元素的消耗数量,需要传给后端
//所有元素的消耗数量,需要传给后端
hasEliminatedElements
:
number
[];
hasEliminatedElements
:
number
[];
//得分的动画,首先特效组合的单独算分,然后把所有符合的放入,在波及的特效触发时不算分
//得分的动画,首先特效组合的单独算分,然后把所有符合的放入,在波及的特效触发时不算分
...
@@ -456,6 +456,7 @@ export default class MainScene extends Scene {
...
@@ -456,6 +456,7 @@ export default class MainScene extends Scene {
}
}
resetMainScene
(){
resetMainScene
(){
this
.
festivalTargetNum
=
4
;
this
.
emptys
=
new
Array
();
this
.
emptys
=
new
Array
();
this
.
warningCop
=
new
Array
();
this
.
warningCop
=
new
Array
();
this
.
eliminatedElements
=
new
Array
();
this
.
eliminatedElements
=
new
Array
();
...
@@ -1548,6 +1549,10 @@ export default class MainScene extends Scene {
...
@@ -1548,6 +1549,10 @@ export default class MainScene extends Scene {
async
initFestivalEle
()
{
async
initFestivalEle
()
{
//添加节日元素,条件可能会变
//添加节日元素,条件可能会变
console
.
log
(
"节日元素判定"
,
fesChapterData
,
this
.
chapter
,
getRedBombTimes
(),
window
[
'fresp'
],
this
.
lattices
[
festivalIndex
]);
console
.
log
(
"节日元素判定"
,
fesChapterData
,
this
.
chapter
,
getRedBombTimes
(),
window
[
'fresp'
],
this
.
lattices
[
festivalIndex
]);
var
guidelevels
=
[
1
,
2
,
3
,
5
,
8
,
9
,
10
,
12
,
17
,
25
,
41
,
61
,
101
,
121
,
226
,
301
,
331
,
377
,
406
,
426
,
453
,
501
,
556
,
601
,
661
];
if
(
guidelevels
.
indexOf
(
this
.
chapter
)
!=-
1
){
return
false
;
}
if
(
if
(
fesChapterData
.
indexOf
(
this
.
chapter
>>
0
)
>
-
1
&&
fesChapterData
.
indexOf
(
this
.
chapter
>>
0
)
>
-
1
&&
getRedBombTimes
()
&&
getRedBombTimes
()
&&
...
...
egret/src/panels/RedBombAlertPanel.ts
View file @
02ce9d89
...
@@ -17,14 +17,33 @@ export default class RedBombAlertPanel extends Panel {
...
@@ -17,14 +17,33 @@ export default class RedBombAlertPanel extends Panel {
private
alertHeight
=
100
;
// TODO 高度修改
private
alertHeight
=
100
;
// TODO 高度修改
showimgtype
:
number
=
1
;
async
start
(
data
)
{
async
start
(
data
)
{
super
.
start
();
super
.
start
();
//1.作战成功,2.恭喜找到隐藏红包,3.恭喜找到今日所有隐藏红包,4.哎呀~红包溜走了
const
date
=
new
Date
();
date
.
setHours
(
0
,
0
,
0
,
0
);
const
nowTimerStr
=
date
.
getTime
()
+
''
;
const
oldTimerStr
=
localStorage
.
getItem
(
'nowTimerStr'
+
window
[
'CFG'
].
consumerId
);
const
nowTimerStr4
=
date
.
getTime
()
+
''
;
const
oldTimerStr4
=
localStorage
.
getItem
(
'nowTimer4Str'
+
window
[
'CFG'
].
consumerId
);
if
(
nowTimerStr4
!=
oldTimerStr4
){
this
.
showimgtype
=
1
;
localStorage
.
setItem
(
'nowTimer4Str'
+
window
[
'CFG'
].
consumerId
,
nowTimerStr4
);
}
else
{
this
.
showimgtype
=
2
;
}
const
times
=
getRedBombTimes
()
-
1
;
const
times
=
getRedBombTimes
()
-
1
;
this
[
'tips'
].
text
=
`今日还有
${
times
}
个红包在其他关卡等你哦~`
;
this
[
'tips'
].
text
=
`今日还有
${
times
}
个红包在其他关卡等你哦~`
;
if
(
times
<=
0
)
{
if
(
times
<=
0
)
{
this
[
'tips'
].
text
=
`当日红包任务达成,明日再来~`
;
this
.
showimgtype
=
3
;
this
[
'tips'
].
text
=
`明天还有更多红包等你哦~`
;
}
}
this
.
changeShowTitImg
(
this
.
showimgtype
);
this
[
'group'
].
alpha
=
0
;
this
[
'group'
].
alpha
=
0
;
egret
.
Tween
.
get
(
this
[
'group'
]).
wait
(
1500
).
to
({
alpha
:
1
},
300
);
egret
.
Tween
.
get
(
this
[
'group'
]).
wait
(
1500
).
to
({
alpha
:
1
},
300
);
...
@@ -44,6 +63,13 @@ export default class RedBombAlertPanel extends Panel {
...
@@ -44,6 +63,13 @@ export default class RedBombAlertPanel extends Panel {
},
this
);
},
this
);
});
});
}
}
changeShowTitImg
(
type
:
number
){
this
[
'titimg1'
].
visible
=
false
;
this
[
'titimg2'
].
visible
=
false
;
this
[
'titimg3'
].
visible
=
false
;
this
[
'titimg4'
].
visible
=
false
;
this
[
'titimg'
+
type
].
visible
=
true
;
}
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
)
=>
{
...
@@ -52,6 +78,14 @@ export default class RedBombAlertPanel extends Panel {
...
@@ -52,6 +78,14 @@ export default class RedBombAlertPanel extends Panel {
egret
.
Tween
.
get
(
this
[
'group'
]).
to
({
alpha
:
0
},
300
);
egret
.
Tween
.
get
(
this
[
'group'
]).
to
({
alpha
:
0
},
300
);
this
.
addChild
(
mv
);
this
.
addChild
(
mv
);
setTimeout
(()
=>
{
setTimeout
(()
=>
{
if
(
this
.
showimgtype
==
1
||
this
.
showimgtype
==
2
){
this
.
showimgtype
=
4
;
this
.
changeShowTitImg
(
this
.
showimgtype
);
this
[
'group'
].
alpha
=
1
;
this
[
'tips'
].
text
=
`快去另一个关卡找找吧`
;
}
this
.
btn
.
visible
=
true
;
this
.
btn
.
visible
=
true
;
this
[
'btn2'
].
visible
=
true
;
this
[
'btn2'
].
visible
=
true
;
this
[
'btn1'
].
visible
=
false
;
this
[
'btn1'
].
visible
=
false
;
...
...
egret/src/something/logic/AiControl.ts
View file @
02ce9d89
...
@@ -28,7 +28,7 @@ const chickenNum: number = 4;
...
@@ -28,7 +28,7 @@ const chickenNum: number = 4;
//节日大红包的小红包数量
//节日大红包的小红包数量
export
cons
t
fesELeSmallNum
:
number
=
4
;
export
le
t
fesELeSmallNum
:
number
=
4
;
export
class
AiControl
{
export
class
AiControl
{
private
static
_ins
:
AiControl
private
static
_ins
:
AiControl
...
...
egret/src/something/uis/FestivalTarget.ts
View file @
02ce9d89
...
@@ -37,8 +37,8 @@ export class FestivalTarget extends egret.DisplayObjectContainer {
...
@@ -37,8 +37,8 @@ export class FestivalTarget extends egret.DisplayObjectContainer {
this
.
addChild
(
showImage
);
this
.
addChild
(
showImage
);
var
texture
:
egret
.
Texture
=
RES
.
getRes
(
"rightMark_png"
);
var
texture
:
egret
.
Texture
=
RES
.
getRes
(
"rightMark_png"
);
this
.
zeroMark
=
new
egret
.
Bitmap
(
texture
);
this
.
zeroMark
=
new
egret
.
Bitmap
(
texture
);
this
.
zeroMark
.
x
=
23
;
this
.
zeroMark
.
x
=
30
;
this
.
zeroMark
.
y
=
50
;
this
.
zeroMark
.
y
=
47
;
this
.
zeroMark
.
visible
=
false
;
this
.
zeroMark
.
visible
=
false
;
this
.
addChild
(
this
.
zeroMark
);
this
.
addChild
(
this
.
zeroMark
);
this
.
countNum
=
new
TargetNumber
();
this
.
countNum
=
new
TargetNumber
();
...
...
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