Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
icbcRPG
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
wildfirecode13
icbcRPG
Commits
b4c486c9
Commit
b4c486c9
authored
Dec 21, 2020
by
zhangjinzhou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整引导
parent
2a28a290
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
3 deletions
+30
-3
bundle.js
project/src/pages/main3/bundle.js
+30
-3
No files found.
project/src/pages/main3/bundle.js
View file @
b4c486c9
...
...
@@ -35,6 +35,8 @@ var GameStage = /** @class */ (function (_super) {
function
GameStage
()
{
var
_this
=
_super
!==
null
&&
_super
.
apply
(
this
,
arguments
)
||
this
;
_this
.
step
=
1
;
_this
.
canclick
=
true
;
_this
.
guideconfig
=
{};
return
_this
;
}
GameStage
.
prototype
.
onLaunched
=
function
()
{
...
...
@@ -56,6 +58,7 @@ var GameStage = /** @class */ (function (_super) {
this
.
addChild
(
this
.
touchrect
);
this
.
skipbtn
=
new
Sprite
();
this
.
addChild
(
this
.
skipbtn
);
this
.
guideconfig
=
this
.
props
[
'guideconfig'
];
this
.
skipbtn
.
addEventListener
(
MouseEvent
.
CLICK
,
this
.
skipGuide
,
this
);
this
.
touchrect
.
addEventListener
(
MouseEvent
.
CLICK
,
this
.
toNextLevel
,
this
);
this
.
setGuideShow
();
...
...
@@ -66,6 +69,15 @@ var GameStage = /** @class */ (function (_super) {
* @param payload
*/
GameStage
.
prototype
.
onEvent
=
function
(
type
,
payload
)
{
switch
(
type
)
{
case
"setStepData"
:
var
step
=
payload
.
step
;
var
stepdata
=
payload
.
stepdata
;
break
;
default
:
console
.
error
(
"为定义监听类型===》"
,
payload
);
break
;
}
};
/**
* 销毁回调
...
...
@@ -74,7 +86,15 @@ var GameStage = /** @class */ (function (_super) {
};
//skipLevel
GameStage
.
prototype
.
skipGuide
=
function
()
{
var
stepdata
=
this
.
props
[
'guideconfig'
][
this
.
step
];
var
_this
=
this
;
if
(
!
this
.
canclick
)
{
return
;
}
this
.
canclick
=
false
;
setTimeout
(
function
()
{
_this
.
canclick
=
true
;
},
1000
);
var
stepdata
=
this
.
guideconfig
[
this
.
step
];
var
skipbtn
=
stepdata
.
skipbtn
;
var
lastlevel
;
if
(
skipbtn
)
{
...
...
@@ -85,13 +105,20 @@ var GameStage = /** @class */ (function (_super) {
};
//toNextLevel
GameStage
.
prototype
.
toNextLevel
=
function
()
{
var
_this
=
this
;
if
(
!
this
.
canclick
)
{
return
;
}
this
.
canclick
=
false
;
setTimeout
(
function
()
{
_this
.
canclick
=
true
;
},
1000
);
this
.
step
++
;
this
.
setGuideShow
();
};
//步数渲染
GameStage
.
prototype
.
setGuideShow
=
function
()
{
console
.
log
(
"配置===》"
,
this
.
props
);
var
stepdata
=
this
.
props
[
'guideconfig'
][
this
.
step
];
var
stepdata
=
this
.
guideconfig
[
this
.
step
];
if
(
!
stepdata
)
{
console
.
error
(
"引导完毕====》"
);
this
.
dispatchOutEvent
(
"guidecomplete"
,
null
);
...
...
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