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
7bd7cb5b
Commit
7bd7cb5b
authored
Aug 19, 2019
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
92720411
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
71 additions
and
13 deletions
+71
-13
MainBase.ts
egret/libs/new_wx/MainBase.ts
+18
-5
PropType.ts
egret/src/PropType.ts
+7
-0
MapScene.ts
egret/src/mapScene/MapScene.ts
+3
-3
Buy1Panel.ts
egret/src/panels/Buy1Panel.ts
+15
-1
Buy2Panel.ts
egret/src/panels/Buy2Panel.ts
+14
-2
Buy3Panel.ts
egret/src/panels/Buy3Panel.ts
+14
-2
No files found.
egret/libs/new_wx/MainBase.ts
View file @
7bd7cb5b
...
@@ -169,8 +169,8 @@ export default class MainBase extends eui.UILayer {
...
@@ -169,8 +169,8 @@ export default class MainBase extends eui.UILayer {
"rightMark"
,
"rightMark"
,
"unlightedStar"
"unlightedStar"
]
]
for
(
var
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
RES
.
getResAsync
(
arr
[
i
]
+
"_png"
)
RES
.
getResAsync
(
arr
[
i
]
+
"_png"
)
}
}
}
}
...
@@ -206,11 +206,24 @@ export default class MainBase extends eui.UILayer {
...
@@ -206,11 +206,24 @@ export default class MainBase extends eui.UILayer {
}
}
protected
createGameScene
()
{
protected
createGameScene
()
{
NetManager
.
ins
.
ajaxElement
(
async
()
=>
{
let
count
=
2
;
const
check
=
()
=>
{
if
(
count
<=
0
)
{
Buried
.
init
();
Buried
.
init
();
SceneCtrl
.
instance
.
change
(
ModuleTypes
.
START_SCENE
,
this
.
svgaList
);
SceneCtrl
.
instance
.
change
(
ModuleTypes
.
START_SCENE
,
this
.
svgaList
);
})
}
}
NetManager
.
ins
.
hc_home
(()
=>
{
count
--
;
check
();
},
window
[
'collectRuleId'
]);
NetManager
.
ins
.
ajaxElement
(
async
()
=>
{
count
--
;
check
();
});
}
}
}
}
\ No newline at end of file
egret/src/PropType.ts
0 → 100644
View file @
7bd7cb5b
enum
PropType
{
BOOM
=
1
,
HAMMER
,
CHANCE_NUM
}
export
default
PropType
\ No newline at end of file
egret/src/mapScene/MapScene.ts
View file @
7bd7cb5b
...
@@ -48,9 +48,9 @@ export default class MapScene extends Scene {
...
@@ -48,9 +48,9 @@ export default class MapScene extends Scene {
},
this
)
},
this
)
}
}
setTimeout
(()
=>
{
//
setTimeout(() => {
PanelCtrl
.
instance
.
show
(
'box'
);
//
PanelCtrl.instance.show('box');
},
2000
);
//
}, 2000);
}
}
protected
initEvents
()
{
protected
initEvents
()
{
...
...
egret/src/panels/Buy1Panel.ts
View file @
7bd7cb5b
import
Panel
from
"../../libs/new_wx/components/Panel"
;
import
Panel
from
"../../libs/new_wx/components/Panel"
;
import
{
NetManager
}
from
"../../libs/tw/manager/NetManager"
;
import
PropType
from
"../PropType"
;
export
default
class
Buy1Panel
extends
Panel
{
export
default
class
Buy1Panel
extends
Panel
{
buyBtn
:
eui
.
Button
start
(
data
)
{
start
(
data
)
{
super
.
start
();
super
.
start
();
this
[
'buyBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
ontap
,
this
);
}
ontap
()
{
this
.
buyBtn
.
enabled
=
false
;
NetManager
.
ins
.
hc_exchange
((
success
)
=>
{
this
.
buyBtn
.
enabled
=
true
;
if
(
success
)
{
this
.
hidePanel
();
}
},
2
,
PropType
.
HAMMER
);
//兑换道具
}
}
get
skinKey
()
{
return
'Buy1'
}
get
skinKey
()
{
return
'Buy1'
}
...
...
egret/src/panels/Buy2Panel.ts
View file @
7bd7cb5b
import
Panel
from
"../../libs/new_wx/components/Panel"
;
import
Panel
from
"../../libs/new_wx/components/Panel"
;
import
{
NetManager
}
from
"../../libs/tw/manager/NetManager"
;
import
PropType
from
"../PropType"
;
export
default
class
Buy2Panel
extends
Panel
{
export
default
class
Buy2Panel
extends
Panel
{
start
(
data
)
{
start
(
data
)
{
super
.
start
();
super
.
start
();
this
[
'buyBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
ontap
,
this
);
}
buyBtn
:
eui
.
Button
ontap
()
{
this
.
buyBtn
.
enabled
=
false
;
NetManager
.
ins
.
hc_exchange
((
success
)
=>
{
this
.
buyBtn
.
enabled
=
true
;
if
(
success
)
{
this
.
hidePanel
();
}
},
2
,
PropType
.
BOOM
);
//兑换道具
}
}
get
skinKey
()
{
return
'Buy2'
}
get
skinKey
()
{
return
'Buy2'
}
}
}
\ No newline at end of file
egret/src/panels/Buy3Panel.ts
View file @
7bd7cb5b
import
Panel
from
"../../libs/new_wx/components/Panel"
;
import
Panel
from
"../../libs/new_wx/components/Panel"
;
import
{
NetManager
}
from
"../../libs/tw/manager/NetManager"
;
import
PropType
from
"../PropType"
;
export
default
class
Buy3Panel
extends
Panel
{
export
default
class
Buy3Panel
extends
Panel
{
start
(
data
)
{
start
(
data
)
{
super
.
start
();
super
.
start
();
this
[
'buyBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
ontap
,
this
);
}
}
buyBtn
:
eui
.
Button
get
skinKey
()
{
return
'Buy3'
}
get
skinKey
()
{
return
'Buy3'
}
ontap
()
{
this
.
buyBtn
.
enabled
=
false
;
NetManager
.
ins
.
hc_exchange
((
success
)
=>
{
this
.
buyBtn
.
enabled
=
true
;
if
(
success
)
{
this
.
hidePanel
();
}
},
2
,
PropType
.
CHANCE_NUM
);
//兑换道具
}
}
}
\ No newline at end of file
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