Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
FT_06
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
FT_06
Commits
548981cf
Commit
548981cf
authored
Nov 11, 2020
by
范雪寒
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: bugs
parent
8ac7bf79
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
FT_06.js
play/assets/tmpGame/scene/FT_06.js
+4
-2
utils.js
play/assets/tmpGame/script/utils.js
+3
-0
No files found.
play/assets/tmpGame/scene/FT_06.js
View file @
548981cf
...
...
@@ -136,12 +136,14 @@ cc.Class({
initListeners
()
{
this
.
node
.
on
(
'
scale-changed
'
,
()
=>
{
console
.
log
(
'
scale-changed
'
);
this
.
initNodes
();
this
.
showQuestion
();
this
.
updateButtons
();
});
this
.
node
.
on
(
'
size-changed
'
,
()
=>
{
console
.
log
(
'
size-changed
'
);
this
.
initNodes
();
this
.
showQuestion
();
this
.
updateButtons
();
});
...
...
@@ -223,8 +225,8 @@ cc.Class({
});
const
optionPosListBase
=
cc
.
find
(
'
Canvas/OptionPosListBase
'
);
optionNode
.
scaleX
=
Math
.
min
(
1
,
optionPosListBase
.
scaleX
,
optionPosListBase
.
scaleY
)
/
Math
.
min
(
optionPosListBase
.
scaleX
,
1
)
;
optionNode
.
scaleY
=
Math
.
min
(
1
,
optionPosListBase
.
scaleX
,
optionPosListBase
.
scaleY
)
/
Math
.
min
(
optionPosListBase
.
scaleY
,
1
)
;
optionNode
.
scaleX
=
Math
.
min
(
1
,
optionPosListBase
.
scaleX
,
optionPosListBase
.
scaleY
)
/
optionPosListBase
.
scaleX
;
optionNode
.
scaleY
=
Math
.
min
(
1
,
optionPosListBase
.
scaleX
,
optionPosListBase
.
scaleY
)
/
optionPosListBase
.
scaleY
;
const
posNode
=
cc
.
find
(
`Canvas/OptionPosListBase/Option_
${
optionList
.
length
}
_
${
idx
}
`
)
optionNode
.
x
=
posNode
.
x
;
...
...
play/assets/tmpGame/script/utils.js
View file @
548981cf
...
...
@@ -109,6 +109,9 @@ export async function asyncPlayDragonBoneAnimation(node, animationName, time = 1
}
export
async
function
asyncPlayEffectByUrl
(
url
,
loop
=
false
)
{
if
(
!
url
)
{
return
;
}
return
new
Promise
((
resolve
,
reject
)
=>
{
cc
.
assetManager
.
loadRemote
(
url
,
(
err
,
clip
)
=>
{
cc
.
audioEngine
.
playEffect
(
clip
,
loop
);
...
...
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