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
5f39c496
Commit
5f39c496
authored
Nov 06, 2019
by
邱旭
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
8d70398b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
63 additions
and
9 deletions
+63
-9
MapSkin.exml
egret/resource/skins/MapSkin.exml
+10
-1
MapScene.ts
egret/src/mapScene/MapScene.ts
+6
-6
HbRainIcon.ts
egret/src/mapScene/icon/HbRainIcon.ts
+41
-0
IconBase.ts
egret/src/mapScene/icon/IconBase.ts
+6
-2
No files found.
egret/resource/skins/MapSkin.exml
View file @
5f39c496
...
...
@@ -136,7 +136,16 @@
<e:Group
id=
"activitys"
x=
"13.4"
y=
"620.55"
>
<e:Group
id=
"actIconsGroup"
x=
"12.12"
y=
"0"
visible=
"false"
>
<e:Image
source=
"map2+bg_png"
x=
"-27.15"
y=
"0"
/>
<e:Image
id=
"act1Btn"
source=
"map2周一红包雨_png"
x=
"4.27"
y=
"157.5"
/>
<e:Group
id=
"hbRainGroup"
x=
"4.27"
y=
"157.5"
width=
"120"
height=
"120"
>
<e:Button
id=
"hbRainBtn"
label=
""
y=
"-1"
x=
"0"
>
<e:skinName>
<e:Skin
states=
"up,down,disabled"
>
<e:Image
width=
"100%"
height=
"100%"
source=
"map2周一红包雨_png"
source.down=
"map2周一红包雨_png"
source.disabled=
"map2周一红包雨_png"
/>
<e:Label
id=
"labelDisplay"
horizontalCenter=
"0"
verticalCenter=
"0"
/>
</e:Skin>
</e:skinName>
</e:Button>
</e:Group>
<e:Image
id=
"act2Btn"
source=
"map2红包大作战_png"
x=
"157.76"
y=
"159"
/>
</e:Group>
<e:Image
id=
"actsShowBtn"
source=
"map2+_png"
x=
"-7.64"
y=
"5.45"
/>
...
...
egret/src/mapScene/MapScene.ts
View file @
5f39c496
...
...
@@ -24,6 +24,7 @@ import { GDispatcher } from "../../libs/tc/util/GDispatcher";
import
Loading
from
"../../libs/new_wx/components/Loading"
;
import
ScratchIcon
from
"./icon/ScratchIcon"
;
import
TurntableIcon
from
"./icon/TurntableIcon"
;
import
HbRainIcon
from
"./icon/HbRainIcon"
;
let
doHelpFlag
=
false
;
// let doScratchHelpFlag = false;
...
...
@@ -292,7 +293,8 @@ export default class MapScene extends Scene {
private
addIcon
()
{
this
.
icons
=
{
"scratchIcon"
:
new
ScratchIcon
(
"scratchIcon"
,
this
[
"scratchGroup"
],
this
[
"scratchBtn"
],
this
[
"scratchTipsBg"
],
this
[
"scratchTips"
]),
"turntableIcon"
:
new
TurntableIcon
(
"turntableIcon"
,
this
[
"turnTableGroup"
],
this
[
"turnTableBtn"
],
this
[
"turnTableTipsBg"
],
this
[
"turnTableTips"
])
"turntableIcon"
:
new
TurntableIcon
(
"turntableIcon"
,
this
[
"turnTableGroup"
],
this
[
"turnTableBtn"
],
this
[
"turnTableTipsBg"
],
this
[
"turnTableTips"
]),
"hbRainIcon"
:
new
HbRainIcon
(
"hbRainIcon"
,
this
[
"hbRainGroup"
],
this
[
"hbRainBtn"
]),
};
}
...
...
@@ -532,10 +534,7 @@ export default class MapScene extends Scene {
onTap_actsShowBtn
()
{
this
[
'actIconsGroup'
].
visible
=
!
this
[
'actIconsGroup'
].
visible
;
}
onTap_act1btn
()
{
PanelCtrl
.
instance
.
show
(
"HbCutTime"
);
this
.
onTap_actsShowBtn
();
}
onTap_guide
()
{
this
[
'guide'
].
visible
=
false
;
localStorage
.
setItem
(
'activityguide'
,
'1'
);
...
...
@@ -756,7 +755,6 @@ 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
[
'act1Btn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_act1btn
,
this
);
this
[
'act2Btn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_act2btn
,
this
);
this
[
'actsShowBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_actsShowBtn
,
this
);
this
[
'inviteBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_inviteBtn
,
this
);
...
...
@@ -780,6 +778,8 @@ export default class MapScene extends Scene {
// 消消乐查询信息
GDispatcher
.
addEvent
(
'getInviteInfo'
,
this
.
getInviteInfo
,
this
);
GDispatcher
.
addEvent
(
'closeActBtn'
,
this
.
onTap_actsShowBtn
,
this
);
}
initSound
()
{
...
...
egret/src/mapScene/icon/HbRainIcon.ts
0 → 100644
View file @
5f39c496
import
IconBase
from
"./IconBase"
;
import
PanelCtrl
from
"../../../libs/new_wx/ctrls/panelCtrl"
;
import
{
GDispatcher
}
from
"../../../libs/tc/util/GDispatcher"
;
export
default
class
HbRainIcon
extends
IconBase
{
constructor
(
name
:
string
,
group
:
eui
.
Group
,
btn
:
eui
.
Button
,
tipsBg
?:
eui
.
Image
,
tipsLabel
?:
eui
.
Label
)
{
super
(
name
,
group
,
btn
,
tipsBg
,
tipsLabel
);
}
protected
start
()
{
super
.
start
();
}
/**
* 点击icon
* @param e 点击事件
*/
protected
onTouchBtn
(
e
:
egret
.
TouchEvent
)
{
super
.
onTouchBtn
(
e
);
PanelCtrl
.
instance
.
show
(
"HbCutTime"
);
GDispatcher
.
dispatchEvent
(
'closeActBtn'
);
}
protected
initEvents
()
{
super
.
initEvents
();
}
protected
removeEvents
()
{
super
.
removeEvents
();
}
protected
destory
()
{
super
.
destory
();
}
}
\ No newline at end of file
egret/src/mapScene/icon/IconBase.ts
View file @
5f39c496
...
...
@@ -31,8 +31,12 @@ export default class IconBase {
if
(
visible
==
true
)
{
this
.
visible
=
true
;
}
this
.
iconTipsBg
.
visible
=
visible
;
this
.
iconTips
.
visible
=
visible
;
if
(
this
.
iconTips
){
this
.
iconTips
.
visible
=
visible
;
}
if
(
this
.
iconTipsBg
){
this
.
iconTipsBg
.
visible
=
visible
;
}
}
/**
...
...
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