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
11a0fe50
Commit
11a0fe50
authored
Dec 18, 2019
by
邱旭
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
9c5e1e09
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
100 additions
and
23 deletions
+100
-23
redbombalert.tmproject
egret/resource/TextureMerger/redbombalert.tmproject
+1
-1
MapSkin.exml
egret/resource/skins/MapSkin.exml
+6
-4
MapScene.ts
egret/src/mapScene/MapScene.ts
+5
-11
ActIcon.ts
egret/src/mapScene/icon/ActIcon.ts
+31
-4
HbBombIcon.ts
egret/src/mapScene/icon/HbBombIcon.ts
+54
-0
IconBase.ts
egret/src/mapScene/icon/IconBase.ts
+2
-2
hbRainBaseInfo.json
mock/happyclear/hbRainBaseInfo.json
+1
-1
No files found.
egret/resource/TextureMerger/redbombalert.tmproject
View file @
11a0fe50
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"redbombalert","version":5,"files":["../assets/redbombalert/redbombalert文案.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"redbombalert","version":5,"files":["../assets/redbombalert/redbombalert文案.png","../assets/redbombalert/redAlert_btn.png"]}
\ No newline at end of file
egret/resource/skins/MapSkin.exml
View file @
11a0fe50
...
...
@@ -149,9 +149,9 @@
</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=
"actIconsBg
1"
source=
"map2+bg_png"
x=
"-27.15"
y=
"0
"
/>
<e:Image
id=
"actIconsBg
2
"
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:Image
id=
"actIconsBg
2"
source=
"map2+bg_png"
x=
"-27.15"
y=
"0"
visible=
"false
"
/>
<e:Image
id=
"actIconsBg
1
"
x=
"-29.27"
y=
"10"
source=
"map2+bg2_png"
visible=
"false"
/>
<e:Group
id=
"hbRainGroup"
x=
"
5"
y=
"158
"
width=
"120"
height=
"120"
>
<e:Button
id=
"hbRainBtn"
label=
""
y=
"-1"
x=
"0"
>
<e:skinName>
<e:Skin
states=
"up,down,disabled"
>
...
...
@@ -161,7 +161,9 @@
</e:skinName>
</e:Button>
</e:Group>
<e:Image
id=
"act2Btn"
source=
"map2红包大作战_png"
x=
"157.76"
y=
"159"
/>
<e:Group
id=
"act2Group"
x=
"157"
y=
"158"
>
<e:Image
id=
"act2Btn"
source=
"map2红包大作战_png"
x=
"0"
y=
"0"
/>
</e:Group>
</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"
/>
...
...
egret/src/mapScene/MapScene.ts
View file @
11a0fe50
...
...
@@ -25,12 +25,12 @@ import TurntableIcon from "./icon/TurntableIcon";
import
MapBottomPart
from
"./MapBottomPart"
;
import
MapRpeatPart
from
"./MapRpeatPart"
;
import
MapTopPart
from
"./MapTopPart"
;
import
createRegTriangle
from
"../playScene/factory/createRegTriangle"
;
import
RedBagAni
,
{
createRedBagIcon
}
from
"./RedBagAni"
;
import
{
createEffect2MovieClip
}
from
"../effect/createEffect2"
;
import
ActIcon
from
"./icon/ActIcon"
;
import
{
NetName
}
from
"../../libs/tw/enum/NetName"
;
import
TaskCenterIcon
from
"./icon/TaskCenterIcon"
;
import
HbBombIcon
from
"./icon/HbBombIcon"
;
let
doHelpFlag
=
false
;
// let doScratchHelpFlag = false;
...
...
@@ -131,11 +131,6 @@ export default class MapScene extends Scene {
async
start
(
data
?)
{
super
.
start
();
// PanelCtrl.instance.show('RedBombAlert');
// NetManager.ins.hc_submit(()=>{
// // const submitData = DataManager.ins.getData('hc_submit').data;
// // PanelCtrl.instance.show(ModuleTypes.PRIZE_PANEL,{ level:1, option: submitData.option })
// },1,1,'','')
this
.
addIcon
();
// 添加Icon
this
.
sendInvite
();
...
...
@@ -390,8 +385,10 @@ export default class MapScene extends Scene {
"taskCenterIcon"
:
new
TaskCenterIcon
(
"taskCenterIcon"
,
this
[
"taskGroup"
],
this
[
"taskBtn"
],
this
[
"taskTipsBg"
],
this
[
"taskTips"
]),
};
this
.
actIcon
=
new
ActIcon
(
this
[
'actsShowBtn'
],
this
[
'actTips'
],
this
[
'actIconsGroup'
]);
this
.
actIcon
=
new
ActIcon
(
this
[
'actsShowBtn'
],
this
[
'actTips'
],
this
[
'actIconsGroup'
]
,
this
);
this
.
actIcon
.
addActIcon
(
"hbRainIcon"
,
new
HbRainIcon
(
"hbRainIcon"
,
this
[
"hbRainGroup"
],
this
[
"hbRainBtn"
]));
this
.
actIcon
.
addActIcon
(
'hbBombIcon'
,
new
HbBombIcon
(
'hbBombIcon'
,
this
[
'act2Group'
],
this
[
'act2Btn'
]));
this
.
actIcon
.
setGroup
();
// 整理图标
}
private
removeIcon
()
{
...
...
@@ -518,9 +515,6 @@ export default class MapScene extends Scene {
}
disableIcon
(
level
)
{
if
(
level
>=
200
)
{
let
s
=
1
}
this
.
setGray
(
level
);
MapScene
.
starHash
[
level
].
visible
=
false
;
}
...
...
@@ -871,7 +865,7 @@ export default class MapScene extends Scene {
protected
initEvents
()
{
this
[
'goldBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_goldBtn
,
this
);
this
[
'guide'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_guide
,
this
);
this
[
'act2Btn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_act2btn
,
this
);
//
this['act2Btn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_act2btn, this);
this
[
'inviteBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_inviteBtn
,
this
);
this
[
'friendBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_friendBtn
,
this
);
this
[
'adBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_adBtn
,
this
);
...
...
egret/src/mapScene/icon/ActIcon.ts
View file @
11a0fe50
import
{
GDispatcher
}
from
"../../../libs/tc/util/GDispatcher"
;
import
IconBase
from
"./IconBase"
;
let
posArr
=
[
{
x
:
5
,
y
:
158
},
{
x
:
157
,
y
:
158
}
];
export
default
class
ActIcon
{
private
actsShowBtn
;
...
...
@@ -9,10 +14,13 @@ export default class ActIcon {
private
icons
=
{};
constructor
(
actsShowBtn
,
actTips
,
actIconGroup
)
{
parent
;
constructor
(
actsShowBtn
,
actTips
,
actIconGroup
,
parent
)
{
this
.
actsShowBtn
=
actsShowBtn
;
this
.
actTips
=
actTips
;
this
.
actIconsGroup
=
actIconGroup
;
this
.
parent
=
parent
;
this
.
initUI
();
this
.
initEvents
();
}
...
...
@@ -43,12 +51,31 @@ export default class ActIcon {
for
(
let
k
in
this
.
icons
)
{
if
(
this
.
icons
[
k
].
visible
)
{
this
.
visible
=
true
;
this
.
setGroup
();
return
;
}
}
this
.
visible
=
false
;
}
public
setGroup
()
{
let
iconArr
=
[];
for
(
let
k
in
this
.
icons
)
{
if
(
this
.
icons
[
k
].
visible
)
{
iconArr
.
push
(
this
.
icons
[
k
]);
}
}
for
(
let
i
=
0
;
i
<
iconArr
.
length
;
i
++
)
{
iconArr
[
i
].
x
=
posArr
[
i
].
x
;
iconArr
[
i
].
y
=
posArr
[
i
].
y
;
}
for
(
let
i
=
1
;
i
<=
10
;
i
++
)
{
/// TODO when > 10 ??
this
.
parent
[
`actIconsBg
${
i
}
`
]
&&
(
this
.
parent
[
`actIconsBg
${
i
}
`
].
visible
=
(
i
==
iconArr
.
length
));
}
}
public
set
visible
(
visible
:
boolean
)
{
this
.
actsShowBtn
.
visible
=
visible
;
this
.
actTips
.
visible
=
visible
;
...
...
@@ -60,9 +87,9 @@ export default class ActIcon {
private
onTap_actsShowBtn
()
{
this
.
actIconsGroup
.
visible
=
!
this
.
actIconsGroup
.
visible
;
if
(
this
.
actIconsGroup
.
visible
){
for
(
let
k
in
this
.
icons
){
if
(
this
.
icons
[
k
].
visible
){
if
(
this
.
actIconsGroup
.
visible
)
{
for
(
let
k
in
this
.
icons
)
{
if
(
this
.
icons
[
k
].
visible
)
{
this
.
icons
[
k
].
showLog
();
}
}
...
...
egret/src/mapScene/icon/HbBombIcon.ts
0 → 100644
View file @
11a0fe50
import
IconBase
from
"./IconBase"
;
import
PanelCtrl
from
"../../../libs/new_wx/ctrls/panelCtrl"
;
import
{
GDispatcher
}
from
"../../../libs/tc/util/GDispatcher"
;
import
{
NetManager
}
from
"../../../libs/tw/manager/NetManager"
;
import
{
getlogItem
}
from
"../../Main"
;
import
CutTimer
from
"../../CutTimer"
;
import
{
DataManager
}
from
"../../../libs/tw/manager/DataManager"
;
export
default
class
HbBombIcon
extends
IconBase
{
private
cutTimer
:
CutTimer
=
null
;
constructor
(
name
:
string
,
group
:
eui
.
Group
,
btn
:
eui
.
Button
|
eui
.
Image
,
tipsBg
?:
eui
.
Image
,
tipsLabel
?:
eui
.
Label
)
{
super
(
name
,
group
,
btn
,
tipsBg
,
tipsLabel
);
this
.
setIcon
();
}
private
setIcon
()
{
let
res
=
DataManager
.
ins
.
getData
(
'hc_redBombBaseInfo'
);
if
(
res
.
success
)
{
this
.
visible
=
true
;
NetManager
.
ins
.
showLog
(
getlogItem
(
77
));
}
else
{
this
.
visible
=
false
;
}
}
/**
* 点击icon
* @param e 点击事件
*/
protected
onTouchBtn
(
e
:
egret
.
TouchEvent
)
{
super
.
onTouchBtn
(
e
);
NetManager
.
ins
.
clickLog
(
getlogItem
(
77
));
PanelCtrl
.
instance
.
show
(
'BombTips2Panel'
);
GDispatcher
.
dispatchEvent
(
'closeActBtn'
);
}
protected
initEvents
()
{
super
.
initEvents
();
}
protected
removeEvents
()
{
super
.
removeEvents
();
}
public
destory
()
{
super
.
destory
();
this
.
cutTimer
.
stop
();
}
}
\ No newline at end of file
egret/src/mapScene/icon/IconBase.ts
View file @
11a0fe50
...
...
@@ -7,7 +7,7 @@ import { GDispatcher } from "../../../libs/tc/util/GDispatcher";
export
default
class
IconBase
{
protected
iconGroup
:
eui
.
Group
;
protected
iconBtn
:
eui
.
Button
;
protected
iconBtn
:
eui
.
Button
|
eui
.
Image
;
protected
iconTipsBg
:
eui
.
Image
;
protected
iconTips
:
eui
.
Label
;
...
...
@@ -16,7 +16,7 @@ export default class IconBase {
return
this
.
_name
;
}
constructor
(
name
:
string
,
group
:
eui
.
Group
,
btn
:
eui
.
Button
,
tipsBg
?:
eui
.
Image
,
tipsLabel
?:
eui
.
Label
)
{
constructor
(
name
:
string
,
group
:
eui
.
Group
,
btn
:
eui
.
Button
|
eui
.
Image
,
tipsBg
?:
eui
.
Image
,
tipsLabel
?:
eui
.
Label
)
{
this
.
iconGroup
=
group
;
this
.
iconBtn
=
btn
;
this
.
iconTipsBg
=
tipsBg
;
...
...
mock/happyclear/hbRainBaseInfo.json
View file @
11a0fe50
{
"success"
:
true
,
"code"
:
"
0000000000
"
,
"code"
:
"
600054
"
,
"desc"
:
"OK"
,
"timestamp"
:
1573210800000
,
"data"
:
{
...
...
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