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
4ad4086f
Commit
4ad4086f
authored
Jun 30, 2021
by
linzhiguo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
# 选项进入分组判断过宽
# 宽小高大的图片缩放问题
parent
0ffa12fd
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
14 deletions
+27
-14
east-10.fire
play/assets/east-10/scene/east-10.fire
+6
-6
east-10.js
play/assets/east-10/scene/east-10.js
+10
-6
option.js
play/assets/east-10/script/option.js
+9
-0
util.js
play/assets/east-10/script/util.js
+2
-2
No files found.
play/assets/east-10/scene/east-10.fire
View file @
4ad4086f
...
@@ -7778,7 +7778,7 @@
...
@@ -7778,7 +7778,7 @@
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
0,
0,
-
682
,
-
921.831
,
0,
0,
0,
0,
0,
0,
...
@@ -7872,7 +7872,7 @@
...
@@ -7872,7 +7872,7 @@
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
0,
0,
-
575
,
-
814.831
,
0,
0,
0,
0,
0,
0,
...
@@ -7966,7 +7966,7 @@
...
@@ -7966,7 +7966,7 @@
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
0,
0,
-
468
,
-
707.831
,
0,
0,
0,
0,
0,
0,
...
@@ -8060,7 +8060,7 @@
...
@@ -8060,7 +8060,7 @@
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
0,
0,
-
36
1,
-
600.83
1,
0,
0,
0,
0,
0,
0,
...
@@ -8154,7 +8154,7 @@
...
@@ -8154,7 +8154,7 @@
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
0,
0,
-
254
,
-
493.831
,
0,
0,
0,
0,
0,
0,
...
@@ -8248,7 +8248,7 @@
...
@@ -8248,7 +8248,7 @@
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
0,
0,
-
147
,
-
386.831
,
0,
0,
0,
0,
0,
0,
...
...
play/assets/east-10/scene/east-10.js
View file @
4ad4086f
...
@@ -264,6 +264,7 @@ cc.Class({
...
@@ -264,6 +264,7 @@ cc.Class({
this
.
_touched
=
true
;
this
.
_touched
=
true
;
selected
.
copyValues
(
option
);
selected
.
copyValues
(
option
);
selected
.
selected
(
true
);
selected
.
selected
(
true
);
selected
.
selectedSize
();
selected
.
target
=
option_node
;
selected
.
target
=
option_node
;
selected
.
cx
=
selected
.
node
.
x
;
selected
.
cx
=
selected
.
node
.
x
;
selected
.
cy
=
selected
.
node
.
y
;
selected
.
cy
=
selected
.
node
.
y
;
...
@@ -301,15 +302,18 @@ cc.Class({
...
@@ -301,15 +302,18 @@ cc.Class({
if
(
!
this
.
_touched
)
if
(
!
this
.
_touched
)
return
;
return
;
let
item
,
len
=
this
.
_kind_group
.
node
.
childrenCount
;
let
item
,
area
,
len
=
this
.
_kind_group
.
node
.
childrenCount
;
let
i
=
0
;
let
i
=
0
;
for
(
i
=
0
;
i
<
len
;
i
++
){
for
(
i
=
0
;
i
<
len
;
i
++
){
item
=
this
.
_kind_group
.
node
.
children
[
i
];
item
=
this
.
_kind_group
.
node
.
children
[
i
];
if
(
cc
.
rect
(
item
.
getBoundingBoxToWorld
()).
intersects
(
cc
.
rect
(
selected
.
node
.
getBoundingBoxToWorld
()))){
area
=
item
.
getChildByName
(
'
layout_area
'
);
console
.
log
(
i
);
let
rect
=
area
.
getBoundingBoxToWorld
();
console
.
log
(
item
.
getBoundingBoxToWorld
());
rect
.
width
-=
20
;
rect
.
x
+=
10
;
if
(
cc
.
rect
(
rect
).
intersects
(
cc
.
rect
(
selected
.
node
.
getBoundingBoxToWorld
()))){
// console.log(i);
// console.log(item.getBoundingBoxToWorld());
let
kind
=
item
.
getComponent
(
cc
.
js
.
getClassByName
(
'
WordKind
'
));
let
kind
=
item
.
getComponent
(
cc
.
js
.
getClassByName
(
'
WordKind
'
));
if
(
kind
.
kind_id
!=
selected
.
kind_id
){
if
(
kind
.
kind_id
!=
selected
.
kind_id
){
//this.playAudioByName('incorrect');
//this.playAudioByName('incorrect');
...
...
play/assets/east-10/script/option.js
View file @
4ad4086f
...
@@ -140,6 +140,15 @@ cc.Class({
...
@@ -140,6 +140,15 @@ cc.Class({
}
}
},
},
selectedSize
(){
if
(
this
.
_type
==
0
){
this
.
node
.
width
=
256
;
}
else
{
this
.
node
.
width
=
321
;
}
},
changeBackground
(){
changeBackground
(){
let
type
=
this
.
_type
;
let
type
=
this
.
_type
;
let
fname
;
let
fname
;
...
...
play/assets/east-10/script/util.js
View file @
4ad4086f
...
@@ -23,7 +23,7 @@ export function setSpriteWH(target, sf, w, h){
...
@@ -23,7 +23,7 @@ export function setSpriteWH(target, sf, w, h){
target
.
node
.
height
=
vv
;
target
.
node
.
height
=
vv
;
}
}
if
(
osize
.
width
>
w
&&
osize
.
width
>
osize
.
height
){
if
(
osize
.
width
>
osize
.
height
){
let
wr
=
w
/
osize
.
width
;
let
wr
=
w
/
osize
.
width
;
target
.
node
.
width
=
w
;
target
.
node
.
width
=
w
;
target
.
node
.
height
=
wr
*
osize
.
height
;
target
.
node
.
height
=
wr
*
osize
.
height
;
...
@@ -36,7 +36,7 @@ export function setSpriteWH(target, sf, w, h){
...
@@ -36,7 +36,7 @@ export function setSpriteWH(target, sf, w, h){
}
}
}
}
if
(
osize
.
height
>
h
&&
osize
.
width
<
osize
.
height
){
if
(
osize
.
width
<
osize
.
height
){
let
hr
=
h
/
osize
.
height
;
let
hr
=
h
/
osize
.
height
;
target
.
node
.
width
=
hr
*
osize
.
width
;
target
.
node
.
width
=
hr
*
osize
.
width
;
target
.
node
.
height
=
h
;
target
.
node
.
height
=
h
;
...
...
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