Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
east-10
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
east-10
Commits
87ff3e99
Commit
87ff3e99
authored
Jun 21, 2021
by
linzhiguo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
# 选项图片添加到分组中恢复原大
parent
769ca353
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
14 deletions
+20
-14
kind.js
play/assets/scene/script/kind.js
+16
-12
option.js
play/assets/scene/script/option.js
+4
-2
No files found.
play/assets/scene/script/kind.js
View file @
87ff3e99
...
...
@@ -106,24 +106,28 @@ cc.Class({
this
.
show_node
.
active
=
true
;
this
.
playAnimation
(()
=>
{
this
.
show_node
.
removeAllChildren
();
let
node
=
cc
.
instantiate
(
ot
);
let
node
=
cc
.
instantiate
(
cc
.
find
(
'
res/option_item
'
)
);
let
option
=
node
.
getComponent
(
cc
.
js
.
getClassByName
(
'
WordOption
'
));
option
.
copyValues
(
item
);
option
.
pic
.
width
=
item
.
pic
.
width
;
option
.
pic
.
height
=
item
.
pic
.
height
;
this
.
layout
.
node
.
addChild
(
node
);
option
.
adjustPicSize
();
option
.
finished
();
node
.
width
/=
3
;
node
.
height
/=
3
;
node
.
opacity
=
0
;
cc
.
tween
(
node
)
.
to
(
0.5
,
{
opacity
:
255
})
.
call
(()
=>
{
option
.
adjustPicSize
();
console
.
log
(
option
);
cb
&&
cb
();
})
.
start
();
let
sr
=
2
/
3
;
node
.
width
*=
sr
;
node
.
height
*=
sr
;
node
.
scale
*=
sr
;
// node.opacity = 0;
option
.
adjustPicSize
();
// cc.tween(node)
// .to(0.5, {opacity:255})
// .call(()=>{
// option.adjustPicSize();
// console.log(option);
// cb && cb();
// })
// .start();
this
.
show_node
.
active
=
false
;
this
.
animate_node
.
active
=
false
;
});
...
...
play/assets/scene/script/option.js
View file @
87ff3e99
...
...
@@ -117,12 +117,14 @@ cc.Class({
},
finished
(){
this
.
word_finish
.
active
=
false
;
this
.
pic_finish
.
active
=
false
;
this
.
pic_node
.
getComponent
(
cc
.
Sprite
).
enabled
=
false
;
this
.
word_node
.
getComponent
(
cc
.
Sprite
).
enabled
=
false
;
if
(
this
.
_type
==
0
){
this
.
pic_node
.
getComponent
(
cc
.
Sprite
).
enabled
=
false
;
this
.
pic_finish
.
active
=
true
;
}
else
{
this
.
word_node
.
getComponent
(
cc
.
Sprite
).
enabled
=
false
;
this
.
word_finish
.
active
=
true
;
}
}
...
...
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