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
c7976f06
Commit
c7976f06
authored
Jun 24, 2021
by
linzhiguo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
# 选项位置
#
parent
8f00e4e1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
38 deletions
+45
-38
east-10.fire
play/assets/east-10/scene/east-10.fire
+24
-24
east-10.js
play/assets/east-10/scene/east-10.js
+20
-13
group.js
play/assets/east-10/script/group.js
+1
-1
No files found.
play/assets/east-10/scene/east-10.fire
View file @
c7976f06
...
...
@@ -556,19 +556,19 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 1280,
"height": 5
3
0
"height": 5
4
0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0.5
"y": 0.5
5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-640,
92
,
117
,
0,
0,
0,
...
...
@@ -660,11 +660,11 @@
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 4
1
,
"_alignFlags": 4
5
,
"_left": 0,
"_right": 0,
"_top":
3.0000000000000036
,
"_bottom": 0,
"_top":
0
,
"_bottom":
18
0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
...
...
@@ -674,7 +674,7 @@
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 1277,
"_originalHeight": 0,
"_originalHeight":
53
0,
"_id": "70gNgjcRhGR75pT/PBUfxW"
},
{
...
...
@@ -1787,7 +1787,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 479,
"height": 2
8
4
"height": 2
4
4
},
"_anchorPoint": {
"__type__": "cc.Vec2",
...
...
@@ -4213,7 +4213,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 450,
"height": 2
5
4
"height": 2
1
4
},
"_anchorPoint": {
"__type__": "cc.Vec2",
...
...
@@ -4287,7 +4287,7 @@
"ctor": "Float64Array",
"array": [
-135,
6
7,
4
7,
0,
0,
0,
...
...
@@ -4381,7 +4381,7 @@
"ctor": "Float64Array",
"array": [
25,
6
7,
4
7,
0,
0,
0,
...
...
@@ -4475,7 +4475,7 @@
"ctor": "Float64Array",
"array": [
-135,
-3,
-
2
3,
0,
0,
0,
...
...
@@ -4569,7 +4569,7 @@
"ctor": "Float64Array",
"array": [
25,
-3,
-
2
3,
0,
0,
0,
...
...
@@ -4636,7 +4636,7 @@
"_layoutSize": {
"__type__": "cc.Size",
"width": 450,
"height": 2
5
4
"height": 2
1
4
},
"_resize": 0,
"_N$layoutType": 3,
...
...
@@ -4752,7 +4752,7 @@
"ctor": "Float64Array",
"array": [
-148,
-
120
,
-
64.5
,
0,
0,
0,
...
...
@@ -5010,11 +5010,11 @@
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags":
4
,
"_alignFlags":
12
,
"_left": -19,
"_right": 0,
"_top": 194.5,
"_bottom": -
45.5
,
"_bottom": -
10
,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
...
...
@@ -5075,7 +5075,7 @@
"ctor": "Float64Array",
"array": [
-97,
-
149
,
-
93.5
,
0,
0,
0,
...
...
@@ -5336,11 +5336,11 @@
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags":
4
,
"_alignFlags":
12
,
"_left": -27,
"_right": 0,
"_top": 252.5,
"_bottom": -
45.5
,
"_bottom": -
10
,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
...
...
@@ -5413,7 +5413,7 @@
"ctor": "Float64Array",
"array": [
-208,
1
3
3.23200000000003,
1
1
3.23200000000003,
0,
0,
0,
...
...
@@ -6213,7 +6213,7 @@
"__uuid__": "cd38cebe-aadb-4dd7-a641-aec306af5ad6"
},
"_type": 1,
"_sizeMode":
1
,
"_sizeMode":
0
,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
...
...
@@ -6293,7 +6293,7 @@
"__id__": 136
}
],
"_active":
tru
e,
"_active":
fals
e,
"_components": [
{
"__id__": 141
...
...
@@ -7035,7 +7035,7 @@
"__id__": 150
}
],
"_active":
tru
e,
"_active":
fals
e,
"_components": [
{
"__id__": 155
...
...
play/assets/east-10/scene/east-10.js
View file @
c7976f06
...
...
@@ -205,13 +205,15 @@ cc.Class({
this
.
_move_area
.
height
=
this
.
_frameSize
.
height
-
260
;
let
h1
=
this
.
_frameSize
.
height
-
260
-
216
*
2
;
let
s1
=
h1
/
3
;
let
offy
=
216
/
2
+
10
;
let
offy
=
216
/
2
;
this
.
_ys
=
[
-
offy
,
offy
];
// let option_node = cc.find('res/option');
// let option = option_node.getComponent(cc.js.getClassByName('WordOption'));
this
.
_fg_height
=
180
;
this
.
_test
.
on
(
'
click
'
,
()
=>
{
});
...
...
@@ -297,6 +299,10 @@ cc.Class({
for
(
let
i
=
0
;
i
<
len
;
i
++
){
item
=
this
.
_kind_group
.
node
.
children
[
i
];
if
(
cc
.
rect
(
item
.
getBoundingBoxToWorld
()).
intersects
(
cc
.
rect
(
selected
.
node
.
getBoundingBoxToWorld
()))){
console
.
log
(
i
);
console
.
log
(
item
.
getBoundingBoxToWorld
());
let
kind
=
item
.
getComponent
(
cc
.
js
.
getClassByName
(
'
WordKind
'
));
if
(
kind
.
kind_id
!=
selected
.
kind_id
){
this
.
playAudioByName
(
'
incorrect
'
);
...
...
@@ -367,14 +373,15 @@ cc.Class({
upForeground
(
cb
){
let
fg
=
cc
.
find
(
'
Canvas/fg
'
);
let
fg_top
=
-
this
.
_frameSize
.
height
/
2
-
150
;
let
fg_bottom
=
fg_top
-
160
*
this
.
_frameSize
.
width
/
1280
;
console
.
log
(
'
bottom =
'
+
fg_bottom
);
let
fg_top
=
cc
.
find
(
'
Canvas/fg_top
'
).
y
;
//fg_top -= 100;
// let fg_bottom = fg_top - fgh;
// console.log('bottom = ' + fg_bottom);
fg
.
y
=
fg_bottom
;
//
fg.y = fg_bottom;
this
.
playAudioByName
(
'
up
'
);
cc
.
tween
(
fg
)
.
to
(
0.3
,
{
y
:
fg
_top
})
.
to
(
0.3
,
{
y
:
fg
.
y
+
this
.
_fg_height
})
.
call
(()
=>
{
this
.
_moved
=
true
;
cb
&&
cb
();
...
...
@@ -384,11 +391,12 @@ cc.Class({
downForeground
(
cb
){
let
fg
=
cc
.
find
(
'
Canvas/fg
'
);
let
fg_top
=
-
this
.
_frameSize
.
height
/
2
-
150
;
let
fg_bottom
=
fg_top
-
160
*
this
.
_frameSize
.
width
/
1280
;
fg
.
y
=
fg_top
;
//let fg_top = cc.find('Canvas/fg_top').y;
//fg_top -= 100;
//let fg_bottom = fg_top - fgh;
//fg.y = fg_top;
cc
.
tween
(
fg
)
.
to
(
0.3
,
{
y
:
fg
_bottom
})
.
to
(
0.3
,
{
y
:
fg
.
y
-
this
.
_fg_height
})
.
call
(()
=>
{
cb
&&
cb
();
})
...
...
@@ -683,9 +691,8 @@ cc.Class({
for
(
let
i
=
0
;
i
<
area
.
childrenCount
;
i
++
){
let
item
=
area
.
children
[
i
];
item
.
x
+=
speed
;
if
(
item
.
x
>
this
.
_frameSize
.
width
+
item
.
_w
*
1.2
){
this
.
_xs
[
i
%
2
]
-=
item
.
_w
*
1.2
;
if
(
item
.
x
>
this
.
_frameSize
.
width
+
item
.
_w
/
2
){
this
.
_xs
[
i
%
2
]
-=
item
.
_w
/
2
;
//item.x = Math.min(-item._w/2, this._xs[i%2]);
item
.
x
=
-
item
.
_w
/
2
;
}
...
...
play/assets/east-10/script/group.js
View file @
c7976f06
...
...
@@ -23,7 +23,7 @@ cc.Class({
this
.
node
.
addChild
(
item
);
kind
=
item
.
getComponent
(
cc
.
js
.
getClassByName
(
'
WordKind
'
));
kind
.
init
(
data
[
i
]);
item
.
y
+=
43
;
item
.
y
+=
80
;
}
this
.
updateView
();
...
...
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