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
6a447bde
Commit
6a447bde
authored
Oct 13, 2022
by
yu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
10.13调整
parent
1841778a
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
208 additions
and
118 deletions
+208
-118
ngt08_flst.fire
assets/ngt08_flst/scene/ngt08_flst.fire
+130
-100
ngt08_flst.ts
assets/ngt08_flst/scene/ngt08_flst.ts
+33
-12
mrbr04_layout_mouse.ts
assets/ngt08_flst/scene/small/mrbr04_layout_mouse.ts
+1
-0
defaultData.ts
assets/ngt08_flst/script/defaultData.ts
+6
-6
icon_right2.png
assets/ngt08_flst/textures/public/icon_right2.png
+0
-0
icon_right2.png.meta
assets/ngt08_flst/textures/public/icon_right2.png.meta
+36
-0
creator.d.ts
creator.d.ts
+2
-0
No files found.
assets/ngt08_flst/scene/ngt08_flst.fire
View file @
6a447bde
This diff is collapsed.
Click to expand it.
assets/ngt08_flst/scene/ngt08_flst.ts
View file @
6a447bde
...
@@ -2,7 +2,6 @@ import { asyncDelay, onHomeworkFinish, RandomInt } from "../script/util";
...
@@ -2,7 +2,6 @@ import { asyncDelay, onHomeworkFinish, RandomInt } from "../script/util";
import
{
MyCocosSceneComponent
}
from
"
../script/MyCocosSceneComponent
"
;
import
{
MyCocosSceneComponent
}
from
"
../script/MyCocosSceneComponent
"
;
import
Game
,
{
FISH_OUT
,
GAME_STATE
,
Option
}
from
"
./tool/Game
"
;
import
Game
,
{
FISH_OUT
,
GAME_STATE
,
Option
}
from
"
./tool/Game
"
;
import
pg
from
"
./tool/pg
"
;
import
pg
from
"
./tool/pg
"
;
import
{
count
}
from
"
console
"
;
const
{
ccclass
,
property
}
=
cc
.
_decorator
;
const
{
ccclass
,
property
}
=
cc
.
_decorator
;
...
@@ -125,7 +124,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -125,7 +124,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
}
private
onAgain
()
{
private
onAgain
()
{
this
.
layout_finish
.
active
=
false
;
this
.
layout_finish
.
active
=
false
;
this
.
onLoadEnd
();
this
.
initData
();
pg
.
event
.
emit
(
"
mouse_num
"
,
Game
.
getIns
().
getCardInfo
().
length
);
this
.
gameStart
();
}
}
private
onNext
()
{
private
onNext
()
{
...
@@ -182,11 +183,17 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -182,11 +183,17 @@ export default class SceneComponent extends MyCocosSceneComponent {
private
chipPos
=
[];
private
chipPos
=
[];
private
showQuestion
()
{
private
showQuestion
()
{
this
.
chipPos
=
[
this
.
chipPos
=
[
{
x
:
-
260
,
y
:
-
44
,
angle
:
130
},
{
x
:
-
190
,
y
:
-
24
,
angle
:
130
},
{
x
:
17
,
y
:
104
,
angle
:
120
},
{
x
:
-
260
,
y
:
-
44
,
angle
:
130
,
zIndex
:
0
},
{
x
:
245
,
y
:
-
18
,
angle
:
55
,
zIndex
:
8
},
{
x
:
-
190
,
y
:
-
24
,
angle
:
130
,
zIndex
:
1
},
{
x
:
35
,
y
:
39
,
angle
:
65
},
{
x
:
-
172
,
y
:
43
,
angle
:
130
},
{
x
:
-
64
,
y
:
-
6
,
angle
:
13
0
},
{
x
:
190
,
y
:
-
15
,
angle
:
60
,
zIndex
:
9
},
{
x
:
-
172
,
y
:
43
,
angle
:
130
,
zIndex
:
4
},
{
x
:
130
,
y
:
-
18
,
angle
:
65
,
zIndex
:
1
0
},
{
x
:
208
,
y
:
112
,
angle
:
50
},
{
x
:
-
26
,
y
:
28
,
angle
:
120
},
{
x
:
245
,
y
:
-
18
,
angle
:
55
},
{
x
:
-
64
,
y
:
-
6
,
angle
:
130
,
zIndex
:
5
},
{
x
:
-
26
,
y
:
28
,
angle
:
120
,
zIndex
:
7
},
{
x
:
112
,
y
:
83
,
angle
:
65
,
zIndex
:
11
},
{
x
:
190
,
y
:
-
15
,
angle
:
60
},
{
x
:
130
,
y
:
-
18
,
angle
:
65
},
{
x
:
112
,
y
:
83
,
angle
:
65
}
{
x
:
35
,
y
:
39
,
angle
:
65
,
zIndex
:
3
},
{
x
:
17
,
y
:
104
,
angle
:
120
,
zIndex
:
2
},
{
x
:
208
,
y
:
112
,
angle
:
50
,
zIndex
:
6
}
];
];
// this.chipPos = [
// { x: -260, y: -44, angle: 130 }, { x: -190, y: -24, angle: 130 }, { x: 17, y: 104, angle: 120 },
// { x: 35, y: 39, angle: 65 }, { x: -172, y: 43, angle: 130 }, { x: -64, y: -6, angle: 130 },
// { x: 208, y: 112, angle: 50 }, { x: -26, y: 28, angle: 120 }, { x: 245, y: -18, angle: 55 },
// { x: 190, y: -15, angle: 60 }, { x: 130, y: -18, angle: 65 }, { x: 112, y: 83, angle: 65 }
// ];
this
.
layout_card
.
removeAllChildren
();
this
.
layout_card
.
removeAllChildren
();
let
chipNode
=
cc
.
find
(
"
chips
"
,
this
.
layout_game
);
let
chipNode
=
cc
.
find
(
"
chips
"
,
this
.
layout_game
);
this
.
wordItams
=
[];
this
.
wordItams
=
[];
...
@@ -197,11 +204,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -197,11 +204,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
let
word
=
cc
.
find
(
"
word
"
,
chip
);
let
word
=
cc
.
find
(
"
word
"
,
chip
);
word
.
getComponent
(
cc
.
Label
).
string
=
ch
.
txt
;
word
.
getComponent
(
cc
.
Label
).
string
=
ch
.
txt
;
chip
.
data
=
ch
;
chip
.
data
=
ch
;
chip
.
data
.
zIndex
=
id
x
;
chip
.
data
.
zIndex
=
this
.
chipPos
[
idx
].
zInde
x
;
chip
.
x
=
this
.
chipPos
[
idx
].
x
;
chip
.
x
=
this
.
chipPos
[
idx
].
x
;
chip
.
y
=
this
.
chipPos
[
idx
].
y
;
chip
.
y
=
this
.
chipPos
[
idx
].
y
;
chip
.
angle
=
this
.
chipPos
[
idx
].
angle
;
chip
.
angle
=
this
.
chipPos
[
idx
].
angle
;
this
.
layout_card
.
addChild
(
chip
,
id
x
);
this
.
layout_card
.
addChild
(
chip
,
this
.
chipPos
[
idx
].
zInde
x
);
chip
.
off
(
cc
.
Node
.
EventType
.
TOUCH_START
,
this
.
onItemTouchStart
,
this
);
chip
.
off
(
cc
.
Node
.
EventType
.
TOUCH_START
,
this
.
onItemTouchStart
,
this
);
chip
.
off
(
cc
.
Node
.
EventType
.
TOUCH_MOVE
,
this
.
onItemTouchMove
,
this
);
chip
.
off
(
cc
.
Node
.
EventType
.
TOUCH_MOVE
,
this
.
onItemTouchMove
,
this
);
...
@@ -260,10 +267,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -260,10 +267,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
if
(
!
itemBg
)
{
if
(
!
itemBg
)
{
target
.
parent
=
null
;
target
.
parent
=
null
;
this
.
layout_card
.
addChild
(
target
,
data
.
zIndex
);
let
chipPos
=
this
.
getChipPos
(
data
.
zIndex
)
target
.
x
=
this
.
chipPos
[
data
.
zIndex
].
x
;
this
.
layout_card
.
addChild
(
target
,
chipPos
.
zIndex
);
target
.
y
=
this
.
chipPos
[
data
.
zIndex
].
y
;
target
.
x
=
chipPos
.
x
;
target
.
angle
=
this
.
chipPos
[
data
.
zIndex
].
angle
;
target
.
y
=
chipPos
.
y
;
target
.
angle
=
chipPos
.
angle
;
this
.
playLocalAudio
(
"
error
"
);
this
.
playLocalAudio
(
"
error
"
);
return
;
return
;
}
}
...
@@ -291,6 +299,15 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -291,6 +299,15 @@ export default class SceneComponent extends MyCocosSceneComponent {
e
.
target
.
setPosition
(
pos
)
e
.
target
.
setPosition
(
pos
)
}
}
}
}
private
getChipPos
(
zIndex
)
{
for
(
let
i
=
0
;
i
<
this
.
chipPos
.
length
;
i
++
)
{
let
chip
=
this
.
chipPos
[
i
];
if
(
chip
.
zIndex
==
zIndex
)
{
return
chip
;
}
}
return
null
;
}
private
getDistances
(
p1
,
p2
)
{
private
getDistances
(
p1
,
p2
)
{
//转换世界坐标查看距离
//转换世界坐标查看距离
let
ps2
=
p2
.
convertToWorldSpaceAR
(
cc
.
v2
(
0
,
0
));
let
ps2
=
p2
.
convertToWorldSpaceAR
(
cc
.
v2
(
0
,
0
));
...
@@ -335,6 +352,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -335,6 +352,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
let
finish_db
=
cc
.
find
(
"
finish_db
"
,
layout_finish
);
let
finish_db
=
cc
.
find
(
"
finish_db
"
,
layout_finish
);
let
btn_again
=
cc
.
find
(
"
btn_again
"
,
layout_finish
);
let
btn_again
=
cc
.
find
(
"
btn_again
"
,
layout_finish
);
let
btn_next
=
cc
.
find
(
"
btn_next
"
,
layout_finish
);
let
btn_next
=
cc
.
find
(
"
btn_next
"
,
layout_finish
);
finish_db
.
active
=
true
;
btn_again
.
active
=
false
;
btn_next
.
active
=
false
;
finish_db
.
getComponent
(
dragonBones
.
ArmatureDisplay
).
playAnimation
(
"
newAnimation
"
,
1
);
this
.
playLocalAudio
(
"
finish
"
).
then
(()
=>
{
this
.
playLocalAudio
(
"
finish
"
).
then
(()
=>
{
finish_db
.
active
=
false
;
finish_db
.
active
=
false
;
btn_again
.
active
=
true
;
btn_again
.
active
=
true
;
...
...
assets/ngt08_flst/scene/small/mrbr04_layout_mouse.ts
View file @
6a447bde
...
@@ -93,6 +93,7 @@ export default class NewClass extends cc.Component {
...
@@ -93,6 +93,7 @@ export default class NewClass extends cc.Component {
this
.
bigStarArr
.
push
(
starBg
);
this
.
bigStarArr
.
push
(
starBg
);
}
}
this
.
bigStarArr
=
this
.
bigStarArr
.
reverse
();
console
.
log
(
"
bigStarArr:
"
,
this
.
bigStarArr
);
console
.
log
(
"
bigStarArr:
"
,
this
.
bigStarArr
);
}
}
...
...
assets/ngt08_flst/script/defaultData.ts
View file @
6a447bde
export
const
defaultData
=
{
export
const
defaultData
=
{
"
imgAni
"
:
{
"
imgAni
"
:
{
"
ske
"
:
{
"
ske
"
:
{
"
url
"
:
"
http://staging-teach.cdn.ireadabc.com/62eb732be39e0a514dcd61b2f215141
c.json
"
,
"
url
"
:
"
http://staging-teach.cdn.ireadabc.com/a7dc36aa85121807bb7e049642192ce
c.json
"
,
"
name
"
:
"
niao_ske.json
"
"
name
"
:
"
niao_ske.json
"
},
},
"
tex
"
:
{
"
tex
"
:
{
"
url
"
:
"
http://staging-teach.cdn.ireadabc.com/9e789079ec5355fb1ee28e362e9cb92d
.json
"
,
"
url
"
:
"
http://staging-teach.cdn.ireadabc.com/c635daaa86b4c5c39f4af88e826d3433
.json
"
,
"
name
"
:
"
niao_tex.json
"
"
name
"
:
"
niao_tex.json
"
},
},
"
png
"
:
{
"
png
"
:
{
"
url
"
:
"
http://staging-teach.cdn.ireadabc.com/609b0aba832294d17fafdb7587773bc3
.png
"
,
"
url
"
:
"
http://staging-teach.cdn.ireadabc.com/75c87beb2b7d79033ace8978edc91a12
.png
"
,
"
name
"
:
"
niao_tex.png
"
"
name
"
:
"
niao_tex.png
"
}
}
},
},
"
questionTextAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/c3b69ad3d51385eac7d4195773ef59f7_l.mp3
"
,
"
questionTextAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/c3b69ad3d51385eac7d4195773ef59f7_l.mp3
"
,
...
...
assets/ngt08_flst/textures/public/icon_right2.png
0 → 100644
View file @
6a447bde
12.5 KB
assets/ngt08_flst/textures/public/icon_right2.png.meta
0 → 100644
View file @
6a447bde
{
"ver": "2.3.5",
"uuid": "c049810d-17a6-4f9e-b81d-1aef551c9dfd",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 150,
"height": 150,
"platformSettings": {},
"subMetas": {
"icon_right2": {
"ver": "1.0.4",
"uuid": "7d20a4d1-bc99-4d20-a15a-38163399246d",
"rawTextureUuid": "c049810d-17a6-4f9e-b81d-1aef551c9dfd",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 13,
"trimY": 0,
"width": 124,
"height": 150,
"rawWidth": 150,
"rawHeight": 150,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
creator.d.ts
View file @
6a447bde
...
@@ -4588,6 +4588,8 @@ declare namespace cc {
...
@@ -4588,6 +4588,8 @@ declare namespace cc {
/** !#en Returns a normalized vector representing the forward direction (Z axis) of the node in world space.
/** !#en Returns a normalized vector representing the forward direction (Z axis) of the node in world space.
!#zh 获取节点正前方(z 轴)面对的方向,返回值为世界坐标系下的归一化向量 */
!#zh 获取节点正前方(z 轴)面对的方向,返回值为世界坐标系下的归一化向量 */
forward
:
Vec3
;
forward
:
Vec3
;
pageIdx
:
any
;
data
:
any
;
/**
/**
@param name name
@param name name
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