Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
ngt08_flst
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
template admin
ngt08_flst
Commits
fa703d42
Commit
fa703d42
authored
Oct 13, 2020
by
范雪寒
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 格式化
parent
9cf134b4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
21 deletions
+21
-21
Scene.js
play/assets/tmpGame/script/Scene.js
+21
-21
No files found.
play/assets/tmpGame/script/Scene.js
View file @
fa703d42
...
@@ -95,13 +95,13 @@ cc.Class({
...
@@ -95,13 +95,13 @@ cc.Class({
addPreloadImage
()
{
addPreloadImage
()
{
this
.
_imageResList
.
push
({
url
:
this
.
data
.
pic_url
});
this
.
_imageResList
.
push
({
url
:
this
.
data
.
pic_url
});
this
.
_imageResList
.
push
({
url
:
this
.
data
.
pic_url_2
});
this
.
_imageResList
.
push
({
url
:
this
.
data
.
pic_url_2
});
},
},
addPreloadAudio
()
{
addPreloadAudio
()
{
this
.
_audioResList
.
push
({
url
:
this
.
data
.
audio_url
});
this
.
_audioResList
.
push
({
url
:
this
.
data
.
audio_url
});
},
},
addPreloadAnima
()
{
addPreloadAnima
()
{
...
@@ -264,11 +264,11 @@ cc.Class({
...
@@ -264,11 +264,11 @@ cc.Class({
this
.
_cantouch
=
false
;
this
.
_cantouch
=
false
;
const
len
=
this
.
pic1
.
parent
.
width
;
const
len
=
this
.
pic1
.
parent
.
width
;
cc
.
tween
(
this
.
pic1
)
cc
.
tween
(
this
.
pic1
)
.
to
(
1
,
{
x
:
this
.
pic1
.
baseX
},
{
easing
:
'
cubicInOut
'
})
.
to
(
1
,
{
x
:
this
.
pic1
.
baseX
},
{
easing
:
'
cubicInOut
'
})
.
start
();
.
start
();
cc
.
tween
(
this
.
pic2
)
cc
.
tween
(
this
.
pic2
)
.
to
(
1
,
{
x
:
this
.
pic2
.
baseX
},
{
easing
:
'
cubicInOut
'
})
.
to
(
1
,
{
x
:
this
.
pic2
.
baseX
},
{
easing
:
'
cubicInOut
'
})
.
call
(()
=>
{
.
call
(()
=>
{
this
.
_cantouch
=
true
;
this
.
_cantouch
=
true
;
})
})
...
@@ -279,11 +279,11 @@ cc.Class({
...
@@ -279,11 +279,11 @@ cc.Class({
this
.
_cantouch
=
false
;
this
.
_cantouch
=
false
;
const
len
=
this
.
pic1
.
parent
.
width
;
const
len
=
this
.
pic1
.
parent
.
width
;
cc
.
tween
(
this
.
pic1
)
cc
.
tween
(
this
.
pic1
)
.
to
(
1
,
{
x
:
this
.
pic1
.
baseX
-
len
},
{
easing
:
'
cubicInOut
'
})
.
to
(
1
,
{
x
:
this
.
pic1
.
baseX
-
len
},
{
easing
:
'
cubicInOut
'
})
.
start
();
.
start
();
cc
.
tween
(
this
.
pic2
)
cc
.
tween
(
this
.
pic2
)
.
to
(
1
,
{
x
:
this
.
pic2
.
baseX
-
len
},
{
easing
:
'
cubicInOut
'
})
.
to
(
1
,
{
x
:
this
.
pic2
.
baseX
-
len
},
{
easing
:
'
cubicInOut
'
})
.
call
(()
=>
{
.
call
(()
=>
{
this
.
_cantouch
=
true
;
this
.
_cantouch
=
true
;
})
})
...
@@ -324,7 +324,7 @@ cc.Class({
...
@@ -324,7 +324,7 @@ cc.Class({
getSpriteFrimeByUrl
(
url
,
cb
)
{
getSpriteFrimeByUrl
(
url
,
cb
)
{
cc
.
loader
.
load
({
url
},
(
err
,
img
)
=>
{
cc
.
loader
.
load
({
url
},
(
err
,
img
)
=>
{
const
spriteFrame
=
new
cc
.
SpriteFrame
(
img
)
const
spriteFrame
=
new
cc
.
SpriteFrame
(
img
)
if
(
cb
)
{
if
(
cb
)
{
cb
(
spriteFrame
);
cb
(
spriteFrame
);
...
@@ -343,7 +343,7 @@ cc.Class({
...
@@ -343,7 +343,7 @@ cc.Class({
})
})
},
},
playAudioByUrl
(
audio_url
,
cb
=
null
)
{
playAudioByUrl
(
audio_url
,
cb
=
null
)
{
if
(
audio_url
)
{
if
(
audio_url
)
{
cc
.
assetManager
.
loadRemote
(
audio_url
,
(
err
,
audioClip
)
=>
{
cc
.
assetManager
.
loadRemote
(
audio_url
,
(
err
,
audioClip
)
=>
{
const
audioId
=
cc
.
audioEngine
.
play
(
audioClip
,
false
,
0.8
);
const
audioId
=
cc
.
audioEngine
.
play
(
audioClip
,
false
,
0.8
);
...
...
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